mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Just prevents SSinput from constantly calling Move() every tick for every user even when no actual movement is requested. Only done rudimentary testing - straightforward and we've been using this for months on CM13 but without diagonal movement. I asked the original SSinput author back then which said that it was likely an oversight. I believe moving the diagonal movement direction buffer reset to keyLoop instead of Move() also makes sense as it is actually relevant to SSinput and not client actions as a whole (eg. if you call built-in movement verbs) Co-authored-by: fira <loyauflorian@gmail.com>
This commit is contained in:
@@ -7,8 +7,13 @@
|
||||
movement_dir = movement_dir | user.movement_keys[_key]
|
||||
if(user.next_move_dir_add)
|
||||
movement_dir |= user.next_move_dir_add
|
||||
user.next_move_dir_add = 0
|
||||
if(user.next_move_dir_sub)
|
||||
movement_dir &= ~user.next_move_dir_sub
|
||||
user.next_move_dir_sub = 0
|
||||
if(!movement_dir)
|
||||
return
|
||||
|
||||
// Sanity checks in case you hold left and right and up to make sure you only go up
|
||||
if((movement_dir & NORTH) && (movement_dir & SOUTH))
|
||||
movement_dir &= ~(NORTH|SOUTH)
|
||||
|
||||
@@ -69,9 +69,6 @@
|
||||
/client/Move(new_loc, direct)
|
||||
if(world.time < move_delay) //do not move anything ahead of this check please
|
||||
return FALSE
|
||||
else
|
||||
next_move_dir_add = 0
|
||||
next_move_dir_sub = 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)
|
||||
|
||||
Reference in New Issue
Block a user