mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 02:24:11 +01:00
Fixes a footsteps runtime (#79903)
## About The Pull Request Tin. Fixes the following runtime:  Which happened because `barefoot_type` can potentially be null if `turf.barefootstep` is null.  This results in trying to access `GLOB.barefootstep[null]`, which results in a runtime, which prevents the `play_fov_effect()` from executing. ## Why It's Good For The Game Less CI failures, and fixes a bug. ## Changelog 🆑 fix: fixes a runtime in footstep code that would prevent the fov effect from playing to nearby mobs /🆑
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user