Here is the actual function from the entmove.c file.
function ent_movepath(ENTITY* ent,char* pathname,var speed,var mode)
{
proc_kill2(ent_movepath,ent);
var vLastPos[3],vDir[3];
vec_set(vLastPos,ent.x);
var dist = 0;
if(pathname) path_set(ent,pathname);
while(speed)
{
// place the entity along the path
path_spline(ent,ent.x,dist);
dist += speed*time_step;
// adjust the entity to the floor
if(mode&1)
ent_placefloor(ent);
// let the entity look ahead in movement direction
if(mode&2) {
vec_diff(vDir,ent.x,vLastPos);
vec_to_angle(ent.pan,vDir);
vec_set(vLastPos,ent.x);
}
var ehandle = handle(ent);
wait(1);
ent = ptr_for_handle(ehandle);
}
}
As I fallow this, I think only if the MY pointer is invalid you would get e1513
You could include a local version of this function and not use the entmove.c version, then you can add some debugging to track it.
EDIT - When continuing after the e1513 , you state the monster walks blind forward. I would then think - if no other code is moving it - that path_spline is moving it, but failing somehow do to path_set being invaild.. However I'm not going to do a bunch of testing.
EDIT2 - One more note, path_spline moves the ent Without collision. For this reason I wrote my own path function. Based on what you report, I think the monster is moving without collsion to node 0/1(whatever) through the floor. That is why it pops up at the first node through from below the floor, Then the crash might be ent_placefloor()
Have fun
Mal