Fixes the client.eye problems when a mob is in a atom/moveable which gets deleted.

Robots trapped inside an atom/moveable which gets deleted now ghost properly rather than having their brain dumped into loc=null.

client.images, client.screen and client.eye are always updated upon login()

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4088 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-07-16 12:15:07 +00:00
parent a4de35c932
commit b222e9cdee
15 changed files with 57 additions and 84 deletions
+1 -9
View File
@@ -1,10 +1,2 @@
/mob/dead/observer/Login()
..()
src.client.screen = null
if (!isturf(src.loc))
src.client.eye = src.loc
src.client.perspective = EYE_PERSPECTIVE
return
return ..()
@@ -31,9 +31,6 @@ Works together with spawning an observer, noted above.
/mob/proc/ghostize(var/transfer_mind = 0)
if(key)
var/mob/dead/observer/ghost = new(src,transfer_mind) //Transfer safety to observer spawning proc.
if(client)
client.images.len = null //remove the images such as AIs being unable to see runes
client.screen.len = null //remove hud items just in case
ghost.attack_log = attack_log //preserve our attack logs by copying them to our ghost
if(transfer_mind && mind) //When a body is destroyed attempt to transfer their mind
mind.transfer_to(ghost)