DayZ 1.24
Loading...
Searching...
No Matches
ActionContinuousBaseCB Class Reference

Inherits ActionBaseCB.

Inherited by ActionActivateTrapCB [private], ActionArmExplosiveCB [private], ActionAttachExplosivesTriggerCB [private], ActionBandageSelfCB [private], ActionBandageTargetCB [private], ActionBreakLongWoodenStickCB [private], ActionBuildOvenCB [private], ActionBuildPartCB [private], ActionBuildStoneCircleCB [private], ActionBurnSewSelfCB [private], ActionBurnSewTargetCB [private], ActionBuryAshesCB [private], ActionBuryBodyCB [private], ActionCPRCB [private], ActionCheckPulseTargetCB [private], ActionCollectBloodSelfCB [private], ActionCollectBloodTargetCB [private], ActionCollectSampleSelfCB [private], ActionCollectSampleTargetCB [private], ActionConsumeCB [private], ActionCookOnStickCB [private], ActionCoverHeadSelfCB [private], ActionCoverHeadTargetCB [private], ActionCraftArmbandCB [private], ActionCraftBoltsCB [private], ActionCraftBoltsFeatherCB [private], ActionCraftBoneKnifeCB [private], ActionCraftBoneKnifeEnvCB [private], ActionCraftCB [private], ActionCraftImprovisedEyePatchCB [private], ActionCraftImprovisedFaceCoverCB [private], ActionCraftImprovisedFeetCoverCB [private], ActionCraftImprovisedHandsCoverCB [private], ActionCraftImprovisedHeadCoverCB [private], ActionCraftImprovisedLegsCoverCB [private], ActionCraftImprovisedTorsoCoverCB [private], ActionCraftRopeBeltCB [private], ActionCraftStoneKnifeEnvCB [private], ActionCreateGreenhouseGardenPlotCB [private], ActionDeCraftDrysackBagCB [private], ActionDeCraftRopeBeltCB [private], ActionDeCraftWitchHoodCoifCB [private], ActionDefibrilateSelfCB [private], ActionDefibrilateTargetCB [private], ActionDestroyCombinationLockCB [private], ActionDestroyPartCB [private], ActionDialCombinationLockCB [private], ActionDialCombinationLockOnTargetCB [private], ActionDigInStashCB [private], ActionDigOutStashCB [private], ActionDigWormsCB [private], ActionDisarmExplosiveCB [private], ActionDisarmMineCB [private], ActionDisinfectPlantCB [private], ActionDisinfectSelfCB [private], ActionDisinfectTargetCB [private], ActionDismantleGardenPlotCB [private], ActionDismantleOvenCB [private], ActionDismantlePartCB [private], ActionDismantleStoneCircleCB [private], ActionDrainLiquidCB [private], ActionDrinkCB [private], ActionDrinkPondContinuousCB [private], ActionDrinkWellContinuousCB [private], ActionEatBigCB [private], ActionEatCanCB [private], ActionEatFruitCB [private], ActionEatMeatCB [private], ActionEatSmallCanCB [private], ActionEmptyBottleBaseCB [private], ActionExtinguishFireplaceByExtinguisherCB [private], ActionExtinguishFireplaceByLiquidCB [private], ActionFeedVitaminBottleCB [private], ActionFertilizeSlotCB [private], ActionFillBottleBaseCB [private], ActionFillBrakesCB [private], ActionFillCoolantCB [private], ActionFillFuelCB [private], ActionFillGeneratorTankCB [private], ActionFillObjectCB [private], ActionFillOilCB [private], ActionFoldBaseBuildingObjectCB [private], ActionForceConsumeCB [private], ActionForceDrinkCB [private], ActionForceFeedCB [private], ActionForceFeedMeatCB [private], ActionForceFeedSmallCB [private], ActionGiveBloodTargetCB [private], ActionGiveSalineSelfCB [private], ActionGiveSalineTargetCB [private], ActionIgniteFireplaceByAirCB [private], ActionLightItemOnFireCB [private], ActionLoadMagazineCB [private], ActionLoadMagazineQuickCB [private], ActionLockDoorsCB [private], ActionManipulateFlagCB [private], ActionMeasureTemperatureSelfCB [private], ActionMeasureTemperatureTargetCB [private], ActionMineBushCB [private], ActionMineRockCB [private], ActionMountBarbedWireCB [private], ActionPackGiftCB [private], ActionPackTentCB [private], ActionPlaceOnGroundCB [private], ActionPourLiquidCB [private], ActionRaiseAndViewCB [private], ActionRaiseMegaphoneCB [private], ActionReadPaperCB [private], ActionRepackTentCB [private], ActionRepairCarChassisCB [private], ActionRepairCarEngineCB [private], ActionRepairCarPartCB [private], ActionRepairItemWithBlowtorchCB [private], ActionRepairPartCB [private], ActionRepairTentCB [private], ActionRepairTentPartCB [private], ActionRestrainSelfCB [private], ActionRestrainTargetCB [private], ActionSawPlanksCB [private], ActionSetAlarmClockCB [private], ActionSetKitchenTimerCB [private], ActionSewSelfCB [private], ActionSewTargetCB [private], ActionShaveCB [private], ActionShaveTargetCB [private], ActionSkinningCB [private], ActionSortAmmoPileCB [private], ActionSplintSelfCB [private], ActionSplintTargetCB [private], ActionStartCarCB [private], ActionStripCarrierVestCB [private], ActionTestBloodSelfCB [private], ActionTestBloodTargetCB [private], ActionTransferLiquidCB [private], ActionTuneFrequencyCB [private], ActionTuneRadioStationCB [private], ActionTurnValveCB [private], ActionUncoverHeadSelfCB [private], ActionUncoverHeadTargetCB [private], ActionUnlockDoorsCB [private], ActionUnmountBarbedWireCB [private], ActionUnpackBoxCB [private], ActionUnpackGiftCB [private], ActionUnrestrainSelfCB [private], ActionUnrestrainTargetCB [private], ActionUnrestrainTargetHandsCB [private], ActionUpgradeTorchFromGasPumpCB [private], ActionUseRangefinderCB [private], ActionWashHandsItemContinuousCB [private], ActionWashHandsWaterCB [private], ActionWashHandsWellCB [private], ActionWaterGardenSlotCB [private], ActionWaterPlantCB [private], ActionWorldCraftCB [private], ActionWringClothesCB [private], and ActionWritePaperCB [private].

