Remove Move modification for now (readd later bits by bits.

This commit is contained in:
ESwordTheCat
2014-07-11 01:47:41 -08:00
parent 73e768c923
commit ec2b4154f5
9 changed files with 137 additions and 77 deletions

View File

@@ -13,7 +13,7 @@
// Otherwise jump
else
Move(get_turf(A))
loc = get_turf(A)
/mob/dead/observer/ClickOn(var/atom/A, var/params)
if(client.buildmode)

View File

@@ -364,13 +364,8 @@
if(ENVIRON)
master.used_environ += amount
/area/Exited(atom/movable/Obj)
. = ..()
Obj.lastarea = master
/area/Entered(atom/movable/Obj, atom/OldLoc)
. = ..()
var/area/oldAreaMaster = Obj.areaMaster
Obj.areaMaster = master
if (!ismob(Obj))
@@ -379,10 +374,10 @@
var/mob/M = Obj
// /vg/ - EVENTS!
CallHook("MobAreaChange", list("mob" = M, "new" = M.areaMaster, "old" = M.lastarea))
CallHook("MobAreaChange", list("mob" = M, "new" = Obj.areaMaster, "old" = oldAreaMaster))
// Being ready when you change areas gives you a chance to avoid falling all together.
if (!M.lastarea.has_gravity && M.areaMaster.has_gravity && M.m_intent == "run")
if (!oldAreaMaster.has_gravity && M.areaMaster.has_gravity && M.m_intent == "run")
thunk(M)
if (isnull(M.client))

View File

@@ -9,6 +9,7 @@
var/anchored = 0
var/move_speed = 10
var/l_move_time = 1
var/m_flag = 1
var/throwing = 0
var/throw_speed = 2
var/throw_range = 7
@@ -16,7 +17,6 @@
var/mob/pulledby = null
var/area/areaMaster
var/area/lastarea
var/global/guid = 0
// Garbage collection (controller).
@@ -27,12 +27,15 @@
areaMaster = get_area_master(src)
tag = "[++guid]"
/atom/movable/Move(NewLoc,Dir=0,step_x=0,step_y=0)
/atom/movable/Move()
var/atom/A = src.loc
. = ..()
if(.) // update on success
move_speed = world.timeofday - l_move_time
l_move_time = world.timeofday
src.move_speed = world.timeofday - src.l_move_time
src.l_move_time = world.timeofday
src.m_flag = 1
if ((A != src.loc && A && A.z == src.z))
src.last_move = get_dir(A, src.loc)
return
/atom/movable/proc/recycle(var/datum/materials/rec)
return 0

View File

@@ -73,8 +73,10 @@
// Ported from unstable r355
/turf/space/Entered(atom/movable/A as mob|obj)
. = ..()
if(movement_disabled)
usr << "\red Movement is admin-disabled." //This is to identify lag problems
return
..()
if ((!(A) || src != A.loc)) return
inertial_drift(A)

View File

@@ -63,68 +63,57 @@
..()
return 0
/turf/Enter(atom/movable/O, atom/oldloc)
. = ..()
if(movement_disabled)
if(ismob(O))
var/mob/mob = O
if(mob.client && mob.client.ckey != movement_disabled_exception)
mob << "\red movement is admin disabled."
return 0
if(isobserver(O))
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
if(movement_disabled && usr.ckey != movement_disabled_exception)
usr << "\red Movement is admin-disabled." //This is to identify lag problems
return
if (!mover || !isturf(mover.loc))
return 1
if (!O || !isturf(O.loc))
return 1
//First, check objects to block exit that are not on the border
for(var/obj/obstacle in O.loc)
if(!(obstacle.flags & ON_BORDER) && (O != obstacle) && (oldloc != obstacle))
if(!obstacle.CheckExit(O, src))
O.Bump(obstacle, 1)
for(var/obj/obstacle in mover.loc)
if(!(obstacle.flags & ON_BORDER) && (mover != obstacle) && (forget != obstacle))
if(!obstacle.CheckExit(mover, src))
mover.Bump(obstacle, 1)
return 0
//Now, check objects to block exit that are on the border
for(var/obj/border_obstacle in O.loc)
if((border_obstacle.flags & ON_BORDER) && (O != border_obstacle) && (oldloc != border_obstacle))
if(!border_obstacle.CheckExit(O, src))
O.Bump(border_obstacle, 1)
for(var/obj/border_obstacle in mover.loc)
if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle))
if(!border_obstacle.CheckExit(mover, src))
mover.Bump(border_obstacle, 1)
return 0
//Next, check objects to block entry that are on the border
for(var/obj/border_obstacle in src)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CanPass(O, O.loc, 1, 0) && (oldloc != border_obstacle))
O.Bump(border_obstacle, 1)
if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle))
mover.Bump(border_obstacle, 1)
return 0
//Then, check the turf itself
if (!src.CanPass(O, src))
O.Bump(src, 1)
if (!src.CanPass(mover, src))
mover.Bump(src, 1)
return 0
//Finally, check objects/mobs to block entry that are not on the border
for(var/atom/movable/obstacle in src)
if(obstacle.flags & ~ON_BORDER)
if(!obstacle.CanPass(O, O.loc, 1, 0) && (oldloc != obstacle))
O.Bump(obstacle, 1)
if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle))
mover.Bump(obstacle, 1)
return 0
return 1 //Nothing found to block so return success!
return 1
/turf/Entered(atom/movable/Obj,atom/OldLoc)
. = ..()
Obj.last_move = Obj.dir
if(isobserver(Obj))
return 1
/turf/Entered(atom/atom as mob|obj)
if(movement_disabled)
usr << "\red Movement is admin-disabled." //This is to identify lag problems
return
..()
//vvvvv Infared beam stuff vvvvv
if ((Obj && Obj.density && !( istype(Obj, /obj/effect/beam) )))
if ((atom && atom.density && !( istype(atom, /obj/effect/beam) )))
for(var/obj/effect/beam/i_beam/I in src)
spawn( 0 )
if (I)
@@ -133,7 +122,10 @@
//^^^^^ Infared beam stuff ^^^^^
var/atom/movable/M = Obj
if(!istype(atom, /atom/movable))
return
var/atom/movable/M = atom
var/loopsanity = 100
if(ismob(M))
@@ -148,9 +140,10 @@
*/
else if(!istype(src, /turf/space))
M:inertia_dir = 0
..()
var/objects = 0
for(var/atom/A as mob|obj|turf|area in src)
if(objects > loopsanity) break
@@ -189,6 +182,7 @@
return 0
/turf/proc/inertial_drift(atom/movable/A as mob|obj)
if(!(A.last_move)) return
if(istype(A, /obj/spacepod) && src.x > 2 && src.x < (world.maxx - 1) && src.y > 2 && src.y < (world.maxy-1))
var/obj/spacepod/SP = A
if(SP.Process_Spacemove(1))
@@ -221,7 +215,6 @@
if(M.inertia_dir)
step(M, M.inertia_dir)
return
M.inertia_dir = M.last_move
step(M, M.inertia_dir)
return
@@ -328,6 +321,7 @@
decals += decal
overlays += decal
//Commented out by SkyMarshal 5/10/13 - If you are patching up space, it should be vacuum.
// If you are replacing a wall, you have increased the volume of the room without increasing the amount of gas in it.
// As such, this will no longer be used.

