mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Fixes an outofbounds exception and a nullpointerexception in ambience (#21743)
This commit is contained in:
@@ -30,6 +30,8 @@ client/proc/handle_ambience()
|
||||
return
|
||||
|
||||
var/list/possible_ambience = get_ambience()
|
||||
if(!possible_ambience)
|
||||
return
|
||||
if(last_ambient_noise)
|
||||
var/cancel_ambience = TRUE
|
||||
for(var/amb in possible_ambience)
|
||||
@@ -44,7 +46,7 @@ client/proc/handle_ambience()
|
||||
if(ambience_buffer > world.timeofday)
|
||||
return //sound's playing. don't bother.
|
||||
|
||||
if(possible_ambience.len > 1)//more than one thing. no repeats!
|
||||
if(possible_ambience.len)
|
||||
for(var/datum/ambience/ambie in possible_ambience)
|
||||
if(last_ambient_noise == ambie.sound)
|
||||
possible_ambience -= ambie
|
||||
|
||||
Reference in New Issue
Block a user