15 BotStateBase m_ParentState;
18 void BotStateBase (Bot bot = NULL, BotStateBase parent = NULL) { m_Bot = bot;
m_Owner = bot.m_Owner; m_ParentState = parent; }
20 PlayerBase GetPlayerOwner() {
return m_Owner; }
25 void SetParentState (BotStateBase parent) { m_ParentState = parent; }
29 BotStateBase GetParentState () {
return m_ParentState; }
31 bool HasFSM () {
return m_FSM != NULL; }
32 BotFSM GetFSM () {
return m_FSM; }
37 return m_FSM.ProcessEvent(e);
47 m_FSM.AddTransition(t);
49 Error(
"[botfsm] adding transition to state without FSM. Configure FSM first.");
60 if (HasFSM() && !m_FSM.IsRunning())
62 botDebugPrint(
"[botfsm] { " + this.
Type().
ToString() +
" Has Sub-FSM! Starting submachine...");
76 if (HasFSM() && m_FSM.IsRunning())
77 m_FSM.GetCurrentState().OnUpdate(dt);
86 if (HasFSM() && m_FSM.IsRunning())
88 botDebugPrint(
"[botfsm] OnAbort " + this.
Type().
ToString() +
" Has Sub-FSM! Aborting submachine...");
91 botDebugPrint(
"[botfsm] } ABORTED " + this.
Type().
ToString());
98 void OnExit (BotEventBase e)
113 bool IsIdle () {
return false; }
120 void OnSubMachineChanged (BotStateBase src, BotStateBase dst) { }
127 void OnStateChanged (BotStateBase src, BotStateBase dst) { }
130class BotStateIdle : BotStateBase
132 void BotStateIdle (Bot bot = NULL, BotStateBase parent = NULL) { m_Bot = bot;
m_Owner = m_Bot.m_Owner; m_ParentState = parent; }
134 override bool IsIdle () {
return true; }
HandStateEquipped OnEntry
enum ProcessDirectDamageFlags m_Owner
void ProcessEvent(EPresenceNotifierNoiseEventType pEventType)
processing of external one-time events (land, fire, etc.)
class WeaponChambering extends WeaponStateBase IsWaitingForActionFinish
class WeaponChambering_Chamber_OnEntry extends WeaponChambering_Base OnExit
override bool IsWaitingForActionFinish()
waiting for active animation action/actionType finish
void Error(string err)
Messagebox with error message.