DayZ 1.24
Loading...
Searching...
No Matches
Hand_States.c
Go to the documentation of this file.
2
4{
5 UNKNOWN = 0,
6 Empty = 1,
7 Equipped = 2,
8}
9
11{
12 override void OnEntry(HandEventBase e)
13 {
14 if (e)
15 {
16 switch (e.m_EventID)
17 {
18 case HandEventID.MOVETO:
19 if (HumanInventory.HasInventoryReservation(e.GetSrcEntity(), e.GetDst()))
20 HumanInventory.ClearInventoryReservation(e.GetSrcEntity(), e.GetDst());
21 break;
22
23 default: {};
24 }
25 }
26 super.OnEntry(e);
27 }
28 override void OnExit(HandEventBase e) { super.OnExit(e); }
29 override int GetCurrentStateID() { return HandStateID.Empty; }
30};
31
33{
34 override void OnEntry(HandEventBase e)
35 {
36 if (e)
37 {
38 switch (e.m_EventID)
39 {
40 case HandEventID.MOVETO:
41 if (HumanInventory.HasInventoryReservation(e.GetSrcEntity(), e.GetDst()))
42 HumanInventory.ClearInventoryReservation(e.GetSrcEntity(), e.GetDst());
43 break;
44
45 default: {};
46 }
47 }
48 super.OnEntry(e);
49 }
50 override void OnExit(HandEventBase e)
51 {
52 /*switch (e.m_EventID)
53 {
54 case HandEventID.MOVETO:
55 if (HumanInventory.HasInventoryReservation(e.GetSrcEntity(), e.GetDst()))
56 HumanInventory.ClearInventoryReservation(e.GetSrcEntity(), e.GetDst());
57 break;
58
59 default: {};
60 }*/
61 super.OnExit(e);
62 }
63 override int GetCurrentStateID() { return HandStateID.Equipped; }
64};
65
67
HandEventID
events
Definition Hand_Events.c:7
HandStateID
states
Definition Hand_States.c:4
UNKNOWN
Definition Hand_States.c:13
override int GetCurrentStateID()
Definition Hand_States.c:29
override void OnExit(HandEventBase e)
Definition Hand_States.c:28
HandStateEquipped OnEntry
Empty
Definition Hand_States.c:14
Equipped
Definition Hand_States.c:15
static proto native bool ClearInventoryReservation(EntityAI item, InventoryLocation dst)
static proto native bool HasInventoryReservation(EntityAI item, InventoryLocation dst)
Internally: HasInventoryReservationEx(item, dst, FindInventoryReservationMode.LEGACY,...
Abstracted event, not to be used, only inherited.
represents stable state (i.e. the basic states that the fsm will spend the most time in)
override void OnExit(HandEventBase e)
Definition Hand_States.c:50
override void OnEntry(HandEventBase e)
Definition Hand_States.c:34
override int GetCurrentStateID()
Definition Hand_States.c:63
inventory for plain man/human