Attempt to clean up player_list if an issue is found

Dangerous? Not any more than just leaving it, probably. I can't think of a case where player_list -= something wouldn't work, even in the case of nulls probably. And the no-depth [mob] lookup at the end is probably fine, even if it's a null, since it'll use byond's internal "what is this" handler to print the name or an icon or whatever it is.
This commit is contained in:
Arokha Sieyes
2017-11-16 15:09:56 -05:00
parent 64da022bd6
commit 7f0adf5d88

View File

@@ -281,9 +281,12 @@
//A list of every mob with a client
for(var/mob in player_list)
//VOREStation Edit - Trying to fix some vorestation bug.
if(!istype(mob, /mob))
crash_with("There is a null or non-mob reference inside player_list.")
player_list -= mob
crash_with("There is a null or non-mob reference inside player_list ([mob]).")
continue
//VOREStation Edit End - Trying to fix some vorestation bug.
if(get_turf(mob) in hearturfs)
mobs |= mob
continue