View File

@@ -62,9 +62,11 @@
if (config.allow_admin_jump)
if(src.mob)
Move(locate(tx, ty, tz))
var/mob/A = src.mob
A.x = tx
A.y = ty
A.z = tz
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
else

View File

@@ -288,11 +288,34 @@ 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
/mob/dead/observer/Move(NewLoc,Dir=0,step_x=0,step_y=0)
. = ..()
/mob/dead/observer/Move(NewLoc, direct)
dir = direct
if(NewLoc)
loc = NewLoc
for(var/obj/effect/step_trigger/S in NewLoc)
S.HasEntered(src)
//for(var/obj/effect/step_trigger/step_trigger in loc)
//step_trigger.HasEntered(src)
var/area/A = get_area_master(src)
if(A)
A.Entered(src)
return
loc = get_turf(src) //Get out of closets and such as a ghost
if((direct & NORTH) && y < world.maxy)
y++
else if((direct & SOUTH) && y > 1)
y--
if((direct & EAST) && x < world.maxx)
x++
else if((direct & WEST) && x > 1)
x--
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
S.HasEntered(src)
var/area/A = get_area_master(src)
if(A)
A.Entered(src)
/mob/dead/observer/examine()
if(usr)

View File

@@ -200,6 +200,8 @@
var/status_flags = CANSTUN|CANWEAKEN|CANPARALYSE|CANPUSH //bitflags defining which status effects can be inflicted (replaces canweaken, canstun, etc)
var/area/lastarea = null
var/digitalcamo = 0 // Can they be tracked by the AI?
var/list/radar_blips = list() // list of screen objects, radar blips

