Fixes footstep sounds for downed/lying mobs (#42704)

Nobody made a report but I noticed this issue: Downed players being dragged are playing footstep sounds, specifically the bare footstep sounds via their hands from what I noticed.

Fixes (hopefully) footstep sounds from being played from incapacitated mobs that are being moved (via dragging for example). Instead, lying mobs will play a crawling sound when moving.
## Why It's Good For The Game

Footstep sounds shouldn't be played when mobs are being dragged.
This commit is contained in:
nero1024
2019-02-09 17:43:55 -06:00
committed by oranges
parent 4c8c55397d
commit e949346cfd
2 changed files with 5 additions and 2 deletions

View File

@@ -18,7 +18,10 @@
var/mob/living/LM = parent var/mob/living/LM = parent
var/v = volume var/v = volume
var/e = e_range var/e = e_range
if(!T.footstep || LM.buckled || !CHECK_MULTIPLE_BITFIELDS(LM.mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING)) if(!T.footstep || LM.buckled || LM.lying || !CHECK_MULTIPLE_BITFIELDS(LM.mobility_flags, MOBILITY_STAND | MOBILITY_MOVE) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
if (!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING)) //don't play sounds if flying etc.
return
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v) //play crawling sound
return return
if(iscarbon(LM)) if(iscarbon(LM))
@@ -92,7 +95,7 @@
TRUE, TRUE,
GLOB.footstep[T.footstep][3] + e) GLOB.footstep[T.footstep][3] + e)
if((!H.shoes && !feetCover) || !(H.mobility_flags & MOBILITY_STAND)) //are we NOT wearing shoes or are we lying/crawling (using hands to move around)? if((!H.shoes && !feetCover)) //are we NOT wearing shoes
if(H.dna.species.special_step_sounds) if(H.dna.species.special_step_sounds)
playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE) playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE)
else else

Binary file not shown.