diff --git a/code/datums/elements/footstep.dm b/code/datums/elements/footstep.dm index d2f129c09f4..dd4656e3f31 100644 --- a/code/datums/elements/footstep.dm +++ b/code/datums/elements/footstep.dm @@ -155,11 +155,11 @@ heard_clients = playsound(source.loc, pick(source.dna.species.special_step_sounds), 50, TRUE, falloff_distance = 1, vary = sound_vary) else var/static/list/bare_footstep_sounds = GLOB.barefootstep - - heard_clients = playsound(source.loc, pick(bare_footstep_sounds[barefoot_type][1]), - bare_footstep_sounds[barefoot_type][2] * volume * volume_multiplier, - TRUE, - bare_footstep_sounds[barefoot_type][3] + e_range + range_adjustment, falloff_distance = 1, vary = sound_vary) + 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, + TRUE, + bare_footstep_sounds[barefoot_type][3] + e_range + range_adjustment, falloff_distance = 1, vary = sound_vary) if(heard_clients) play_fov_effect(source, 5, "footstep", direction, ignore_self = TRUE, override_list = heard_clients)