5 [
Attribute(defvalue:
"1",
desc:
"Unequip items in hand before doing emote?")]
6 protected bool m_bUnequipItems;
8 [
Attribute(defvalue:
"0",
desc:
"ID of the gesture in gesture state machine to be played, 0 = no gesture")]
9 protected int m_iGestureID;
11 [
Attribute(uiwidget: UIWidgets.SearchComboBox,
desc:
"Available stances. All stances allowed if empty", enums: ParamEnumArray.FromEnum(
ECharacterStance))]
12 protected ref array<ref ECharacterStance> m_aAllowedStances;
15 override bool Execute(IEntity cursorTarget, IEntity target, vector targetPosition,
int playerID,
bool isClient)
21 IEntity playerControlledEntity =
GetGame().GetPlayerController().GetControlledEntity();
23 if (!playerControlledEntity)
27 if (!characterComponent)
34 if (m_bUnequipItems && (gadgetManager.GetHeldGadget() || characterComponent.GetWeaponManagerComponent().GetCurrentWeapon()))
36 if (characterComponent.IsGadgetInHands())
37 characterComponent.RemoveGadgetFromHand();
38 characterComponent.SelectWeapon(
null);
41 GetGame().GetCallqueue().CallLater(characterComponent.TryStartCharacterGesture, 1500,
false, m_iGestureID, 2000 );
46 characterComponent.TryStartCharacterGesture(m_iGestureID, 2000);
51 override bool CanBePerformed()
53 IEntity playerControlledEntity =
GetGame().GetPlayerController().GetControlledEntity();
55 if (!playerControlledEntity)
59 if (!characterComponent)
62 if (m_aAllowedStances.IsEmpty())
65 return (m_aAllowedStances.Contains(characterComponent.GetStance()));