ID:156473
 
http://www.byond.com/members/ DreamMakers?command=view_post&post=34835

this is the link to a speed limiting and enhancement tutorial and i was quite intrested in the 'Rotaional movement' enhancement.

the problem is, is that when i try to use rotational mevoment and the speed limiters. the speed isn't limited.

mob
var
move_delay = 5 // how many ticks the player must wait between movements
tmp // these vars are not saved
move_time = 0 // the earliest time the mob may move

client
Move()
if(world.time < mob.move_time) // not enough time passed
return

// set the move_time for move_delay ticks from now
mob.move_time = world.time + mob.move_delay
return ..() // do the default Move() proc and return what it returns

North()
step(mob,mob.dir) // make the mob step forward.
South()
// find the turf behind the mob
var/turf/T = get_step(mob, turn(mob.dir,180))
mob.Move(T,mob.dir) // move to T, but keep facing the current direction
East()
// turn the mob 45 degrees clockwise
mob.dir = turn(mob.dir, -90)
West()
// turn the mob 45 degrees counterclockwise
mob.dir = turn(mob.dir, 90)
// override the diagonals so they do nothing
Northeast()
Northwest()
Southeast()
Southwest()


so basically the lower you make the move_delay variable the more often the mob is allowed to move therefore making it faster. but.......it just doesn't happen, the mob moves at the default speed
Because the North(), South(), East(), and West() procs are bypassing client/Move() entirely. You need to call client/Move() if you want client/Move() to be executed.
In response to Garthor
mob
var
move_delay = 5
tmp
move_time = 0

client
North()
if(world.time < mob.move_time
return


mob.move_time = world.time + mob.move_delaywhat it returns
step(mob,mob.dir)
South()
var/turf/T = get_step(mob, turn(mob.dir,180))
mob.Move(T,mob.dir)
East()
mob.dir = turn(mob.dir, -90)
West()
mob.dir = turn(mob.dir, 90)
Northeast()
Northwest()
Southeast()
Southwest()


this is what i came up with and i'm wondering if this is efficient.