From 1a92acefa7da9ea2f333627ecf059ef7a9706ee1 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Tue, 28 Aug 2012 17:48:32 +0000 Subject: [PATCH] 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 --- code/modules/mob/mob_movement.dm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index f6aca1e5b0..0f386d734f 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -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)