mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-09 12:08:12 +03:00
Finalized actor_patrol
This commit is contained in:
parent
adf081ba3c
commit
6f58b34f87
1 changed files with 34 additions and 30 deletions
|
@ -47,13 +47,16 @@ void Actor::End_Patrol(void)
|
|||
parm.movefail = true;
|
||||
}
|
||||
|
||||
void Actor::Resume_Patrol(void)
|
||||
{
|
||||
}
|
||||
void Actor::Resume_Patrol(void) {}
|
||||
|
||||
void Actor::Think_Patrol(void)
|
||||
{
|
||||
if (Actor::RequireThink()) {
|
||||
bool bMoveInRadius;
|
||||
|
||||
if (!RequireThink()) {
|
||||
return;
|
||||
}
|
||||
|
||||
parm.movefail = false;
|
||||
|
||||
UpdateEyeOrigin();
|
||||
|
@ -61,28 +64,29 @@ void Actor::Think_Patrol(void)
|
|||
|
||||
m_pszDebugState = "";
|
||||
m_csPatrolCurrentAnim = STRING_ANIM_PATROL_SCR;
|
||||
bMoveInRadius = MoveToPatrolCurrentNode();
|
||||
|
||||
if (m_fLookAroundFov > 1.0) {
|
||||
LookAround(m_fLookAroundFov);
|
||||
}
|
||||
|
||||
CheckForThinkStateTransition();
|
||||
if (m_patrolCurrentNode) {
|
||||
if (!MoveToPatrolCurrentNode()) {
|
||||
PostThink(true);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!m_patrolCurrentNode) {
|
||||
SetThinkIdle(THINK_IDLE);
|
||||
m_bScriptGoalValid = false;
|
||||
}
|
||||
parm.movedone = true;
|
||||
|
||||
parm.movedone = true;
|
||||
Unregister(STRING_MOVEDONE);
|
||||
} else if (bMoveInRadius) {
|
||||
ClearPatrolCurrentNode();
|
||||
SetThinkIdle(THINK_IDLE);
|
||||
|
||||
parm.movedone = true;
|
||||
Unregister(STRING_MOVEDONE);
|
||||
}
|
||||
|
||||
PostThink(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void Actor::ShowInfo_Patrol(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue