DayZ 1.24
Loading...
Searching...
No Matches
ArrowManagerBase.c
Go to the documentation of this file.
2{
3 protected const int VERSION = 2;
5 protected EntityAI m_Owner;
6
12
14 {
15 m_Arrows.Insert(arrow);
16 }
17
19 {
20 m_Arrows.RemoveItem(arrow);
21 }
22
24 {
25 foreach (EntityAI arrow : m_Arrows)
26 {
27 if (arrow)
28 arrow.DeleteSafe();
29 }
30
31 m_Arrows.Clear();
32 }
33
35 {
36 return m_Arrows.Count();
37 }
38
39 void DropArrow(int index)
40 {
41 if (m_Arrows.Count() > index)
42 {
44 vector pos = arrow.GetPosition();
45
46 m_Owner.RemoveChild(arrow);
47
48 vector m4[4];
50 m4[3] = pos;
51
52 arrow.PlaceOnSurfaceRotated(m4, pos);
53
54 arrow.SetTransform(m4);
55 arrow.PlaceOnSurface();
56 }
57 }
58
60 {
61 DropArrow(0);
62 }
63
65 {
66 for (int i = m_Arrows.Count() - 1; i >= 0 ; i--)
67 DropArrow(i);
68 }
69
71 {
72 if (m_Arrows.Count() > index)
73 return m_Arrows.Get(index);
74
75 return null;
76 }
77
79 {
80 if (m_Arrows.Count())
81 return m_Arrows.Get(0);
82
83 return null;
84 }
85
87 {
89 m_Owner.RemoveChild(entity, keepTransform);
90 return entity;
91 }
92
93}
ref array< EntityAI > m_Arrows
void ArrowManagerBase(EntityAI owner)
EntityAI GetArrow(int index)
EntityAI AcquireFirstArrow(bool keepTransform=false)
EntityAI GetFirstArrow()
void RemoveArrow(EntityAI arrow)
void AddArrow(EntityAI arrow)
void DropArrow(int index)
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Definition EnMath3D.c:233