Fix X-Ray on death for simple_mobs, fix view variables damage for non-humans

This commit is contained in:
Mark van Alphen
2019-05-09 19:52:29 +02:00
parent 458e59a191
commit afc22b03ed
6 changed files with 56 additions and 19 deletions
@@ -277,6 +277,7 @@ Des: Removes all infected images from the alien.
grant_death_vision()
return
see_invisible = initial(see_invisible)
sight = SEE_MOBS
if(nightvision)
see_in_dark = 8
+2
View File
@@ -1139,6 +1139,8 @@ so that different stomachs can handle things in different ways VB*/
grant_death_vision()
return
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
lighting_alpha = initial(lighting_alpha)
-10
View File
@@ -1039,13 +1039,3 @@
update_transform()
if("lighting_alpha")
sync_lighting_plane_alpha()
/mob/living/update_sight()
if(!client)
return
if(stat == DEAD)
grant_death_vision()
return
. = ..()
+1 -1
View File
@@ -1303,8 +1303,8 @@ var/list/ai_verbs_default = list(
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
lighting_alpha = initial(lighting_alpha)
sight = initial(sight)
lighting_alpha = initial(lighting_alpha)
if(aiRestorePowerRoutine)
sight = sight &~ SEE_TURFS
@@ -609,4 +609,33 @@
..()
if(AIStatus == AI_Z_OFF)
SSidlenpcpool.idle_mobs_by_zlevel[old_z] -= src
toggle_ai(initial(AIStatus))
toggle_ai(initial(AIStatus))
// Simple animals will not be given night vision upon death, as that would result in issues when they are revived.
/mob/living/simple_animal/grant_death_vision()
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_OBSERVER
sync_lighting_plane_alpha()
/mob/living/simple_animal/update_sight()
if(!client)
return
if(stat == DEAD)
grant_death_vision()
return
see_invisible = initial(see_invisible)
see_in_dark = initial(see_in_dark)
sight = initial(sight)
if(client.eye != src)
var/atom/A = client.eye
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
return
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()