ID:143334
 
Code:
obj
Projectile
New()
..()
walk(src,src.dir,1)
spawn(rand(5,10))
var/od=dir
if(dir==EAST||dir==WEST)
step(src,pick(NORTH,SOUTH)
if(dir==NORTH||dir==SOUTH)
step(src,pick(EAST,WEST)
dir=od


Problem description:
The above code makes a projectile, after being created, go in its direction constantly, and after 5-10 ticks, it strays off a tile. This is perfectly fine, except for one little problem. When it is moving east or west, you can actually see the projectile turning up or down for a brief moment, but when it's moving north or south, you don't see it turn.

Bottom Line:
If you have a horizontal line being the east and west dirs, and a vertical line being north and south, it would move horizontally, and flick vertically and back horizontally. I don't want that to happen.

I wasn't sure if this belonged in the Coding Problems section or the Bug Report section, but I'll leave it to the moderators to move it if need be.