mob/proc
TELEPORT(mob/M)
if(prob(50))
Move(locate(M.x-rand(2, 8), M.y-rand(2, 8), M.z))
else
Move(locate(M.x+rand(2, 8), M.y+rand(2, 8), M.z))
M.Move(get_step(usr, usr.dir))
flick('Zanzo.dmi', M)
flick('Zanzo.dmi', src)
M.dir=get_dir(M, src)
Problem description:
Basically, everything works fine until the usr teleports and is facing a dense tile, or a map boundry. When that happens, the M just doesn't teleport to infront of the player. How would I go about solving this problem?