ID:270971
 
How do you set it, so that mobs in the game cannot go daigonally.
Only the Basic North,East,South,West?
client
Northwest() return
Northeast() return
Southwest() return
Southeast() return

returns no value for diagonal directions.
In response to Sosuko
That can still make mobs move sideways, such as from walk_rand().

mob/Move()
if((src.dir&(NORTH|SOUTH))&&(src.dir&(EAST|WEST))) return 0
.=..()


I know there was a faster way...

---
Ah, according to Unknown Person in BYONDscape, this should work as well:
mob/Move()
if((src.dir&(src.dir - 1))) return 0
.=..()


Reason why I have double brackets is for safety measures..

Maybe you should make it atom/movable/Move() for even more safety...

- GhostAnime