Fixes critical crash bugs

This commit is contained in:
Heroman
2022-10-02 13:19:03 +10:00
parent 670e91c80a
commit c7a4522115
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ SUBSYSTEM_DEF(ai)
if(!L?.loc)
continue
if(process_z[get_z(L)] || !L.low_priority) //VOREStation Edit End
if((get_z(L) && process_z[get_z(L)]) || !L.low_priority) //VOREStation Edit End
A.handle_strategicals()
else
slept_mobs++
+6 -6
View File
@@ -15,7 +15,7 @@ SUBSYSTEM_DEF(mobs)
var/list/currentrun = list()
var/log_extensively = FALSE
var/list/timelog = list()
var/slept_mobs = 0
var/list/process_z = list()
@@ -40,10 +40,10 @@ SUBSYSTEM_DEF(mobs)
if(!M || QDELETED(M))
mob_list -= M
continue
else if(M.low_priority && !(M.loc && process_z[get_z(M)]))
else if(M.low_priority && !(M.loc && get_z(M) && process_z[get_z(M)]))
slept_mobs++
continue
M.Life(times_fired)
if (MC_TICK_CHECK)
@@ -58,14 +58,14 @@ SUBSYSTEM_DEF(mobs)
log_world(msg)
return
msg += "Lists: currentrun: [currentrun.len], mob_list: [mob_list.len]\n"
if(!currentrun.len)
msg += "!!The subsystem just finished the mob_list list, and currentrun is empty (or has never run).\n"
msg += "!!The info below is the tail of mob_list instead of currentrun.\n"
var/datum/D = currentrun.len ? currentrun[currentrun.len] : mob_list[mob_list.len]
msg += "Tail entry: [describeThis(D)] (this is likely the item AFTER the problem item)\n"
var/position = mob_list.Find(D)
if(!position)
msg += "Unable to find context of tail entry in mob_list list.\n"