mob
var
tmp
move_delay = 0.4
next_move = 0
Move(NewLoc, Dir, step_x, step_y, force=0)
if(force)
if(src.loc)
src.loc.Exited(src)
if(src.loc.loc)
src.loc.loc.Exited(src)
src.loc = NewLoc
src.loc.Entered(src)
src.loc.loc.Entered(src)
return 1
if(src.shopping || src.next_move > world.time)
return 0
..()
src.next_move = world.time+src.move_delay
mob
Read(var/savefile/s)
..()
src.Move(locate(s["save_x"],s["save_y"],s["save_z"]),SOUTH,0,0,1)
Problem description:
If I change the move_delay to 0, I do not get that obscene amount of Move() calls. It becomes normal (like 3 or whatever). But 0.4 makes it horrendous. Not sure what's going on, or how something like a small number can mean that much of a difference.
The second bit of code is what's calling the Move() proc and that's it. All I'm doing is loading a mob and the Read() proc places that mob onto the map where it was saved last. I'm not doing anything else. Move() is being called once here and it's generating a huge amount of Move() calls for no reason.
...in Move() to...
...fixed it. Strange because the code being executed shouldn'tve ever hit that far into Move() since force was set to 1 and returns after setting the location directly.