ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
138 stars 31 forks source link

Crashes #124

Closed ziggi closed 6 years ago

ziggi commented 6 years ago

1

FCNPC_Stop(botid);
FCNPC_DestroyMovePath(curPath);
FCNPC_GoByMovePath(botid, newPath, ...);

2

new fnpcid,VehicleID;
fnpcid = FCNPC_Create(stinnpc);
FCNPC_Spawn(fnpcid,191,0.0,0.0,0.0);
VehicleID = AddStaticVehicleEx(451,0, 0, 0,0,-1,-1,-1);
FCNPC_EnterVehicle(fnpcid,VehicleID,1,FCNPC_MOVE_T YPE_SPRINT);//Step 1 Enter the car

if (strcmp("/crash1", cmdtext, true, 10) == 0)
{
    if(FCNPC_GetVehicleID(fnpcid) != 65535)
    {
        SetVehicleToRespawn(VehicleID);//Step 2 removal of vehicles
        FCNPC_GoToPlayer(fnpcid,playerid,FCNPC_MOVE_TYPE_S PRINT,FCNPC_MOVE_SPEED_AUTO,false,0.0,true,-1.0,1.5,250);//Step 3 action
    }
}
if (strcmp("/crash2", cmdtext, true, 10) == 0)
{
    if(FCNPC_GetVehicleID(fnpcid) != 65535)
    {
        SetVehicleToRespawn(VehicleID);//Step 2 removal of vehicles
        FCNPC_Stop(fnpcid);//Step 3 action
    }
}
if (strcmp("/crash3", cmdtext, true, 10) == 0)
{
    if(FCNPC_GetVehicleID(fnpcid) != 65535)
    {
        SetVehicleToRespawn(VehicleID);//Step 2 removal of vehicles
        FCNPC_GoTo(fnpcid,3,5,2,FCNPC_MOVE_TYPE_SPRINT,FCN PC_MOVE_SPEED_AUTO,false,0.0,true,0.0,250);//Step 3 action
    }
}
//No FCNPC_ExitVehicle will collapse
ziggi commented 6 years ago

Can't reproduce the crashes. First one should be fixed in c337580eae921553309c26392da8f16ad0043b2a