Skip to content

Commit d63d11a

Browse files
committed
Match zNPCGoalRespawn::Process
1 parent 401531d commit d63d11a

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/SB/Game/zNPCGoalRobo.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,6 +3444,39 @@ S32 zNPCGoalRespawn::Exit(F32 dt, void* updCtxt)
34443444
return xGoal::Exit(dt, updCtxt);
34453445
}
34463446

3447+
S32 zNPCGoalRespawn::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* xscn)
3448+
{
3449+
S32 nextgoal = 0;
3450+
zNPCRobot* npc = (zNPCRobot*)(psyche->clt_owner);
3451+
if (tmr_respawn < 0.0f)
3452+
{
3453+
*trantype = GOAL_TRAN_SET;
3454+
nextgoal = NPC_GOAL_ALERT;
3455+
}
3456+
if (*trantype != GOAL_TRAN_NONE)
3457+
{
3458+
return nextgoal;
3459+
}
3460+
if ((tmr_robobits < 0.0f) ? 1 : 0)
3461+
{
3462+
if (!xEntIsVisible(npc))
3463+
{
3464+
npc->SndPlayRandom(NPC_STYP_RESPAWN);
3465+
xEntShow(npc);
3466+
npc->model->Flags |= 4;
3467+
npc->model->Flags |= 2;
3468+
}
3469+
DoAppearFX(dt);
3470+
tmr_respawn = MAX(-1.0f, (tmr_respawn - dt));
3471+
}
3472+
else
3473+
{
3474+
tmr_robobits = MAX(-1.0f, (tmr_robobits - dt));
3475+
}
3476+
npc->VelStop();
3477+
return xGoal::Process(trantype, dt, updCtxt, xscn);
3478+
}
3479+
34473480
S32 zNPCGoalRespawn::InputInfo(NPCSpawnInfo* info)
34483481
{
34493482
zNPCRobot* npc = ((zNPCRobot*)(psyche->clt_owner));

0 commit comments

Comments
 (0)