40{
44
50 Widget m_CardMovementFrame;
53
58
62
66
69
75
78
82
85
87 bool m_CH_DoTurn = false;
88 bool m_CH_DoVault = false;
89 bool m_CH_DoKnucleOut = false;
90 bool m_CH_GoToCrawl = false;
91 bool m_CH_DoHit = false;
92 bool m_CH_StartDeath = false;
93 bool m_CH_DoAttack = false;
94
97
99
102
103 void PluginDayZInfectedDebug()
104 {
105 #ifndef NO_GUI
107 #endif
108 }
109
110 void ~PluginDayZInfectedDebug()
111 {
112 #ifndef NO_GUI
114 #endif
115 }
116
119 {
122 {
124 }
125
127 }
128
131 {
133 {
137 }
138 }
139
142 {
144 {
145 GetGame().GetInput().ChangeGameFocus(1);
146 GetGame().GetUIManager().ShowUICursor(
true);
148 }
149 }
150
153 {
155 {
156 GetGame().GetInput().ChangeGameFocus(-1);
157 GetGame().GetUIManager().ShowUICursor(
false);
159 }
160 }
161
164 {
167
168 GetUApi().ActivateExclude(
"menu");
170
172 {
175 }
176 }
177
180 {
183
185
187 }
188
191 {
193 {
195 }
196 }
197
199 {
201
202 CleanupDebugShapes(m_DebugShapes);
203
205 {
206 if (!m_ControlledInfected)
207 return;
208
210 }
211 }
212
215 {
217 {
220 }
221
223 {
224 m_MainWnd =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/debug/day_z_infecteddebug.layout");
227 }
228
233 m_CardMovementFrame =
m_MainWnd.FindAnyWidget(
"CardMovementFrame");
234 m_CardFightFrame =
m_MainWnd.FindAnyWidget(
"CardFightFrame");
236
241
245
249
252
258
261
265
267 InitAttacks();
268
270 }
271
274 {
276 }
277
280 {
281 m_CardMovementFrame.Show(
pCard == 0);
282 m_CardFightFrame.Show(
pCard == 1);
283 }
284
287 {
288 if (
w == m_SpawnEntityButton)
289 {
290 ResetValues();
291 SpawnNewInfectedEntity();
292 return true;
293 }
294
295 if (
w == m_CardMovementButton)
296 {
298 return true;
299 }
300 else if (
w == m_CardFightButton)
301 {
303 return true;
304 }
305 else if (
w == m_StartTurnButton)
306 {
307 m_CH_DoTurn = true;
308 return true;
309 }
310 else if (
w == m_StartVaultButton)
311 {
312 m_CH_DoVault = true;
313 return true;
314 }
315 else if (
w == m_KnucleOutButton)
316 {
317 m_CH_DoKnucleOut = true;
318 return true;
319 }
320 else if (
w == m_StartCrawlingButton)
321 {
322 m_CH_GoToCrawl = true;
323 return true;
324 }
325 else if (
w == m_StartHitButton)
326 {
327 m_CH_DoHit = true;
328 return true;
329 }
330 else if (
w == m_StartDeathButton)
331 {
332 m_CH_StartDeath = true;
333 return true;
334 }
335 else if (
w == m_StartAttackButton)
336 {
337 m_CH_DoAttack = true;
338 return true;
339 }
340
341 return false;
342 }
343
346 {
347 return false;
348 }
349
351 void ResetValues()
352 {
353 m_CH_DoTurn = false;
354 m_CH_DoVault = false;
355 m_CH_DoKnucleOut = false;
356 m_CH_GoToCrawl = false;
357 m_CH_DoHit = false;
358 m_CH_StartDeath = false;
359 m_CH_DoAttack = false;
360 m_MovementSpeedEB.SetText("0");
362 }
363
365 void SpawnNewInfectedEntity()
366 {
368 m_ControlledInfected.GetAIAgent().SetKeepInIdle(true);
369 }
370
371 protected void PossesInfected()
372 {
373 ResetValues();
377 }
378
381 {
382 if(
infected != m_ControlledInfected )
383 return;
384
385 infected.GetInputController().OverrideMovementSpeed(
true, m_MovementSpeedEB.GetText().ToFloat());
386
389 {
390 moveCommand.SetStanceVariation(m_StanceCB.GetCurrentItem());
391 moveCommand.SetIdleState(m_MindStateCB.GetCurrentItem());
392 }
393
394 if( m_CH_DoTurn )
395 {
396 moveCommand.StartTurn(m_TurnDirectionEB.GetText().ToFloat(), m_TurnTypeCB.GetCurrentItem());
397 m_CH_DoTurn = false;
398 }
399 if( m_CH_DoVault )
400 {
401 infected.StartCommand_Vault(m_VaultingCB.GetCurrentItem());
402 m_CH_DoVault = false;
403 }
404 if( m_CH_DoKnucleOut )
405 {
407 m_CH_DoKnucleOut = false;
408 }
409 if( m_CH_GoToCrawl )
410 {
411 infected.StartCommand_Crawl(m_CrawlingTypeCB.GetCurrentItem());
412 m_CH_GoToCrawl = false;
413 }
414 if( m_CH_DoHit )
415 {
416 float hitDir = m_HitDirEB.GetText().ToFloat();
417 int bodyPart = m_HitBodyPartCB.GetCurrentItem();
418 bool heavyHit = m_HitTypeCB.GetCurrentItem() == 1;
419
421
422 m_CH_DoHit = false;
423 }
424 if( m_CH_StartDeath )
425 {
426 int deathType = m_DeathTypeCB.GetCurrentItem();
427 float deathDir = m_HitDirEB.GetText().ToFloat();
428
430
431 m_CH_StartDeath = false;
432 }
433 if( m_CH_DoAttack )
434 {
435 float attackDir = m_AttackDirCB.GetCurrentItem();
436 int attackType = m_AttackDescriptors.Get(m_AttackTypeCB.GetCurrentItem()).animValue;
437
439
440 m_CH_DoAttack = false;
441 }
442 }
443
446 {
447 if( !m_ControlledInfected )
448 return;
449
450 }
451
453 void InitAttacks()
454 {
459
461
462
463
464
465
466
467
468
469
470
471 for(
int i = 0;
i < m_AttackDescriptors.Count(); ++
i )
472 {
473 m_AttackTypeCB.AddItem(m_AttackDescriptors.Get(
i).name);
474 }
475 }
476
478 {
480 {
482 }
483
485 }
486}
487
const int ECE_EQUIP_ATTACHMENTS
Definition CentralEconomy.c:20
const int ECE_PLACE_ON_SURFACE
Definition CentralEconomy.c:37
const int ECE_INITAI
Definition CentralEconomy.c:17
void Hide()
Definition DayZGame.c:165
void Show()
Definition DayZGame.c:157
bool m_IsActive
Definition ModifierBase.c:19
PlayerBase GetPlayer()
Definition ModifierBase.c:51
ref Timer m_TickTimer
Definition PluginDayZCreatureAIDebug.c:86
class PluginDayZInfectedDebugUIHandler extends ScriptedWidgetEventHandler PluginDayZInfectedDebugAttackDesc(string pName, int pValue)
Definition PluginDayZInfectedDebug.c:26
override bool OnChange(Widget w, int x, int y, bool finished)
Definition PluginDayZInfectedDebug.c:33
override bool OnClick(Widget w, int x, int y, int button)
Definition PluginDayZInfectedDebug.c:27
void ShowWidgets(bool show)
Definition PluginDayzPlayerDebug.c:332
void ShowCard(int pCard)
Definition PluginDayzPlayerDebug.c:530
void ToggleDebugWindowSetMode(int pMode)
Definition PluginDayzPlayerDebug.c:438
Widget m_MainWnd
Definition PluginDayzPlayerDebug.c:206
int m_CurrentMode
Definition PluginDayzPlayerDebug.c:384
ref PluginDayzPlayerDebugUIHandler m_pUIHandler
Definition PluginDayzPlayerDebug.c:256
void ToggleDebugWindowEvent()
Definition PluginDayzPlayerDebug.c:387
bool m_HasFocus
Definition PluginDayzPlayerDebug.c:203
void ReleaseFocus()
Definition PluginDayzPlayerDebug.c:374
void CommandHandler()
Definition PluginDayzPlayerDebug.c:1051
void DestroyModuleWidgets()
Definition PluginDayzPlayerDebug.c:524
void CreateModuleWidgets()
Definition PluginDayzPlayerDebug.c:448
void CaptureFocus()
Definition PluginDayzPlayerDebug.c:363
void Tick()
Definition SoundEvents.c:107
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Definition DayZInfectedImplement.c:1
Definition ZombieBase.c:2
static void RemoveShape(out Shape shape)
Definition Debug.c:110
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
Definition Debug.c:333
Definition EnWidgets.c:220
Definition DayZPlayerImplement.c:63
proto native CGame GetGame()