Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIDecoCombatMove_AimingAllowed.c
Go to the documentation of this file.
1 class SCR_AIDecoCombatMove_AimingAllowed : DecoratorScripted
2 {
3  protected SCR_AICombatMoveState m_State;
4  protected SCR_AIUtilityComponent m_Utility;
5 
6  override bool TestFunction(AIAgent owner)
7  {
8  if (!m_State)
9  {
10  m_Utility = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
11  if (m_Utility)
12  m_State = m_Utility.m_CombatMoveState;
13  if (!m_State)
14  return false;
15  }
16 
17  SCR_AIBehaviorBase behavior = SCR_AIBehaviorBase.Cast(m_Utility.GetExecutedAction());
18 
19  // If behavior doesn't use Combat Movement tree, then Combat Movement restrictions don't matter
20  if (behavior && !behavior.m_bUseCombatMove)
21  return true;
22 
23  return m_State.m_bAimAtTarget;
24  }
25 
26  override string GetOnHoverDescription() { return "Returns m_bAimAtTarget from Combat Move State"; }
27  override bool VisibleInPalette() { return true; }
28 }
SCR_AIDecoCombatMove_AimingAllowed
Definition: SCR_AIDecoCombatMove_AimingAllowed.c:1
m_State
private EEditableEntityState m_State
Definition: SCR_BaseEntitiesEditorUIEffect.c:3
SCR_AIBehaviorBase
Definition: SCR_AIBehavior.c:1