mob
player
Bump(obj/O)
if(istype(O,/obj/crate))
flick("push",src)
step(O,src.dir)
step(src,src.dir)
The runtime error occurs every time the crate is pushed into a dense a.t.o.m. If you keep pushing it into the wall, runtime errors keep coming until it disconnects you from the game. Maybe its not caused by the crate touching a dense atom but maybe its when the player can't walk into the crate, I dont know. Please assist.
Runtime Error:
_______________________________________________________
runtime error: Maximum recursion level reached (perhaps there is an infinite loop)
To avoid this safety check, set world.loop_checks=0.
proc name: Bump (/mob/player/Bump)
usr: Leon (/mob/player/Stars)
src: Leon (/mob/player/Stars)
call stack:
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
...
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Leon (/mob/player/Stars): Bump(the crate (/obj/crate))
Cloudiroth (/client): North()
__________________________________________________________
It's pretty easy to fix, though. step() returns a 1 if it succeeds/can move, and a 0 if it doesn't. Simple check if the crate's step() worked before doing the player's step().