ID:270046
 
Ok quik question how would i stop monster diagonal movement ive tryed doing it the same way as you would for a client but came up empty handed with errors out the rump.plese help me.
You can use a crude way by overwriting the monster's Move() proc to never do diagonals, but instead turning the direction 45 degrees.

mob/Monster/Move(l, d)
if(d & d - 1)
d = turn(d, 45) // turn 45 degrees if it is diagonal
..(l, d) // call the regular Move() proc, except with the new direction


~~> Unknown Person
In response to Unknown Person
Why not just turn in a random direction?
d &= pick(3, 12)

Of course you also need to recalculate the new location. In fact it's probably best to check if either direction is open first. If both are open or both closed, pick the north/south or east/west component at random. Otherwise, pick the open one.

Lummox JR