View File

@@ -176,6 +176,43 @@
*/
return
/atom/movable/Move(NewLoc, direct)
if (direct & (direct - 1))
if (direct & 1)
if (direct & 4)
if (step(src, NORTH))
step(src, EAST)
else
if (step(src, EAST))
step(src, NORTH)
else
if (direct & 8)
if (step(src, NORTH))
step(src, WEST)
else
if (step(src, WEST))
step(src, NORTH)
else
if (direct & 2)
if (direct & 4)
if (step(src, SOUTH))
step(src, EAST)
else
if (step(src, EAST))
step(src, SOUTH)
else
if (direct & 8)
if (step(src, SOUTH))
step(src, WEST)
else
if (step(src, WEST))
step(src, SOUTH)
else
. = ..()
return
/client/proc/Move_object(direct)
if(mob && mob.control_object)
if(mob.control_object.density)
@@ -186,10 +223,12 @@
mob.control_object.loc = get_step(mob.control_object,direct)
return
/client/Move(loc,dir)
if(mob.control_object) Move_object(dir)
if(isobserver(mob)) return mob.Move(loc, dir)
/client/Move(n, direct)
if(mob.control_object) Move_object(direct)
if(isobserver(mob)) return mob.Move(n,direct)
if(moving) return 0
@@ -204,20 +243,20 @@
if(mob.stat==2) return
if(isAI(mob)) return AIMove(loc,dir,mob)
if(isAI(mob)) return AIMove(n,direct,mob)
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)
Process_Incorpmove(direct)
return
if(Process_Grab()) return
if(mob.buckled) //if we're buckled to something, tell it we moved.
return mob.buckled.relaymove(mob, dir)
return mob.buckled.relaymove(mob, direct)
if(!mob.canmove) return
@@ -233,7 +272,7 @@
if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved
var/atom/O = mob.loc
return O.relaymove(mob, dir)
return O.relaymove(mob, direct)
if(isturf(mob.loc))
@@ -297,7 +336,7 @@
M.animate_movement = 3
for(var/mob/M in L)
spawn( 0 )
step(M, dir)
step(M, direct)
return
spawn( 1 )
M.other_mobs = null
@@ -305,7 +344,7 @@
return
else if(mob.confused)
step_rand(mob)
step(mob, pick(cardinal))
mob.last_movement=world.time
else
. = ..()
@@ -426,7 +465,7 @@
else
if((istype(turf,/turf/simulated/floor)) && (src.lastarea && src.lastarea.has_gravity == 0)) // No one else gets a chance.
if((istype(turf,/turf/simulated/floor)) && (src.lastarea.has_gravity == 0)) // No one else gets a chance.
continue