DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ComponentEntityDebug.c
См. документацию.
1class ComponentEntityDebug extends Component
2{
3
6 protected float m_DebugShapeDirectionDist;
7
8 // -------------------------------------------------------------------------
10 {
11 #ifndef DEVELOPER
12 return null;
13 #endif
14
15 if ( m_DebugShapeBBox )
16 m_DebugShapeBBox.Destroy();
17
18 vector min_max[2];
19
20 if (!m_ThisEntityAI.GetCollisionBox(min_max))
21 return null;
22
23 m_DebugShapeBBox = Debug.DrawBox(min_max[0], min_max[1]);
24
25 g_Game.GetCallQueue(CALL_CATEGORY_GUI).CallLater(OnDrawing, 0, true);
26
27 m_ThisEntityAI.SetEventMask(EntityEvent.FRAME);
28
29 return null;
30 }
31
32 // -------------------------------------------------------------------------
33 override void DebugBBoxSetColor(int color)
34 {
35 if ( m_DebugShapeBBox )
36 {
37 m_DebugShapeBBox.SetColor(color);
38 }
39 }
40
41 // -------------------------------------------------------------------------
42 override void DebugBBoxDelete()
43 {
44 #ifndef DEVELOPER
45 return;
46 #endif
47
48 if ( m_DebugShapeBBox )
49 {
50 m_DebugShapeBBox.Destroy();
51 m_DebugShapeBBox = null;
52 }
53
55 {
56 g_Game.GetCallQueue(CALL_CATEGORY_GUI).Remove(OnDrawing);
57 }
58 }
59
60 // -------------------------------------------------------------------------
61 override Shape DebugDirectionDraw(float distance = 1)
62 {
63 #ifndef DEVELOPER
64 return null;
65 #endif
66
68 {
69 m_DebugShapeDirection.Destroy();
70 }
71
72 vector p1 = "0 0 0";
76
77 g_Game.GetCallQueue(CALL_CATEGORY_GUI).CallLater(OnDrawing, 0, true);
78
79 m_ThisEntityAI.SetEventMask(EntityEvent.FRAME);
80 return null;
81 }
82
83 // -------------------------------------------------------------------------
84 override void DebugDirectionDelete()
85 {
86 #ifndef DEVELOPER
87 return;
88 #endif
89
91 {
92 m_DebugShapeDirection.Destroy();
94 }
95
97 {
98 g_Game.GetCallQueue(CALL_CATEGORY_GUI).Remove(OnDrawing);
99 }
100 }
101
103 {
104 #ifndef DEVELOPER
105 return;
106 #endif
107
109 {
110 vector mat[4];
111 m_ThisEntityAI.GetTransform(mat);
112
113 if ( m_DebugShapeBBox )
114 {
115 m_DebugShapeBBox.SetMatrix(mat);
116 }
117
119 {
120 m_DebugShapeDirection.SetMatrix(mat);
121 }
122 }
123 }
124}
DayZGame g_Game
Определения DayZGame.c:3942
Shape m_DebugShapeBBox
Определения ComponentEntityDebug.c:4
EntityAI m_ThisEntityAI
Определения Component.c:24
override void DebugBBoxDelete()
Определения ComponentEntityDebug.c:42
void OnDrawing()
Определения ComponentEntityDebug.c:102
override void DebugDirectionDelete()
Определения ComponentEntityDebug.c:84
override Shape DebugDirectionDraw(float distance=1)
Определения ComponentEntityDebug.c:61
Shape m_DebugShapeDirection
Определения ComponentEntityDebug.c:5
override Shape DebugBBoxDraw()
Определения ComponentEntityDebug.c:9
override void DebugBBoxSetColor(int color)
Определения ComponentEntityDebug.c:33
float m_DebugShapeDirectionDist
Определения ComponentEntityDebug.c:6
Определения Component.c:16
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
Определения 3_Game/DayZ/tools/Debug.c:349
static Shape DrawArrow(vector from, vector to, float size=0.5, int color=0xFFFFFFFF, int flags=0)
Определения 3_Game/DayZ/tools/Debug.c:483
Определения 3_Game/DayZ/tools/Debug.c:2
Определения EnConvert.c:119
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
EntityEvent
Entity events for event-mask, or throwing event from code.
Определения EnEntity.c:45
const int CALL_CATEGORY_GUI
Определения 3_Game/DayZ/tools/tools.c:9