Mob movement now works on world.timeofday instead of world.time.

I've tested each mobtype with this and didn't see any issues but as always, it's possible that I've missed something. If it's an issue let me know. If it's a critical issue, go ahead and revert.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4578 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-08-28 17:48:32 +00:00
parent ecd5a2283d
commit 1a92acefa7

View File

@@ -263,7 +263,9 @@
if(moving) return 0
if(world.time < move_delay) return
if(move_delay >= 864000) move_delay -= 864000
if(world.timeofday < move_delay) return
if(!mob) return
@@ -310,7 +312,7 @@
src << "\blue You're restrained! You can't move!"
return 0
move_delay = world.time//set move delay
move_delay = world.timeofday//set move delay
switch(mob.m_intent)
if("run")
@@ -333,7 +335,7 @@
moving = 1
//Something with pulling things
if(locate(/obj/item/weapon/grab, mob))
move_delay = max(move_delay, world.time + 7)
move_delay = max(move_delay, world.timeofday + 7)
var/list/L = mob.ret_grab()
if(istype(L, /list))
if(L.len == 2)
@@ -391,12 +393,12 @@
for(var/obj/item/weapon/grab/G in mob.grabbed_by)
if((G.state == 1)&&(!grabbing.Find(G.assailant))) del(G)
if(G.state == 2)
move_delay = world.time + 10
move_delay = world.timeofday + 10
if(!prob(25)) return 1
mob.visible_message("\red [mob] has broken free of [G.assailant]'s grip!")
del(G)
if(G.state == 3)
move_delay = world.time + 10
move_delay = world.timeofday + 10
if(!prob(5)) return 1
mob.visible_message("\red [mob] has broken free of [G.assailant]'s headlock!")
del(G)