mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 21:45:58 +01:00
Makes movement delay calculation not round to the tick (#28616)
* Makes movement delay calculation not round to the tick * Fix some fuckups * How'd that get there * With squash merging I don't have to feel ashamed about this commit message
This commit is contained in:
committed by
Jordan Brown
parent
725173aeb5
commit
491bdace5d
@@ -109,10 +109,12 @@
|
||||
mob.control_object.loc = get_step(mob.control_object,direct)
|
||||
return
|
||||
|
||||
|
||||
#define MOVEMENT_DELAY_BUFFER 0.75
|
||||
#define MOVEMENT_DELAY_BUFFER_DELTA 1.25
|
||||
/client/Move(n, direct)
|
||||
if(world.time < move_delay)
|
||||
return 0
|
||||
var/old_move_delay = move_delay
|
||||
move_delay = world.time+world.tick_lag //this is here because Move() can now be called mutiple times per tick
|
||||
if(!mob || !mob.loc)
|
||||
return 0
|
||||
@@ -159,7 +161,11 @@
|
||||
|
||||
//We are now going to move
|
||||
moving = 1
|
||||
move_delay = mob.movement_delay() + world.time
|
||||
var/delay = mob.movement_delay()
|
||||
if (old_move_delay + (delay*MOVEMENT_DELAY_BUFFER_DELTA) + MOVEMENT_DELAY_BUFFER > world.time)
|
||||
move_delay = old_move_delay + delay
|
||||
else
|
||||
move_delay = delay + world.time
|
||||
|
||||
if(mob.confused)
|
||||
if(mob.confused > 40)
|
||||
@@ -190,6 +196,7 @@
|
||||
for(var/obj/O in contents)
|
||||
O.on_mob_turn(newDir, src)
|
||||
|
||||
|
||||
///Process_Grab()
|
||||
///Called by client/Move()
|
||||
///Checks to see if you are being grabbed and if so attemps to break it
|
||||
|
||||
Reference in New Issue
Block a user