mob/proc
jump()
velocity_y = 20
jumping = TRUE
dir_before_jump = dir
mob/move()
if(jumping)
layer = MOB_LAYER + 10
if(elevation + velocity_y > get_elevation())
if(abs(velocity_y) == velocity_y)
icon_state = "jump ascend"
else
icon_state = "jump descend"
elevation += velocity_y
step_y += velocity_y/2
dir = dir_before_jump
velocity_y -= gravity
else
jumping = FALSE
icon_state = ""
layer = MOB_LAYER
pixel_y = 0
..()
It seems that whenever I jump, when I enter a new tile, the game tries to change my direction to NORTH. The dir_before_jump part was my effort to stop it from doing this, but it still flashes north and is very noticable. Enter() and Entered() are never called when directly modifying step_y; so what do I need to do to stop this?
If you're calling mob.Move() somewhere that might be changing your direction.