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

Private Member Functions

void ActionAnimateCarSelection ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 

Private Attributes

string m_AnimSource = ""
 

Detailed Description

Definition at line 1 of file ActionAnimateCarSelection.c.

Constructor & Destructor Documentation

◆ ActionAnimateCarSelection()

void ActionAnimateCarSelection::ActionAnimateCarSelection ( )
inlineprivate

Definition at line 5 of file ActionAnimateCarSelection.c.

6 {
7 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_OPENDOORFW;
8 m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL;
9 m_Text = "#manipulate";
10 }
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_CommandUID, m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 18 of file ActionAnimateCarSelection.c.

19 {
20 if (!target)
21 return false;
22
24 return false;
25
26 Object targetObject = target.GetObject();
28
30 targetObject.GetActionComponentNameList(target.GetComponentIndex(), selections);
31
34 {
35 for (int i = 0; i < selections.Count(); i++)
36 {
37 m_AnimSource = car.GetAnimSourceFromSelection(selections[i]);
38 if (m_AnimSource != "")
39 return true;
40 }
41 }
42
43 return false;
44 }
bool IsInReach(PlayerBase player, ActionTarget target, float maxDistance=1.0)
Definition ActionBase.c:856
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition Camera.c:2
const float DEFAULT
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), UAMaxDistances::DEFAULT, IsInReach(), and m_AnimSource.

◆ CreateConditionComponents()

override void ActionAnimateCarSelection::CreateConditionComponents ( )
inlineprivate

Definition at line 12 of file ActionAnimateCarSelection.c.

13 {
16 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ OnEndServer()

override void ActionAnimateCarSelection::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 63 of file ActionAnimateCarSelection.c.

64 {
66 if (Class.CastTo(car, action_data.m_Target.GetObject()))
67 car.ForceUpdateLightsEnd();
68 }

References Class::CastTo().

◆ OnStartServer()

override void ActionAnimateCarSelection::OnStartServer ( ActionData action_data)
inlineprivate

Definition at line 46 of file ActionAnimateCarSelection.c.

47 {
49 if (Class.CastTo(targetEnt, action_data.m_Target.GetObject()))
50 {
51 if (targetEnt.GetAnimationPhase(m_AnimSource) > 0.5)
52 targetEnt.SetAnimationPhase(m_AnimSource, 0.0);
53
54 if (targetEnt.GetAnimationPhase(m_AnimSource) <= 0.5)
55 targetEnt.SetAnimationPhase(m_AnimSource, 1.0);
56 }
57
59 if (Class.CastTo(car, action_data.m_Target.GetObject()))
60 car.ForceUpdateLightsStart();
61 }

References Class::CastTo(), and m_AnimSource.

Member Data Documentation

◆ m_AnimSource

string ActionAnimateCarSelection::m_AnimSource = ""
private

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