Merge pull request #14329 from KazeEspada/Mobfix1pointO

Fixes a runtime involving mobs that get deleted upon death.
This commit is contained in:
duncathan salt
2016-01-04 20:28:52 +01:00
+8 -7
View File
@@ -160,13 +160,14 @@
if(M)
if ((get_dist(mob, M) <= 1 || M.loc == mob.loc))
. = ..()
if (isturf(M.loc))
var/diag = get_dir(mob, M)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(mob, M) > 1 || diag))
step(M, get_dir(M.loc, mob.loc))
if(M)//Mob may get deleted during parent call
if (isturf(M.loc))
var/diag = get_dir(mob, M)
if ((diag - 1) & diag)
else
diag = null
if ((get_dist(mob, M) > 1 || diag))
step(M, get_dir(M.loc, mob.loc))
else
for(var/mob/M in L)
M.other_mobs = 1