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

simple class starting animation action specified by m_action and m_actionType More...

Collaboration diagram for HandStartAction:
[legend]

Private Member Functions

void HandForceSwapingAnimated_Show (Man player=null, HandStateBase parent=null, WeaponActions action=WeaponActions.NONE, int actionType=-1)
 
override void OnEntry (HandEventBase e)
 
override void OnAbort (HandEventBase e)
 
override void OnExit (HandEventBase e)
 
override bool IsWaitingForActionFinish ()
 
void HandStartHidingAnimated (Man player=null, HandStateBase parent=null, WeaponActions action=WeaponActions.NONE, int actionType=-1)
 
override void OnEntry (HandEventBase e)
 
override void OnAbort (HandEventBase e)
 
override void OnExit (HandEventBase e)
 
override bool IsWaitingForActionFinish ()
 
override void OnEntry (HandEventBase e)
 
override void OnAbort (HandEventBase e)
 
override void OnExit (HandEventBase e)
 
override bool IsWaitingForActionFinish ()
 
void HandTakingAnimated_Show (Man player=null, HandStateBase parent=null, WeaponActions action=WeaponActions.NONE, int actionType=-1)
 
override void OnEntry (HandEventBase e)
 
override void OnAbort (HandEventBase e)
 
override void OnExit (HandEventBase e)
 
override bool IsWaitingForActionFinish ()
 

Private Attributes

ref InventoryLocation m_Src1 = null
 
ref InventoryLocation m_Src2 = null
 
ref InventoryLocation m_Dst1 = null
 
ref InventoryLocation m_Dst2 = null
 
ref InventoryLocation m_Dst
 
ref InventoryLocation m_Src
 

Detailed Description

simple class starting animation action specified by m_action and m_actionType

Definition at line 53 of file HandAnimatedForceSwapping.c.

Member Function Documentation

◆ HandForceSwapingAnimated_Show()

void HandStartAction::HandForceSwapingAnimated_Show ( Man player = null,
HandStateBase parent = null,
WeaponActions action = WeaponActions.NONE,
int actionType = -1 )
inlineprivate

Definition at line 60 of file HandAnimatedForceSwapping.c.

60{ }

◆ HandStartHidingAnimated()

void HandStartAction::HandStartHidingAnimated ( Man player = null,
HandStateBase parent = null,
WeaponActions action = WeaponActions.NONE,
int actionType = -1 )
inlineprivate

Definition at line 3 of file HandAnimatedMovingToAtt.c.

4 { }

◆ HandTakingAnimated_Show()

void HandStartAction::HandTakingAnimated_Show ( Man player = null,
HandStateBase parent = null,
WeaponActions action = WeaponActions.NONE,
int actionType = -1 )
inlineprivate

Definition at line 9 of file HandAnimatedTakingFromAtt.c.

10 {
11 m_Src = null;
12 m_Dst = null;
13 }
ref InventoryLocation m_Src
ref InventoryLocation m_Dst

References m_Src.

◆ IsWaitingForActionFinish() [1/4]

override bool HandStartAction::IsWaitingForActionFinish ( )
inlineprivate

Definition at line 105 of file HandAnimatedForceSwapping.c.

105{ return true; }

◆ IsWaitingForActionFinish() [2/4]

override bool HandStartAction::IsWaitingForActionFinish ( )
inlineprivate

Definition at line 21 of file HandAnimatedMovingToAtt.c.

21{ return m_ActionType == -1; }

◆ IsWaitingForActionFinish() [3/4]

override bool HandStartAction::IsWaitingForActionFinish ( )
inlineprivate

Definition at line 73 of file HandAnimatedMovingToAtt.c.

73{ return true; }

◆ IsWaitingForActionFinish() [4/4]

override bool HandStartAction::IsWaitingForActionFinish ( )
inlineprivate

Definition at line 59 of file HandAnimatedTakingFromAtt.c.

59{ return true; }

◆ OnAbort() [1/4]

override void HandStartAction::OnAbort ( HandEventBase e)
inlineprivate

Definition at line 87 of file HandAnimatedForceSwapping.c.

88 {
89 m_Src1 = null;
90 m_Src2 = null;
91 m_Dst1 = null;
92 m_Dst2 = null;
93 super.OnAbort(e);
94 }
ref InventoryLocation m_Src2
ref InventoryLocation m_Dst2
ref InventoryLocation m_Dst1
ref InventoryLocation m_Src1

◆ OnAbort() [2/4]

override void HandStartAction::OnAbort ( HandEventBase e)
inlineprivate

Definition at line 11 of file HandAnimatedMovingToAtt.c.

12 {
13 super.OnAbort(e);
14 }

◆ OnAbort() [3/4]

override void HandStartAction::OnAbort ( HandEventBase e)
inlineprivate

Definition at line 61 of file HandAnimatedMovingToAtt.c.

62 {
63 m_Dst = null;
64 super.OnAbort(e);
65 }

◆ OnAbort() [4/4]

override void HandStartAction::OnAbort ( HandEventBase e)
inlineprivate

Definition at line 45 of file HandAnimatedTakingFromAtt.c.

46 {
47 m_Src = null;
48 m_Dst = null;
49 super.OnAbort(e);
50 }

References m_Src.

◆ OnEntry() [1/4]

override void HandStartAction::OnEntry ( HandEventBase e)
inlineprivate

TODO(kumarjac): THIS IS WHAT IS BEING CALLED FOR SOME REASON!!!!!

Definition at line 62 of file HandAnimatedForceSwapping.c.

