Skip to content

Commit

Permalink
Made observer ghosts use the incorporeal move proc instead of snowfla…
Browse files Browse the repository at this point in the history
…ke city, can be easily undone if this fucks something up
  • Loading branch information
d3athrow committed Sep 18, 2014
1 parent 5768ac5 commit 71869fc
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
7 changes: 4 additions & 3 deletions code/modules/mob/dead/observer/observer.dm
Expand Up @@ -30,7 +30,7 @@
var/antagHUD = 0
universal_speak = 1
var/atom/movable/following = null

incorporeal_move = 1


/mob/dead/observer/New(var/mob/body=null, var/flags=1)
Expand Down Expand Up @@ -302,6 +302,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/proc/reset_poltergeist_cooldown()
next_poltergeist=0

/* WHY
/mob/dead/observer/Move(NewLoc, direct)
dir = direct
if(NewLoc)
Expand All @@ -324,13 +325,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
else if((direct & WEST) && x > 1)
x--
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
for(var/obj/effect/step_trigger/S in get_turf(src)) //<-- this is dumb
S.Crossed(src)
var/area/A = get_area_master(src)
if(A)
A.Entered(src)

*/
/mob/dead/observer/examine()
if(usr)
usr << desc
Expand Down
1 change: 0 additions & 1 deletion code/modules/mob/living/living_defines.dm
Expand Up @@ -24,7 +24,6 @@
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.

//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.

var/t_plasma = null
var/t_oxygen = null
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/mob_defines.dm
Expand Up @@ -13,7 +13,7 @@
var/nextAllowedAttack //When we can next attack a protected entity
var/attackDelayUnarmed = 8 //Ticks between unarmed attacks


var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak

//Not in use yet
Expand Down Expand Up @@ -237,3 +237,6 @@

// /vg/ - Prevent mobs from being moved by a client.
var/deny_client_move = 0

//So ghosts and adminbus mobs move the same way through walls.
var/incorporeal_move = 0
40 changes: 21 additions & 19 deletions code/modules/mob/mob_movement.dm
Expand Up @@ -195,7 +195,9 @@

if(mob.control_object) Move_object(dir)

if(isobserver(mob)) return mob.Move(loc, dir)
if(mob.incorporeal_move)
Process_Incorpmove(dir)
return

if(moving) return 0

Expand All @@ -212,11 +214,7 @@

if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var

if(isliving(mob))
var/mob/living/L = mob
if(L.incorporeal_move)//Move though walls
Process_Incorpmove(dir)
return


if(Process_Grab()) return

Expand Down Expand Up @@ -354,13 +352,11 @@
///Allows mobs to run though walls
/client/proc/Process_Incorpmove(direct)
var/turf/mobloc = get_turf(mob)
if(!isliving(mob))
return
var/mob/living/L = mob
switch(L.incorporeal_move)
if(1)
L.loc = get_step(L, direct)
L.dir = direct

switch(mob.incorporeal_move)
if(1 || isobserver(mob))
mob.loc = get_step(mob, direct)
mob.dir = direct
if(2)
if(prob(50))
var/locx
Expand Down Expand Up @@ -388,19 +384,25 @@
return
else
return
L.loc = locate(locx,locy,mobloc.z)
mob.loc = locate(locx,locy,mobloc.z)
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, L.loc))
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,L,'icons/mob/mob.dmi',,"shadow",,L.dir)
anim(T,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,L.dir)
L.loc = get_step(L, direct)
L.dir = direct
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
mob.loc = get_step(mob, direct)
mob.dir = direct
for(var/obj/effect/step_trigger/S in mob.loc)
S.Crossed(src)

var/area/A = get_area_master(mob)
if(A)
A.Entered(mob)
return 1


Expand Down

0 comments on commit 71869fc

Please sign in to comment.