mob
proc
MoveLoop()
set waitfor = 0
if(move_loop!=null) return
move_loop = world.time
var/diag, steps = super_speed ? 1 : 0
while(move_dir)
if(!speed_run)
diag = move_dir&move_dir-1
// icon_state = run ? "Run" : null //best to do this elsewhere.
if(!step(src,move_dir)&&diag)
step(src,diag)||step(src,move_dir-diag)
if(steps++)
sleep(1+GetMovementSpeed())
else
sleep(GetMovementSpeed())
move_loop = null
icon_state = null
verb
MoveKey(dir as num,state as num) //replace all of your MoveNorth, etc verbs with this single verb. state is 0 or 1 for release or press. dir is 1 for NORTH, 2 for SOUTH, 4 for EAST, 8 for WEST.
set hidden = 1
set instant = 1
var/opp = turn(dir,180), okey = move_keys
if(state)
move_keys |= dir
move_dir |= dir
if(move_dir&opp)
move_dir &= ~opp
else
move_keys &= ~dir
move_dir &= ~dir
if(move_keys&opp)
move_dir |= opp
if(!okey&&move_keys)
spawn(0) //this is to allow pending verbs to fire before the move loop executes
MoveLoop()
Also even with no movedelay and faster movement speed this makes my character run pretty slow.
http://www.byond.com/forum/?post=1978909