Collaboration diagram for ActionContinuousBaseCB:
[legend]

Private Member Functions

bool CancelCondition ()
 
override void OnAnimationEvent (int pEventID)
 
override void InitActionComponent ()
 
override void EndActionComponent ()
 
void UserEndsAction ()
 
- Private Member Functions inherited from ActionBaseCB
void ActionBaseCB ()
 
int GetPossileStanceMask ()
 
override void OnFinish (bool pCanceled)
 
void SetCommand (int command_uid)
 
void CreateActionComponent ()
 
void InitActionComponent ()
 
void ProgressActionComponent ()
 
void EndActionComponent ()
 
void Interrupt ()
 
void SetActionData (ActionData action_data)
 
override bool IsUserActionCallback ()
 
float GetActionComponentProgress ()
 
int GetActionState ()
 
ActionTarget GetTarget ()
 

Private Attributes

bool m_inLoop = false
 
bool m_callLoopEnd = false
 
- Private Attributes inherited from ActionBaseCB
ActionData m_ActionData
 
SoundOnVehicle m_SoundObject
 
bool m_Canceled
 
bool m_Interrupted
 

Detailed Description

Definition at line 1 of file ActionContinuousBase.c.

Member Function Documentation

◆ CancelCondition()

bool ActionContinuousBaseCB::CancelCondition ( )
inlineprivate

Definition at line 6 of file ActionContinuousBase.c.

7 {
8 if (!m_ActionData)
11 {
14 {
15 actionS.OnStartAnimationLoop(m_ActionData);
17 m_callLoopEnd = true;
18 }
19
20 if (!m_Interrupted)
22 }
23 else if (m_callLoopEnd == true)
24 {
26 actionE.OnEndAnimationLoop(m_ActionData);
27 m_callLoopEnd = false;
28 }
30 }
ActionData m_ActionData
ref ActionBase m_Action
Definition ActionBase.c:27
const int UA_INITIALIZE
Definition constants.c:444
const int UA_PROCESSING
Definition constants.c:434
static const int STATE_LOOP_LOOP
Definition human.c:352
proto native int GetState()
returns one of STATE_...
static const int STATE_LOOP_LOOP2
Definition human.c:355
proto native bool DefaultCancelCondition()
system implemented cancel condition (now raise or sprint cancels action)

References DefaultCancelCondition(), GetState(), ActionData::m_Action, ActionBaseCB::m_ActionData, m_callLoopEnd, m_inLoop, ActionBaseCB::m_Interrupted, ActionData::m_State, STATE_LOOP_LOOP, STATE_LOOP_LOOP2, UA_INITIALIZE, and UA_PROCESSING.

◆ EndActionComponent()

override void ActionContinuousBaseCB::EndActionComponent ( )
inlineprivate

