DayZ 1.24
Loading...
Searching...
No Matches
ActionUnrestrainTargetHands Class Reference
Inheritance diagram for ActionUnrestrainTargetHands:
[legend]
Collaboration diagram for ActionUnrestrainTargetHands:
[legend]

Private Member Functions

void ActionUnrestrainTargetHands ()
 
override GetInputType ()
 
override void OnStartServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
override void OnStartClient (ActionData action_data)
 
override void OnEndClient (ActionData action_data)
 
- Private Member Functions inherited from ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Detailed Description

Definition at line 23 of file ActionUnrestrainTargetEmpty.c.

Constructor & Destructor Documentation

◆ ActionUnrestrainTargetHands()

void ActionUnrestrainTargetHands::ActionUnrestrainTargetHands ( )
inlineprivate

Definition at line 25 of file ActionUnrestrainTargetEmpty.c.

26 {
28 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_RESTRAINTARGET;
29 m_FullBody = true;
30 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
31 m_Text = "#unrestrain";
32 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CallbackClass, AnimatedActionBase::m_CommandUID, m_FullBody, m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionUnrestrainTargetHands::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 56 of file ActionUnrestrainTargetEmpty.c.

57 {
58 PlayerBase targetPlayer = PlayerBase.Cast(target.GetObject());
59 return targetPlayer && targetPlayer.IsRestrained();
60 }

◆ CreateConditionComponents()

override void ActionUnrestrainTargetHands::CreateConditionComponents ( )
inlineprivate

Definition at line 50 of file ActionUnrestrainTargetEmpty.c.

51 {
54 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override ActionUnrestrainTargetHands::GetInputType ( )
inlineprivate

◆ OnEndClient()

override void ActionUnrestrainTargetHands::OnEndClient ( ActionData action_data)
inlineprivate

Definition at line 82 of file ActionUnrestrainTargetEmpty.c.

83 {
84 if (action_data.m_Player) action_data.m_Player.TryHideItemInHands(false);
85 }

◆ OnEndServer()

override void ActionUnrestrainTargetHands::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 45 of file ActionUnrestrainTargetEmpty.c.

46 {
47 action_data.m_Player.TryHideItemInHands(false);
48 }

◆ OnFinishProgressServer()

override void ActionUnrestrainTargetHands::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 62 of file ActionUnrestrainTargetEmpty.c.

63 {
64 PlayerBase targetPlayer = PlayerBase.Cast(action_data.m_Target.GetObject());
65
66 if (CanReceiveAction(action_data.m_Target) && targetPlayer.IsRestrained())
67 {
68 EntityAI item_in_hands = targetPlayer.GetItemInHands();
69 targetPlayer.SetRestrained(false);
70 if (item_in_hands)
71 MiscGameplayFunctions.TransformRestrainItem(item_in_hands, null, action_data.m_Player, targetPlayer);
72 else
73 ErrorEx("Failed to obtain item in target player's hands during empty handed unrestraining");
74 }
75 }
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594
enum ShapeType ErrorEx

References CanReceiveAction(), and ErrorEx.

◆ OnStartClient()

override void ActionUnrestrainTargetHands::OnStartClient ( ActionData action_data)
inlineprivate

Definition at line 77 of file ActionUnrestrainTargetEmpty.c.

78 {
79 action_data.m_Player.TryHideItemInHands(true);
80 }

◆ OnStartServer()

override void ActionUnrestrainTargetHands::OnStartServer ( ActionData action_data)
inlineprivate

Definition at line 40 of file ActionUnrestrainTargetEmpty.c.

41 {
42 action_data.m_Player.TryHideItemInHands(true);
43 }

The documentation for this class was generated from the following file: