diff --git a/code/__DEFINES/dcs/signals/signals_turf.dm b/code/__DEFINES/dcs/signals/signals_turf.dm index 65709f4e446..04a2648773a 100644 --- a/code/__DEFINES/dcs/signals/signals_turf.dm +++ b/code/__DEFINES/dcs/signals/signals_turf.dm @@ -31,5 +31,7 @@ ///from /datum/element/footstep/prepare_step(): (list/steps) #define COMSIG_TURF_PREPARE_STEP_SOUND "turf_prepare_step_sound" + //stops element/footstep/proc/prepare_step() from returning null if the turf itself has no sound + #define FOOTSTEP_OVERRIDEN (1<<0) ///from base of datum/thrownthing/finalize(): (turf/turf, atom/movable/thrownthing) when something is thrown and lands on us #define COMSIG_TURF_MOVABLE_THROW_LANDED "turf_movable_throw_landed" diff --git a/code/datums/elements/footstep.dm b/code/datums/elements/footstep.dm index 3a0a9961843..d2f129c09f4 100644 --- a/code/datums/elements/footstep.dm +++ b/code/datums/elements/footstep.dm @@ -94,9 +94,9 @@ return . = list(FOOTSTEP_MOB_SHOE = turf.footstep, FOOTSTEP_MOB_BAREFOOT = turf.barefootstep, FOOTSTEP_MOB_HEAVY = turf.heavyfootstep, FOOTSTEP_MOB_CLAW = turf.clawfootstep, STEP_SOUND_PRIORITY = STEP_SOUND_NO_PRIORITY) - SEND_SIGNAL(turf, COMSIG_TURF_PREPARE_STEP_SOUND, .) + var/overriden = SEND_SIGNAL(turf, COMSIG_TURF_PREPARE_STEP_SOUND, .) & FOOTSTEP_OVERRIDEN //The turf has no footstep sound (e.g. open space) and none of the objects on that turf (e.g. catwalks) overrides it - if(isnull(turf.footstep)) + if(!overriden && isnull(turf.footstep)) return null return . diff --git a/code/datums/elements/footstep_override.dm b/code/datums/elements/footstep_override.dm index 4e0c346c5be..43d73113280 100644 --- a/code/datums/elements/footstep_override.dm +++ b/code/datums/elements/footstep_override.dm @@ -78,3 +78,4 @@ steps[FOOTSTEP_MOB_HEAVY] = heavyfootstep steps[FOOTSTEP_MOB_CLAW] = clawfootstep steps[STEP_SOUND_PRIORITY] = priority + return FOOTSTEP_OVERRIDEN