Movement fixes.

Ensures observers use Process_Incorpmove() despite being dead, while disallowing the once living from doing the same.
Ensures incorporeal creatures denied moving unto holy ground don't keep calling more movement code.
This commit is contained in:
PsiOmega
2015-04-15 14:21:58 +02:00
parent 20cfea7813
commit 2ddf8ecf28

View File

@@ -175,7 +175,7 @@
if(mob.control_object) Move_object(direct) if(mob.control_object) Move_object(direct)
if(mob.incorporeal_move) if(mob.incorporeal_move && isobserver(mob))
Process_Incorpmove(direct) Process_Incorpmove(direct)
return return
@@ -200,6 +200,9 @@
if(isliving(mob)) if(isliving(mob))
var/mob/living/L = mob var/mob/living/L = mob
if(L.incorporeal_move)//Move though walls
Process_Incorpmove(direct)
return
if(mob.client) if(mob.client)
if(mob.client.view != world.view) // If mob moves while zoomed in with device, unzoom them. if(mob.client.view != world.view) // If mob moves while zoomed in with device, unzoom them.
for(var/obj/item/item in mob.contents) for(var/obj/item/item in mob.contents)
@@ -371,6 +374,7 @@
var/turf/T = get_step(mob, direct) var/turf/T = get_step(mob, direct)
if(mob.check_holy(T)) if(mob.check_holy(T))
mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>" mob << "<span class='warning'>You cannot get past holy grounds while you are in this plane of existence!</span>"
return
else else
mob.loc = get_step(mob, direct) mob.loc = get_step(mob, direct)
mob.dir = direct mob.dir = direct