Eye runtime fixes.

Ensures the spawn in ai/New() doesn't attempt to update eyeobj if the AI was deleted before the timer.
This commit is contained in:
PsiOmega
2015-04-10 11:29:50 +02:00
parent e6f83f8fa2
commit baa2fe0dfa
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -36,11 +36,13 @@
eyeobj.owner = src
eyeobj.name = "[src.name] (AI Eye)" // Give it a name
spawn(5)
eyeobj.loc = src.loc
if(eyeobj)
eyeobj.loc = src.loc
/mob/living/silicon/ai/Del()
eyeobj.owner = null
del(eyeobj) // No AI, no Eye
if(eyeobj)
eyeobj.owner = null
del(eyeobj) // No AI, no Eye
..()
/atom/proc/move_camera_by_click()
+1 -1
View File
@@ -36,7 +36,7 @@ mob/eye/Del()
ghost_darkness_images -= ghostimage
ghost_sightless_images -= ghostimage
del(ghostimage)
ghostimage = null;
ghostimage = null
updateallghostimages()
..()