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

Private Member Functions

void ActionWorldFlagActionSwitch ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 
override bool IsInstant ()
 
override bool RemoveForceTargetAfterUse ()
 
override GetInputType ()
 
void SetFlagTendencyOnCurrentActionInvalid (bool state)
 

Private Attributes

bool m_switch_to
 

Detailed Description

Definition at line 11 of file ActionWorldFlagActionSwitch.c.

Constructor & Destructor Documentation

◆ ActionWorldFlagActionSwitch()

void ActionWorldFlagActionSwitch::ActionWorldFlagActionSwitch ( )
inlineprivate

Definition at line 14 of file ActionWorldFlagActionSwitch.c.

15 {
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
17 }
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References m_StanceMask.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 32 of file ActionWorldFlagActionSwitch.c.

33 {
34 TerritoryFlag totem = TerritoryFlag.Cast(target.GetObject());
35 if (!totem)
36 return false;
37
38 float state = totem.GetAnimationPhase("flag_mast");
39
40 if (totem && totem.FindAttachmentBySlotName("Material_FPole_Flag"))
41 {
42 if (player.GetFlagTendencyRaise() && state < 1)
43 {
44 m_switch_to = true;
45 return true;
46 }
47 else if (!player.GetFlagTendencyRaise() && state > 0)
48 {
49 m_switch_to = false;
50 return true;
51 }
52 }
53 return false;
54 }

References m_switch_to.

◆ CreateConditionComponents()

override void ActionWorldFlagActionSwitch::CreateConditionComponents ( )
inlineprivate

Definition at line 19 of file ActionWorldFlagActionSwitch.c.

20 {
23 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override ActionWorldFlagActionSwitch::GetInputType ( )
inlineprivate

Definition at line 74 of file ActionWorldFlagActionSwitch.c.

◆ IsInstant()

override bool ActionWorldFlagActionSwitch::IsInstant ( )
inlineprivate

Definition at line 64 of file ActionWorldFlagActionSwitch.c.

65 {
66 return true;
67 }

◆ RemoveForceTargetAfterUse()

override bool ActionWorldFlagActionSwitch::RemoveForceTargetAfterUse ( )
inlineprivate

Definition at line 69 of file ActionWorldFlagActionSwitch.c.

70 {
71 return false;
72 }

◆ SetFlagTendencyOnCurrentActionInvalid()

void ActionWorldFlagActionSwitch::SetFlagTendencyOnCurrentActionInvalid ( bool state)
inlineprivate

Definition at line 79 of file ActionWorldFlagActionSwitch.c.

80 {
81
82 }

◆ Start()

override void ActionWorldFlagActionSwitch::Start ( ActionData action_data)
inlineprivate

Definition at line 56 of file ActionWorldFlagActionSwitch.c.

57 {
58 super.Start(action_data);
59
60 bool state = action_data.m_Player.GetFlagTendencyRaise();
61 action_data.m_Player.SetFlagTendencyRaise(!state);
62 }

Member Data Documentation

◆ m_switch_to

bool ActionWorldFlagActionSwitch::m_switch_to
private

Definition at line 13 of file ActionWorldFlagActionSwitch.c.

Referenced by ActionCondition().


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