Definition at line 85 of file ActionContinuousBase.c.

86 {
87 // TODO for second type animation SetCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
89 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
90 else if (m_ActionData.m_State == UA_CANCEL)
91 {
93 if (action.HasAlternativeInterrupt())
94 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_FINISH);
95 else
96 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
97 m_Canceled = true;
98 return;
99 //Cancel();
100 }
101 else
102 {
103 m_Canceled = true;
104 SetCommand(DayZPlayerConstants.CMD_ACTIONINT_END);
105 return;
106 }
108 }
void SetCommand(int command_uid)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
const int UA_FINISHED
Definition constants.c:436
const int UA_CANCEL
Definition constants.c:437

References ActionData::m_Action, ActionBaseCB::m_ActionData, ActionBaseCB::m_Canceled, ActionData::m_State, ActionBaseCB::SetCommand(), UA_CANCEL, and UA_FINISHED.

Referenced by UserEndsAction().

◆ InitActionComponent()

override void ActionContinuousBaseCB::InitActionComponent ( )
inlineprivate

Definition at line 68 of file ActionContinuousBase.c.

69 {
70 m_Interrupted = false;
71 m_Canceled = false;
72 m_inLoop = false;
73
78 RegisterAnimationEvent("ActionExecStart", UA_IN_START);
79 RegisterAnimationEvent("ActionExecEnd", UA_IN_END);
83 }
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
void CreateActionComponent()
SoundOnVehicle m_SoundObject
PlayerBase m_Player
Definition ActionBase.c:33
ref CABase m_ActionComponent
Definition ActionBase.c:30
const int UA_IN_START
Definition constants.c:449
const int UA_ANIM_EVENT
Definition constants.c:443
const int UA_IN_END
Definition constants.c:450
proto native void EnableCancelCondition(bool pEnable)

References ActionBaseCB::CreateActionComponent(), EnableCancelCondition(), ActionData::m_Action, ActionData::m_ActionComponent, ActionBaseCB::m_ActionData, ActionBaseCB::m_Canceled, m_inLoop, ActionBaseCB::m_Interrupted, ActionData::m_Player, ActionBaseCB::m_SoundObject, ActionData::m_State, RegisterAnimationEvent(), UA_ANIM_EVENT, UA_IN_END, UA_IN_START, and UA_INITIALIZE.

◆ OnAnimationEvent()

override void ActionContinuousBaseCB::OnAnimationEvent ( int pEventID)
inlineprivate

Definition at line 33 of file ActionContinuousBase.c.

34 {
36 {
38#ifdef DEVELOPER
39 //Print("ActionInteractBase.c | OnAnimationEvent | OnAnimationEvent called");
40#endif
41
43 Debug.ActionLog("Time stamp: " + m_ActionData.m_Player.GetSimulationTimeStamp() + " / " + pEventID, this.ToString(), "n/a", "OnAnimationEvent", m_ActionData.m_Player.ToString());
44
46 {
47 m_inLoop = true;
48 //ActionContinuousBase.Cast(action).OnStartLoop( m_ActionData );
49 }
50 else if (!m_Interrupted && pEventID == UA_IN_END)
51 {
52
53 m_inLoop = false;
54 //ActionContinuousBase.Cast(action).OnCompleteLoop( m_ActionData );
55 }
56 else if (!m_Interrupted && pEventID == UA_ANIM_EVENT)
57 {
58 action.OnAnimationEvent(m_ActionData);
59 //action.OnCompleteLoop( m_ActionData );
60 }
61 }
62 else
63 {
64 //Debug.LogError("Call OnAnimationEvent ")
65 }
66 }
Definition Debug.c:14
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:143
static bool IsActionLogEnable()
Definition Debug.c:719

References Debug::ActionLog(), LogManager::IsActionLogEnable(), ActionData::m_Action, ActionBaseCB::m_ActionData, m_inLoop, ActionBaseCB::m_Interrupted, ActionData::m_Player, UA_ANIM_EVENT, UA_IN_END, and UA_IN_START.

◆ UserEndsAction()

void ActionContinuousBaseCB::UserEndsAction ( )
inlineprivate

Member Data Documentation

◆ m_callLoopEnd

bool ActionContinuousBaseCB::m_callLoopEnd = false
private

Definition at line 4 of file ActionContinuousBase.c.

Referenced by CancelCondition().

◆ m_inLoop

bool ActionContinuousBaseCB::m_inLoop = false
private

Definition at line 3 of file ActionContinuousBase.c.

Referenced by CancelCondition(), InitActionComponent(), and OnAnimationEvent().


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