63 {
64 if (m_Src1 && m_Src2 && m_Dst1 && m_Dst2)
65 {
66 //InventoryLocation dummy;
67 //dummy.Copy(m_Dst2);
68 //if (GameInventory.CanForceSwapEntitiesEx(m_Src1.GetItem(), m_Dst1, m_Src2.GetItem(), dummy) && dummy == m_Dst2)
69 //{
70
72
74 e.m_Player.OnItemInHandsChanged();
75 //}
76 //else
77 //{
78 // if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] HandForceSwapingAnimated_Show - not allowed");
79 //}
80 }
81 else
82 Error("[hndfsm] HandForceSwappingAnimated_Show is not properly configured!");
83
84 super.OnEntry(e);
85 }
script counterpart to engine's class Inventory
Definition Inventory.c:79
static proto native bool LocationSwap(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
swaps two entities
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

References Error(), and GameInventory::LocationSwap().

◆ OnEntry() [2/4]

override void HandStartAction::OnEntry ( HandEventBase e)
inlineprivate

Definition at line 6 of file HandAnimatedMovingToAtt.c.

7 {
8 super.OnEntry(e);
9 }

◆ OnEntry() [3/4]

override void HandStartAction::OnEntry ( HandEventBase e)
inlineprivate

Definition at line 30 of file HandAnimatedMovingToAtt.c.

31 {
32 Man player = e.m_Player;
33 if (m_Dst && m_Dst.IsValid())
34 {
35 EntityAI item = m_Dst.GetItem();
37 if (item.GetInventory().GetCurrentInventoryLocation(src))
38 {
40 {
42 player.OnItemInHandsChanged();
43 }
44 else
45 {
46#ifdef DEVELOPER
48 Debug.InventoryHFSMLog("[hndfsm] HandAnimatedMoveToDst_W4T - not allowed");
49#endif
50 }
51 }
52 else
53 Error("[hndfsm] " + Object.GetDebugName(e.m_Player) + " STS = " + e.m_Player.GetSimulationTimeStamp() + " HandAnimatedMoveToDst_W4T - item " + item + " has no Inventory or Location, inv=" + item.GetInventory());
54 }
55 else
56 Error("[hndfsm] HandAnimatedMoveToDst_W4T - event has no valid m_Dst");
57
58 super.OnEntry(e);
59 }
Definition Debug.c:14
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:183
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...
static proto native bool LocationCanMoveEntity(notnull InventoryLocation src, notnull InventoryLocation dst)
queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthan...
InventoryLocation.
static bool IsInventoryHFSMLogEnable()
Definition Debug.c:749

References Error(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationCanMoveEntity(), and GameInventory::LocationSyncMoveEntity().

◆ OnEntry() [4/4]

override void HandStartAction::OnEntry ( HandEventBase e)
inlineprivate

Definition at line 15 of file HandAnimatedTakingFromAtt.c.

16 {
17 super.OnEntry(e);
18
19 if (m_Src)
20 {
21 if (m_Src.IsValid())
22 {
23#ifdef DEVELOPER
25 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "OnEntry", e.m_Player.ToString());
26#endif
27
28 //if (GameInventory.LocationCanMoveEntity(m_Src, m_Dst))
29 //{
31 e.m_Player.OnItemInHandsChanged();
32 //}
33 //else
34 //{
35 // if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[hndfsm] HandTakingAnimated_Show - not allowed");
36 //}
37 }
38 else
39 Error("[hndfsm] " + Object.GetDebugName(e.m_Player) + " STS = " + e.m_Player.GetSimulationTimeStamp() + " HandTakingAnimated_Show m_Src=invalid, item not in bubble?");
40 }
41 else
42 Error("[hndfsm] HandTakingAnimated_Show, error - m_Src not configured");
43 }

References Error(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), GameInventory::LocationSyncMoveEntity(), and m_Src.

◆ OnExit() [1/4]

override void HandStartAction::OnExit ( HandEventBase e)
inlineprivate

Definition at line 96 of file HandAnimatedForceSwapping.c.

97 {
98 m_Src1 = null;
99 m_Src2 = null;
100 m_Dst1 = null;
101 m_Dst2 = null;
102 super.OnExit(e);
103 }

◆ OnExit() [2/4]

override void HandStartAction::OnExit ( HandEventBase e)
inlineprivate

Definition at line 16 of file HandAnimatedMovingToAtt.c.

17 {
18 super.OnExit(e);
19 }

◆ OnExit() [3/4]

override void HandStartAction::OnExit ( HandEventBase e)
inlineprivate

Definition at line 67 of file HandAnimatedMovingToAtt.c.

68 {
69 m_Dst = null;
70 super.OnExit(e);
71 }

◆ OnExit() [4/4]

override void HandStartAction::OnExit ( HandEventBase e)
inlineprivate

Definition at line 52 of file HandAnimatedTakingFromAtt.c.

53 {
54 m_Src = null;
55 m_Dst = null;
56 super.OnExit(e);
57 }

References m_Src.

Member Data Documentation

◆ m_Dst

ref InventoryLocation HandStartAction::m_Dst
private

Definition at line 28 of file HandAnimatedMovingToAtt.c.

◆ m_Dst1

ref InventoryLocation HandStartAction::m_Dst1 = null
private

Definition at line 57 of file HandAnimatedForceSwapping.c.

◆ m_Dst2

ref InventoryLocation HandStartAction::m_Dst2 = null
private

Definition at line 58 of file HandAnimatedForceSwapping.c.

◆ m_Src

ref InventoryLocation HandStartAction::m_Src
private

Definition at line 6 of file HandAnimatedTakingFromAtt.c.

◆ m_Src1

ref InventoryLocation HandStartAction::m_Src1 = null
private

Definition at line 55 of file HandAnimatedForceSwapping.c.

◆ m_Src2

ref InventoryLocation HandStartAction::m_Src2 = null
private

Definition at line 56 of file HandAnimatedForceSwapping.c.


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