DayZ 1.24
Loading...
Searching...
No Matches
ActionCarHorn.c File Reference

Go to the source code of this file.

Classes

class  ActionCarHornBase
 
class  CarHornActionData
 
class  ActionCarHornLong
 

Functions

CarHornActionData ActionData ActionCarHornShort ()
 
override bool HasTarget ()
 
override bool HasProgress ()
 
override bool CanBeUsedInVehicle ()
 
override bool UseMainItem ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override ActionData CreateActionData ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnUpdate (ActionData action_data)
 special case - manually ends the action on exec event
 
override void OnEndInput (ActionData action_data)
 
override void OnStart (ActionData action_data)
 sets the m_ActionNeeded flag on both sides
 
override void OnStartServer (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 
override void WriteToContext (ParamsWriteContext ctx, ActionData action_data)
 
override bool ReadFromContext (ParamsReadContext ctx, out ActionReciveData action_recive_data)
 
override void HandleReciveData (ActionReciveData action_recive_data, ActionData action_data)
 

Variables

class ActionCarHornBase m_ActionNeedEnd
 
CarScript m_Car
 

Function Documentation

◆ ActionCarHornShort()

CarHornActionData ActionData ActionCarHornShort ( )

Definition at line 49 of file ActionCarHorn.c.

64 {
65 m_CallbackClass = ActionCarHornShortCB;
66 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_TOOTHORN;
67 m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL;
68 }
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and SetActions().

◆ ActionCondition()

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

Definition at line 107 of file ActionCarHorn.c.

108 {
110 }
static bool ActionCondition(PlayerBase player)

References ActionCarHornBase::ActionCondition().

◆ CanBeUsedInVehicle()

override bool CanBeUsedInVehicle ( )

Definition at line 80 of file ActionCarHorn.c.

81 {
82 return true;
83 }

◆ CreateActionData()

override ActionData CreateActionData ( )

Definition at line 101 of file ActionCarHorn.c.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 90 of file ActionCarHorn.c.

91 {
94 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override GetInputType ( )

Definition at line 96 of file ActionCarHorn.c.

97 {
99 }
void CarHornShortActionInput(PlayerBase player)

References CarHornShortActionInput().

◆ HandleReciveData()

override void HandleReciveData ( ActionReciveData action_recive_data,
ActionData action_data )

Definition at line 191 of file ActionCarHorn.c.

◆ HasProgress()

override bool HasProgress ( )

Definition at line 75 of file ActionCarHorn.c.

76 {
77 return false;
78 }

◆ HasTarget()

override bool HasTarget ( )

Definition at line 70 of file ActionCarHorn.c.

71 {
72 return false;
73 }

◆ OnEndInput()

override void OnEndInput ( ActionData action_data)

Definition at line 125 of file ActionCarHorn.c.

126 {
127 super.OnEndInput(action_data);
128
131 }
static void SetCarHornState(CarHornActionData pActionData, int pState)

References ActionCarHornBase::SetCarHornState().

◆ OnEndServer()

override void OnEndServer ( ActionData action_data)

◆ OnStart()

override void OnStart ( ActionData action_data)

sets the m_ActionNeeded flag on both sides

Definition at line 134 of file ActionCarHorn.c.

135 {
136 super.OnStart(action_data);
137
139 carHornData.m_ActionNeedEnd = true;
140 carHornData.m_Car = CarScript.Cast(action_data.m_Player.GetCommand_Vehicle().GetTransport());
141 }

◆ OnStartServer()

override void OnStartServer ( ActionData action_data)

◆ OnUpdate()

override void OnUpdate ( ActionData action_data)

special case - manually ends the action on exec event

Definition at line 113 of file ActionCarHorn.c.

114 {
115 super.OnUpdate(action_data);
116
118 if (carHornData.m_WasExecuted && carHornData.m_ActionNeedEnd)
119 {
120 carHornData.m_Callback.SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
121 carHornData.m_ActionNeedEnd = false;
122 }
123 }

◆ ReadFromContext()

override bool ReadFromContext ( ParamsReadContext ctx,
out ActionReciveData action_recive_data )

Definition at line 169 of file ActionCarHorn.c.

170 {
173
174 super.ReadFromContext(ctx, action_recive_data);
175
176 bool needUpdate;
177 if (!ctx.Read(needUpdate))
178 return false;
179
181 if (!ctx.Read(carScript))
182 return false;
183
185 carHornReceivedData.m_ActionNeedEnd = needUpdate;
187
188 return true;
189 }

◆ UseMainItem()

override bool UseMainItem ( )

Definition at line 85 of file ActionCarHorn.c.

86 {
87 return false;
88 }

◆ WriteToContext()

override void WriteToContext ( ParamsWriteContext ctx,
ActionData action_data )

Definition at line 159 of file ActionCarHorn.c.

160 {
161 super.WriteToContext(ctx, action_data);
162
164
165 ctx.Write(carHornData.m_ActionNeedEnd);
166 ctx.Write(carHornData.m_Car);
167 }

Variable Documentation

◆ m_ActionNeedEnd

bool m_ActionNeedEnd

Definition at line 64 of file ActionCarHorn.c.

◆ m_Car

CarScript m_Car

Definition at line 49 of file ActionCarHorn.c.