ID:2223591
 
So will this work good or is there a better option?? Should I use animate??
(I will increase step_size to 4 this is just for a test) Please do not reply by telling me to use the default glide movement :)

proc/Glide(mob/ref,Dir,lag)
set waitfor=0
for(var/i=1; i<=16; i++)
if(Dir==NORTH) ref.pixel_y+=1
if(Dir==SOUTH) ref.pixel_y-=1
if(Dir==EAST) ref.pixel_x+=1
if(Dir==WEST) ref.pixel_x-=1
if(Dir==NORTHEAST) {ref.pixel_y+=1;ref.pixel_x+=1}
if(Dir==NORTHWEST) {ref.pixel_y+=1;ref.pixel_x-=1}
if(Dir==SOUTHEAST) {ref.pixel_y-=1;ref.pixel_x+=1}
if(Dir==SOUTHWEST) {ref.pixel_y-=1;ref.pixel_x-=1}
sleep(lag/16)

step(ref,Dir,16)
ref.pixel_y=0
ref.pixel_x=0

All of this is just... why? I mean I guess theoretically it should work, but just... why?
:$
well it does work but should I do that or animate?? I want a glide movement with pixel movement. But I do not want to change step values.
In response to Victorqr
This "glide" is purely visual. You'd have to adjust bounding boxes to account for the visual/actual physical location disparities.
yeah I just want to simulate the default glide not change bound values they are handled by step