From b32f4d19740436eda7ee6ee5558d7ae4b2808fa2 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 1 Jan 2024 20:23:48 +0100 Subject: [PATCH] [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. :cl: fix: Fixed footstep sounds. /:cl: * Fix footsteps not working --------- Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> --- code/datums/elements/footstep.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/elements/footstep.dm b/code/datums/elements/footstep.dm index bdf3f98a11f..a162e58752d 100644 --- a/code/datums/elements/footstep.dm +++ b/code/datums/elements/footstep.dm @@ -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,