Issue #12420 - Guardian snapback null-space glitch fix (#12432)

This commit is contained in:
Pidgey
2019-09-27 16:04:30 -07:00
committed by variableundefined
parent 35395a5b29
commit 2bf3883e5b
2 changed files with 4 additions and 2 deletions
@@ -73,7 +73,8 @@
qdel()
/mob/living/simple_animal/hostile/guardian/proc/snapback()
if(summoner)
// If the summoner dies instantly, the summoner's ghost may be drawn into null space as the protector is deleted. This check should prevent that.
if(summoner && loc && summoner.loc)
if(get_dist(get_turf(summoner),get_turf(src)) <= range)
return
else
@@ -41,7 +41,8 @@
toggle = TRUE
/mob/living/simple_animal/hostile/guardian/protector/snapback() //snap to what? snap to the guardian!
if(summoner)
// If the summoner dies instantly, the summoner's ghost may be drawn into null space as the protector is deleted. This check should prevent that.
if(summoner && loc && summoner.loc)
if(get_dist(get_turf(summoner),get_turf(src)) <= range)
return
else