[MIRROR] Fix footsteps not working [MDB IGNORE] (#25939)

* Fix footsteps not working (#80704)

## About The Pull Request
Fixes #80686.

Somehow, these statics were not being initialized after the GLOBs. I
don't know how that changed. Makes them local references because they're
still used 3 times in the hot path.
🆑
fix: Fixed footstep sounds.
/🆑

* Fix footsteps not working

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-01-01 20:23:48 +01:00
committed by GitHub
parent 861b94af58
commit b32f4d1974
+2 -2
View File
@@ -137,7 +137,7 @@
return
//cache for sanic speed (lists are references anyways)
var/static/list/footstep_sounds = GLOB.footstep
var/footstep_sounds = GLOB.footstep
///list returned by playsound() filled by client mobs who heard the footstep. given to play_fov_effect()
var/list/heard_clients
@@ -157,7 +157,7 @@
heard_clients = playsound(source.loc, pick(source.dna.species.special_step_sounds), 50, TRUE, falloff_distance = 1, vary = sound_vary)
else
var/barefoot_type = prepared_steps[FOOTSTEP_MOB_BAREFOOT]
var/static/list/bare_footstep_sounds = GLOB.barefootstep
var/bare_footstep_sounds = GLOB.barefootstep
if(!isnull(barefoot_type) && bare_footstep_sounds[barefoot_type]) // barefoot_type can be null
heard_clients = playsound(source.loc, pick(bare_footstep_sounds[barefoot_type][1]),
bare_footstep_sounds[barefoot_type][2] * volume * volume_multiplier,