DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PluginDiagMenuClient.c
См. документацию.
1// For modding, see PluginDiagMenuModding.c
2// !!! MODDING DISCLAIMER: These are debug functionality files, if you are thinking about modding the vanilla ones, do so at your own risk
3// These files will not be maintained with the thought of "what if a modder modded this" (Excluding the modding functionality of course)
4// Which is why the modding functionality was developed with the thought of the modded ones having their own isolated safe space
5
7{
8#ifdef DIAG_DEVELOPER
9 static int m_SystemsMask;
10
11 // Cheats
12 bool m_ModifiersEnabled = true;
13 int m_IsInvincible;
14 bool m_StaminaDisabled;
15
16 // Misc
17 float m_Playtime;
18 bool m_LogPlayerStats;
19 Shape m_VehicleFreeAreaBox;
20 ref EnvDebugData m_EnvDebugData;
21 ref FallDamageDebugData m_FallDamageDebugData;
22#ifndef SERVER
23 ref WeaponLiftDiag m_WeaponLiftDiag = new WeaponLiftDiag();
24#endif
25
26 override void OnInit()
27 {
28 super.OnInit();
29
30 BindCallbacks();
31 }
32
33 protected void BindCallbacks()
34 {
35 //---------------------------------------------------------------
36 // LEVEL 2 - Script > Crafting
37 //---------------------------------------------------------------
38 DiagMenu.BindCallback(DiagMenuIDs.CRAFTING_GENERATE, CBCraftingGenerate);
39 DiagMenu.BindCallback(DiagMenuIDs.CRAFTING_INSTANT, CBCraftingInstant);
40 DiagMenu.BindCallback(DiagMenuIDs.CRAFTING_DUMP, CBCraftingDump);
41
42 //---------------------------------------------------------------
43 // LEVEL 2 - Script > Vehicles
44 //---------------------------------------------------------------
45 DiagMenu.BindCallback(DiagMenuIDs.VEHICLE_DEBUG_OUTPUT, CBVehicleDebugOutput);
46 DiagMenu.BindCallback(DiagMenuIDs.VEHICLE_DUMP_CRASH_DATA, CBDumpCrashData);
47
48 //---------------------------------------------------------------
49 // LEVEL 2 - Script > Cheats
50 //---------------------------------------------------------------
51 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_MODIFIERS, CBCheatsModifiers);
52 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_KILL_PLAYER, CBCheatsKillPlayer);
53 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_INVINCIBILITY, CBCheatsInvincibility);
54 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_DISABLE_STAMINA, CBCheatsStaminaDisable);
55 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_RESET_PLAYER, CBCheatsResetPlayer);
56 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_RESET_PLAYER_MAX, CBCheatsResetPlayerMax);
57 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_INVENTORY_ACCESS, CBCheatsInventoryAccess);
58 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_FIX_ITEMS, CBCheatsFixItems);
59 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_CREATE_HIT, CBCreateHit);
60 DiagMenu.BindCallback(DiagMenuIDs.CHEATS_CREATE_HIT_LIGHT, CBCreateHitLight);
61
62 //---------------------------------------------------------------
63 // LEVEL 2 - Script > Player Agents
64 //---------------------------------------------------------------
65 DiagMenu.BindCallback(DiagMenuIDs.PLAYER_AGENTS_INJECTS_SHOW, CBPlayerAgentsInjectActions);
66
67 //---------------------------------------------------------------
68 // LEVEL 2 - Script > Soft Skills
69 //---------------------------------------------------------------
70 DiagMenu.BindCallback(DiagMenuIDs.SOFT_SKILLS_SHOW_DEBUG, CBSoftSkillsShowDebug);
71 DiagMenu.BindCallback(DiagMenuIDs.SOFT_SKILLS_TOGGLE_STATE, CBSoftSkillsToggleState);
72 DiagMenu.BindCallback(DiagMenuIDs.SOFT_SKILLS_TOGGLE_MODEL, CBSoftSkillsToggleModel);
73 DiagMenu.BindCallback(DiagMenuIDs.SOFT_SKILLS_SPECIALTY_VALUE, CBSoftSkillsSpecialtyValue);
74
75 //---------------------------------------------------------------
76 // LEVEL 2 - Script > Lifespan
77 //---------------------------------------------------------------
78 DiagMenu.BindCallback(DiagMenuIDs.LIFESPAN_BLOODY_HANDS, CBLifespanBloodyHands);
79 DiagMenu.BindCallback(DiagMenuIDs.LIFESPAN_PLAYTIME_UPDATE, CBLifespanPlaytimeUpdate);
80
81 //---------------------------------------------------------------
82 // LEVEL 2 - Script > Misc
83 //---------------------------------------------------------------
84 DiagMenu.BindCallback(DiagMenuIDs.MISC_DISABLE_PERSONAL_LIGHT, CBMiscPersonalLight);
85 DiagMenu.BindCallback(DiagMenuIDs.MISC_ITEM_DEBUG_ACTIONS, CBMiscItemDebugActions); // Is enabled by default now
86 DiagMenu.BindCallback(DiagMenuIDs.MISC_LOG_PLAYER_STATS, CBMiscLogPlayerStats);
87 DiagMenu.BindCallback(DiagMenuIDs.MISC_FORCE_HINT_INDEX, CBMiscForceHintIndex);
88
89 //---------------------------------------------------------------
90 // LEVEL 2 - Script > Misc -> Environment
91 //---------------------------------------------------------------
92 DiagMenu.BindCallback(DiagMenuIDs.MISC_ENVIRONMENT_DEBUG, CBMiscEnvironmentDebug);
93 #ifdef ENABLE_LOGGING
94 DiagMenu.BindCallback(DiagMenuIDs.MISC_ENVIRONMENT_LOGGING_DRYWET, CBMiscEnvironmentLoggingDryWet);
95 DiagMenu.BindCallback(DiagMenuIDs.MISC_ENVIRONMENT_LOGGING_ITEMHEAT, CBMiscEnvironmentLoggingItemHeat);
96 #endif
97
98 //---------------------------------------------------------------
99 // LEVEL 2 - Script > Misc
100 //---------------------------------------------------------------
101 DiagMenu.BindCallback(DiagMenuIDs.MISC_PERMANENT_CROSSHAIR, CBMiscPermanentCrossHair);
102 DiagMenu.BindCallback(DiagMenuIDs.MISC_TOGGLE_HUD, CBMiscToggleHud);
103 DiagMenu.BindCallback(DiagMenuIDs.MISC_FALLDAMAGE_DEBUG, CBMiscFallDamageDebug);
104 DiagMenu.BindCallback(DiagMenuIDs.MISC_DISPLAY_PLAYER_INFO, CBMiscDisplayPlayerInfo);
105 DiagMenu.BindCallback(DiagMenuIDs.MISC_UNIVERSAL_TEMPERATURE_SOURCES, CBMiscUniversalTemperatureSources);
106 DiagMenu.BindCallback(DiagMenuIDs.MISC_BULLET_IMPACT, CBMiscBulletImpact);
107 DiagMenu.BindCallback(DiagMenuIDs.MISC_GO_UNCONSCIOUS, CBMiscGoUnconscious);
108 DiagMenu.BindCallback(DiagMenuIDs.MISC_GO_UNCONSCIOUS_DELAYED, CBMiscGoUnconsciousDelayed);
109 DiagMenu.BindCallback(DiagMenuIDs.MISC_QUICK_RESTRAIN, CBMiscQuickRestrain);
110
111 //---------------------------------------------------------------
112 // LEVEL 3 - Script > Misc > Hair Hiding
113 //---------------------------------------------------------------
114 DiagMenu.BindCallback(DiagMenuIDs.MISC_HAIR_LEVEL_HIDE, CBMiscHairHide);
115 DiagMenu.BindCallback(DiagMenuIDs.MISC_HAIR_HIDE_ALL, CBMiscHairHideAll);
116
117 //---------------------------------------------------------------
118 // LEVEL 2 - Script > Misc
119 //---------------------------------------------------------------
120 DiagMenu.BindCallback(DiagMenuIDs.MISC_CAM_SHAKE, CBMiscCamShake);
121 DiagMenu.BindCallback(DiagMenuIDs.MISC_QUICK_FISHING, CBMiscQuickFishing);
122 DiagMenu.BindCallback(DiagMenuIDs.MISC_SHOCK_IMPACT, CBMiscShockImpact);
123 DiagMenu.BindCallback(DiagMenuIDs.MISC_SHOW_PLUG_ARROWS, CBMiscPlugArrows);
124 DiagMenu.BindCallback(DiagMenuIDs.MISC_TARGETABLE_BY_AI, CBMiscTargetableByAI);
125
126 //---------------------------------------------------------------
127 // LEVEL 3 - Script > Misc > Hit Indication
128 //---------------------------------------------------------------
129 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_DEBUG, CBMiscHitIndication);
130 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_SPAWN_HIT, CBMiscHitIndicationSpawnHit);
131 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_MODE, CBMiscHitIndication);
132 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_TYPE, CBMiscHitIndication);
133 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_DURATION, CBMiscHitIndication);
134 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_BREAKPOINT, CBMiscHitIndication);
135 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_DISTANCE, CBMiscHitIndication);
136 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_ROTATION, CBMiscHitIndication);
137 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_SCATTER, CBMiscHitIndication);
138 DiagMenu.BindCallback(DiagMenuIDs.MISC_HIT_INDICATION_DISABLE_PPE, CBMiscHitIndication);
139
140 //---------------------------------------------------------------
141 // LEVEL 2 - Script > Misc
142 //---------------------------------------------------------------
143 DiagMenu.BindCallback(DiagMenuIDs.MISC_FREEZE_ENTITY, CBMiscFreezeEntity);
144 DiagMenu.BindCallback(DiagMenuIDs.MISC_FREEZE_PLAYER, CBMiscFreezePlayer);
145 DiagMenu.BindCallback(DiagMenuIDs.MISC_DEBUG_MONITOR, CBDebugMonitor);
146 DiagMenu.BindCallback(DiagMenuIDs.MISC_SHOW_PRA_ALL, CBPRADrawAll);
147 DiagMenu.BindCallback(DiagMenuIDs.MISC_PRA_DETECT, CBPRADetect);
148
149 //---------------------------------------------------------------
150 // LEVEL 2 - Script > Simulate script
151 //---------------------------------------------------------------
152 DiagMenu.BindCallback(DiagMenuIDs.SIMULATE_INFINITE_LOOP, CBSimulateInfiniteLoop);
153 DiagMenu.BindCallback(DiagMenuIDs.SIMULATE_NULL_POINTER, CBSimulateNullPointer);
154 DiagMenu.BindCallback(DiagMenuIDs.SIMULATE_DIVISION_BY_ZERO, CBSimulateDivisionByZero);
155 DiagMenu.BindCallback(DiagMenuIDs.SIMULATE_ERROR_FUNCTION, CBSimulateErrorFunction);
156
157 //---------------------------------------------------------------
158 // LEVEL 2 - Script > Weapon
159 //---------------------------------------------------------------
160 DiagMenu.BindCallback(DiagMenuIDs.WEAPON_PARTICLES, CBWeaponParticles);
161 DiagMenu.BindCallback(DiagMenuIDs.WEAPON_AIM_NOISE, CBWeaponAimNoise);
162 DiagMenu.BindCallback(DiagMenuIDs.WEAPON_RECOIL, CBWeaponRecoil);
163 DiagMenu.BindCallback(DiagMenuIDs.WEAPON_UNLIMITED_AMMO, CBWeaponUnlimitedAmmo);
164 DiagMenu.BindCallback(DiagMenuIDs.WEAPON_BURST_VERSION, CBWeaponBurstVersion);
165
166 //---------------------------------------------------------------
167 // LEVEL 2 - Script > Bleeding
168 //---------------------------------------------------------------
169 DiagMenu.BindCallback(DiagMenuIDs.BLEEDING_SOURCES, CBBleedingSources);
170 DiagMenu.BindCallback(DiagMenuIDs.BLEEDING_DISABLE_BLOOD_LOSS, CBBleedingDisableBloodLoss);
171 DiagMenu.BindCallback(DiagMenuIDs.BLEEDING_ACTIVATE_SOURCE, CBBleedingActivateSource);
172 DiagMenu.BindCallback(DiagMenuIDs.BLEEDING_ACTIVATE_ALL_SOURCES, CBBleedingActivateAllSources);
173 DiagMenu.BindCallback(DiagMenuIDs.BLEEDING_ACTIVATE_SOURCE_LEVEL, CBBleedingActivateSourceLevel);
174 DiagMenu.BindCallback(DiagMenuIDs.BLEEDING_RELOAD, CBBleedingReload);
175
176 //---------------------------------------------------------------
177 // LEVEL 3 - Script > Bleeding > Bleeding Indication
178 //---------------------------------------------------------------
179 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS, CBBBleedingIndicators);
180 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_USEVALUEOVERRIDES, CBBBleedingIndicators);
181 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_RANDOMROTATION, CBBBleedingIndicators);
182 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_SEQUENCE_DURATION, CBBBleedingIndicators);
183 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_BASEDURATION, CBBBleedingIndicators);
184 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_MINDELAY, CBBBleedingIndicators);
185 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_MAXDELAY, CBBBleedingIndicators);
186 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_PROGRESSTHRESHOLD, CBBBleedingIndicators);
187 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_STARTSIZE, CBBBleedingIndicators);
188 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_ENDSIZE, CBBBleedingIndicators);
189 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_RNDSCALEMIN, CBBBleedingIndicators);
190 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_RNDSCALEMAX, CBBBleedingIndicators);
191 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_SCATTER, CBBBleedingIndicators);
192 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_SLIDEDISTANCE, CBBBleedingIndicators);
193
194 //---------------------------------------------------------------
195 // LEVEL 4 - Script > Bleeding > Bleeding Indication > Color Debug
196 //---------------------------------------------------------------
197 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_ENABLEDESATURATION, CBBBleedingIndicators);
198 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_DESATURATIONEND, CBBBleedingIndicators);
199 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_R, CBBBleedingIndicators);
200 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_G, CBBBleedingIndicators);
201 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_B, CBBBleedingIndicators);
202 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_A_START, CBBBleedingIndicators);
203 DiagMenu.BindCallback(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_A_END, CBBBleedingIndicators);
204
205 //---------------------------------------------------------------
206 // LEVEL 2 - Script > Logs
207 //---------------------------------------------------------------
208 DiagMenu.BindCallback(DiagMenuIDs.LOGS_ACTIONS, CBLogsActions);
209 DiagMenu.BindCallback(DiagMenuIDs.LOGS_WEAPONS, CBLogsWeapons);
210 DiagMenu.BindCallback(DiagMenuIDs.LOGS_SYNC, CBLogsSync);
211 DiagMenu.BindCallback(DiagMenuIDs.LOGS_BASEBUILDING, CBLogsBaseBuilding);
212 DiagMenu.BindCallback(DiagMenuIDs.LOGS_SYMPTOMS, CBLogsSymptoms);
213 DiagMenu.BindCallback(DiagMenuIDs.LOGS_BLEEDING_CHANCES, CBLogsBleedingChances);
214 DiagMenu.BindCallback(DiagMenuIDs.LOGS_QUICKBAR, CBLogsQuickbar);
215
216 //---------------------------------------------------------------
217 // LEVEL 3 - Script > Logs > InventoryLogs
218 //---------------------------------------------------------------
219 DiagMenu.BindCallback(DiagMenuIDs.LOGS_INVENTORY_MOVE, CBLogsInventoryMove);
220 DiagMenu.BindCallback(DiagMenuIDs.LOGS_INVENTORY_RESERVATION, CBLogsInventoryReservation);
221 DiagMenu.BindCallback(DiagMenuIDs.LOGS_INVENTORY_HFSM, CBLogsInventoryHFSM);
222
223 //---------------------------------------------------------------
224 // LEVEL 2 - Script > Triggers
225 //---------------------------------------------------------------
226 DiagMenu.BindCallback(DiagMenuIDs.TRIGGER_DEBUG, CBTriggerDebug);
227
228 //---------------------------------------------------------------
229 // LEVEL 2 - Script > Base Building
230 //---------------------------------------------------------------
231 DiagMenu.BindCallback(DiagMenuIDs.BASEBUILDING_WOOD, CBBaseBuildingWood);
232 DiagMenu.BindCallback(DiagMenuIDs.BASEBUILDING_GATE, CBBaseBuildingGate);
233
234 //---------------------------------------------------------------
235 // LEVEL 2 - Script > Finishers
236 //---------------------------------------------------------------
237 DiagMenu.BindCallback(DiagMenuIDs.FINISHERS_FINISHER_FORCED, CBFinishersFinisherForced);
238
239 //---------------------------------------------------------------
240 // LEVEL 2 - Script > Cinematic Camera Tools
241 //---------------------------------------------------------------
242 DiagMenu.BindCallback(DiagMenuIDs.CAMERATOOLS_ENABLE_REMOTE_CAMERA, CBCameraToolsEnableRemoteCamera);
243 }
244
245 //---------------------------------------------
246 override void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
247 {
248 super.OnRPC(player, rpc_type, ctx);
249
250 switch (rpc_type)
251 {
252 case ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG_DATA:
253 {
254 if (!m_EnvDebugData)
255 m_EnvDebugData = new EnvDebugData();
256
257 ctx.Read(m_EnvDebugData);
258 break;
259 }
260
261 case ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG_DATA:
262 {
263 if (!m_FallDamageDebugData)
264 m_FallDamageDebugData = new FallDamageDebugData();
265
266 ctx.Read(m_FallDamageDebugData);
267 break;
268 }
269
270 case ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_CONTENTS:
271 {
272 Param1<array<ref CrashDebugData>> par = new Param1<array<ref CrashDebugData>>(null);
273
274 if (ctx.Read(par))
275 CrashDebugData.DumpDataArray(par.param1);
276 break;
277 }
278 }
279 }
280
281 //---------------------------------------------
282 override void OnUpdate(float delta_time)
283 {
284 super.OnUpdate(delta_time);
285
286 //---------------------------------------------
287 // every system can handle their own actions locally(within the system itself),
288 // this section is for systems which don't have client side representation,
289 // or don't have their own tick, or for whatever other reason you prefer to put the logic here
290 // PUT ONLY METHOD CALLS HERE, NO CODE !!
291 // PUT ONLY METHOD CALLS HERE, NO CODE !!
292 //---------------------------------------------
293
294 UpdateMiscVehicleGetOutBox();
295 UpdateEnvironmentDebug();
296 CheckTimeAccel();
297 UpdateMaterialDebug();
298 UpdateWeaponLiftDiag(delta_time);
299 }
300
301 //---------------------------------------------
302 void CheckTimeAccel()
303 {
304 if (!FeatureTimeAccel.m_CurrentTimeAccel)
305 {
306 InitTimeAccel();
307 }
308
309 if (GetGame() && GetGame().GetPlayer())
310 {
311 TimeAccelParam param = GetTimeAccelMenuState();
312
313 if (!FeatureTimeAccel.AreTimeAccelParamsSame(param, FeatureTimeAccel.m_CurrentTimeAccel))
314 {
315 int timeAccelBig = param.param2;
316 float timeAccelSmall = param.param2 - timeAccelBig;
317 FeatureTimeAccel.CopyTimeAccelClipboard(param.param1, timeAccelBig, timeAccelSmall, param.param3 );
318 FeatureTimeAccel.SendTimeAccel(GetGame().GetPlayer(), param);
319 FeatureTimeAccel.m_CurrentTimeAccel = param;
320 }
321 }
322
323 }
324
325 //---------------------------------------------
326 static void CBCraftingGenerate(bool enabled, int id)
327 {
328 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
329 DiagButtonAction(enabled, id, ScriptCaller.Create(pluginRecipesManager.CallbackGenerateCache));
330 }
331
332 //---------------------------------------------
333 static void CBCraftingInstant(bool enabled)
334 {
335 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
336 DiagToggleRPC(enabled, pluginRecipesManager.IsEnableDebugCrafting(), ERPCs.DIAG_CRAFTING_INSTANT);
337 }
338
339 //---------------------------------------------
340 static void CBCraftingDump(bool enabled, int id)
341 {
342 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
343 DiagButtonAction(enabled, id, ScriptCaller.Create(pluginRecipesManager.GenerateHumanReadableRecipeList));
344 }
345
346 //---------------------------------------------
347 static void CBCheatsModifiers(bool enabled)
348 {
350 DiagToggleRPCServer(enabled, pluginDiag.m_ModifiersEnabled, ERPCs.DIAG_CHEATS_MODIFIERS);
351 }
352
353 //---------------------------------------------
354 static void CBCheatsKillPlayer(bool enabled, int id)
355 {
356 DiagButtonRPC(enabled, id, ERPCs.DIAG_CHEATS_KILL_PLAYER, true);
357 }
358
359 //---------------------------------------------
360 static void CBCheatsInvincibility(int value)
361 {
363 DiagToggleRPCServer(value, pluginDiag.m_IsInvincible, ERPCs.DIAG_CHEATS_INVINCIBILITY);
364 }
365
366 //---------------------------------------------
367 static void CBCheatsStaminaDisable(bool enabled)
368 {
369 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
370 if (player)
371 player.SetStaminaDisabled(enabled);
372
374 DiagToggleRPCServer(enabled, pluginDiag.m_StaminaDisabled, ERPCs.DIAG_CHEATS_DISABLE_STAMINA);
375 }
376
377 //---------------------------------------------
378 static void CBCheatsResetPlayer(bool enabled, int id)
379 {
380 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
381 if (player)
382 player.ResetPlayer(false);
383 DiagButtonRPC(enabled, id, ERPCs.DIAG_CHEATS_RESET_PLAYER, true);
384 }
385
386 //---------------------------------------------
387 static void CBCheatsResetPlayerMax(bool enabled, int id)
388 {
389 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
390 if (player)
391 player.ResetPlayer(true);
392 DiagButtonRPC(enabled, id, ERPCs.DIAG_CHEATS_RESET_PLAYER_MAX, true);
393 }
394
395 //---------------------------------------------
396 static void CBCheatsInventoryAccess(bool enabled)
397 {
398 DiagToggleRPCServer(enabled, PlayerBase.DEBUG_INVENTORY_ACCESS, ERPCs.DIAG_CHEATS_INVENTORY_ACCESS);
399 }
400
401 //---------------------------------------------
402 static void CBCheatsFixItems(bool enabled, int id)
403 {
404 DiagButtonRPC(enabled, id, ERPCs.DIAG_CHEATS_ITEMS_FIX, true);
405 }
406
407 static void CBCreateHit(bool enabled, int id)
408 {
409 DiagButtonRPC(enabled, id, ERPCs.DIAG_CHEATS_CREATE_HIT, true);
410 }
411
412 static void CBCreateHitLight(bool enabled, int id)
413 {
414 DiagButtonRPC(enabled, id, ERPCs.DIAG_CHEATS_CREATE_HIT_LIGHT, true);
415 }
416
417 //---------------------------------------------
418 static void CBPlayerAgentsInjectActions(bool enabled)
419 {
420 DiagDebugAction(DebugActionType.PLAYER_AGENTS, enabled);
421 }
422
423 //---------------------------------------------
424 static void CBSoftSkillsShowDebug(bool enabled)
425 {
426 SoftSkillsManager ssMngr = GetPlayer().GetSoftSkillsManager();
427 DiagToggleRPCAction(enabled, ScriptCaller.Create(ssMngr.CreateDebugWindow), ssMngr.IsDebug(), ERPCs.DIAG_SOFT_SKILLS_SHOW_DEBUG);
428 }
429
430 //---------------------------------------------
431 static void CBSoftSkillsToggleState(bool enabled)
432 {
433 SoftSkillsManager ssMngr = GetPlayer().GetSoftSkillsManager();
434 DiagToggleRPC(enabled, ssMngr.GetSoftSkillsState(), ERPCs.DIAG_SOFT_SKILLS_TOGGLE_STATE);
435 }
436
437 //---------------------------------------------
438 static void CBSoftSkillsToggleModel(bool enabled)
439 {
440 SoftSkillsManager ssMngr = GetPlayer().GetSoftSkillsManager();
441 DiagToggleRPC(enabled, ssMngr.IsLinear(), ERPCs.DIAG_SOFT_SKILLS_TOGGLE_MODEL);
442 }
443
444 //---------------------------------------------
445 static void CBSoftSkillsSpecialtyValue(float value)
446 {
447 SoftSkillsManager ssMngr = GetPlayer().GetSoftSkillsManager();
448 DiagToggleRPC(value, ssMngr.GetSpecialtyLevel(), ERPCs.DIAG_SOFT_SKILLS_SPECIALTY_VALUE);
449 }
450
451 //---------------------------------------------
452 static void CBLifespanBloodyHands(bool enabled)
453 {
454 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
455 if (player)
456 DiagToggleRPCServer(enabled, player.HasBloodyHands(), ERPCs.DIAG_LIFESPAN_BLOODY_HANDS);
457 }
458
459 //---------------------------------------------
460 static void CBLifespanPlaytimeUpdate(float value)
461 {
463 DiagToggleRPCServer(value * 60, pluginDiag.m_Playtime, ERPCs.DIAG_LIFESPAN_PLAYTIME_UPDATE);
464 }
465
466 //---------------------------------------------
467 static void CBMiscPersonalLight(bool enabled)
468 {
469 PlayerBaseClient.m_PersonalLightDisabledByDebug = enabled;
470 PlayerBaseClient.UpdatePersonalLight();
471 }
472
473 //---------------------------------------------
474 static void CBMiscItemDebugActions(bool enabled)
475 {
476 DiagDebugAction(DebugActionType.GENERIC_ACTIONS, enabled);
477 }
478
479 //---------------------------------------------
480 static void CBMiscLogPlayerStats(bool enabled)
481 {
483 DiagToggleRPC(enabled, pluginDiag.m_LogPlayerStats, ERPCs.DIAG_MISC_LOG_PLAYER_STATS);
484 }
485
486 //---------------------------------------------
487 static void CBMiscForceHintIndex(int index)
488 {
489 UiHintPanel.m_ForcedIndex = index;
490 }
491
492 //---------------------------------------------
493 static void CBMiscPermanentCrossHair(bool enabled)
494 {
495 PluginPermanentCrossHair crosshair = PluginPermanentCrossHair.Cast(GetPlugin(PluginPermanentCrossHair));
496 crosshair.SwitchPermanentCrossHair(enabled);
497 }
498
499 //---------------------------------------------
500 void UpdateMiscVehicleGetOutBox()
501 {
502 if ( DiagMenu.GetBool(DiagMenuIDs.MISC_VEHICLE_GETOUT_BOX) )
503 {
504 if (m_VehicleFreeAreaBox)
505 {
506 m_VehicleFreeAreaBox.Destroy();
507 m_VehicleFreeAreaBox = null;
508 }
509
510 HumanCommandVehicle hcv = GetGame().GetPlayer().GetCommand_Vehicle();
511 if (!hcv)
512 return;
513
514 m_VehicleFreeAreaBox = hcv.GetTransport().DebugFreeAreaAtDoor( hcv.GetVehicleSeat() );
515 }
516 else if (m_VehicleFreeAreaBox)
517 {
518 m_VehicleFreeAreaBox.Destroy();
519 m_VehicleFreeAreaBox = null;
520 }
521 }
522
523 //---------------------------------------------
524 static void CBMiscToggleHud(bool enabled)
525 {
527 mission.GetHud().Show(!enabled);
528 if (enabled)
529 {
530 mission.HideCrosshairVisibility();
531 }
532 else
533 {
534 mission.RefreshCrosshairVisibility();
535 }
536 }
537
538 //---------------------------------------------
539 static void CBMiscEnvironmentDebug(bool enabled)
540 {
541 SendDiagRPC(enabled, ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG);
542 }
543
544 void UpdateEnvironmentDebug()
545 {
546 if (DiagMenu.GetBool(DiagMenuIDs.MISC_ENVIRONMENT_DEBUG) && m_EnvDebugData)
547 Environment.DisplayEnvDebugPlayerInfo(true, m_EnvDebugData);
548 else if (m_EnvDebugData)
549 m_EnvDebugData = null;
550 }
551
552 //---------------------------------------------
553 void UpdateMaterialDebug()
554 {
555 if (DiagMenu.GetBool(DiagMenuIDs.MATERIALDIAG_GHOSTPP))
556 {
557 MatGhostDebug();
558 }
559 }
560
561 //---------------------------------------------
562 void UpdateWeaponLiftDiag(float delta_time)
563 {
564 #ifndef SERVER
565 int weaponLiftDebug = DiagMenu.GetValue(DiagMenuIDs.WEAPON_LIFT_DEBUG);
566 if (weaponLiftDebug)
567 {
568 GetWeaponLiftDiag().DrawDiag(weaponLiftDebug, delta_time);
569 }
570 #endif
571 }
572
573 #ifndef SERVER
574 //---------------------------------------------
575 static WeaponLiftDiag GetWeaponLiftDiag()
576 {
578 return pluginDiag.m_WeaponLiftDiag;
579 }
580 #endif
581
582 //---------------------------------------------
583 void MatGhostDebug()
584 {
585 string materialPath = "Graphics/Materials/postprocess/ghost";
586 Material material = GetGame().GetWorld().GetMaterial(materialPath);
587 if (!material)
588 {
589 DiagMenu.SetValue(DiagMenuIDs.MATERIALDIAG_GHOSTPP, 0);
590 return;
591 }
592
593 DbgUI.Begin("GhostEffect Debug");
594 {
595 float channelWeights[] = { 0, 0, 0, 0 };
596 float noiseOffset[] = { 0, 0 };
597 float noiseScale[] = { 1, 1 };
598 float noiseLo[] = { 0, 0, 0, 0 };
599 float noiseHi[] = { 1, 1, 1, 1 };
600 float ghostOffset[] = { 0, 0 };
601 float ghostScale[] = { 1, 1 };
602 float colormod[] = { 1, 1, 1, 0.5 };
603 int spacer_height = 10;
604
605 float rw, gw, bw, aw;
606 DbgUI.Text("noise_channel_weight");
607 {
608 DbgUI.InputFloat("noise_weight_r", rw);
609 DbgUI.InputFloat("noise_weight_g", gw);
610 DbgUI.InputFloat("noise_weight_b", bw);
611 DbgUI.InputFloat("noise_weight_a", aw);
612 }
613 DbgUI.Spacer(spacer_height);
614 //-------------------//
615 float nox, noy;
616 float nsx = 1, nsy = 1;
617 DbgUI.Text("noise_offset");
618 {
619 DbgUI.InputFloat("noise_offset_x", nox);
620 DbgUI.InputFloat("noise_offset_y", noy);
621 DbgUI.InputFloat("noise_scale_x", nsx);
622 DbgUI.InputFloat("noise_scale_y", nsy);
623 }
624 DbgUI.Spacer(spacer_height);
625 //-------------------//
626 float rl = 0, rh = 1;
627 float gl = 0, gh = 1;
628 float bl = 0, bh = 1;
629 float al = 0, ah = 1;
630 DbgUI.Text("noise_remap");
631 {
632 DbgUI.InputFloat("lo_r", rl);
633 DbgUI.SameLine();
634 DbgUI.InputFloat("hi_r", rh);
635
636 DbgUI.InputFloat("lo_g", gl);
637 DbgUI.SameLine();
638 DbgUI.InputFloat("hi_g", gh);
639
640 DbgUI.InputFloat("lo_b", bl);
641 DbgUI.SameLine();
642 DbgUI.InputFloat("hi_b", bh);
643
644 DbgUI.InputFloat("lo_a", al);
645 DbgUI.SameLine();
646 DbgUI.InputFloat("hi_a", ah);
647 }
648 DbgUI.Spacer(spacer_height);
649 //-------------------//
650 float gox = 50, goy = 25;
651 float gsx = 0.85, gsy = 0.85;
652 DbgUI.Text("ghost_offset");
653 {
654 DbgUI.InputFloat("ghost_offset_x", gox);
655 DbgUI.InputFloat("ghost_offset_y", goy);
656 DbgUI.InputFloat("ghost_scale_x", gsx);
657 DbgUI.InputFloat("ghost_scale_y", gsy);
658 }
659 DbgUI.Spacer(spacer_height);
660 //-------------------//
661 float cmr = 1, cmg = 1, cmb = 1, cma = 1;
662 DbgUI.Text("color_mod");
663 {
664 DbgUI.InputFloat("color_mod_r", cmr);
665 DbgUI.InputFloat("color_mod_g", cmg);
666 DbgUI.InputFloat("color_mod_b", cmb);
667 DbgUI.InputFloat("color_curve", cma);
668 }
669 DbgUI.Spacer(spacer_height);
670 //-------------------//
671 channelWeights = { rw, gw, bw, aw };
672 noiseOffset = { nox, noy };
673 noiseScale = { nsx, nsy };
674 noiseLo = { rl, gl, bl, al };
675 noiseHi = { rh, gh, bh, ah };
676 ghostOffset = { gox, goy };
677 ghostScale = { gsx, gsy };
678 colormod = { cmr, cmg, cmb, cma };
679
680 }
681 DbgUI.End();
682
683 material.SetParamByIndex(1, channelWeights);
684 material.SetParamByIndex(2, noiseOffset[0]);
685 material.SetParamByIndex(3, noiseOffset[1]);
686 material.SetParamByIndex(4, noiseScale[0]);
687 material.SetParamByIndex(5, noiseScale[1]);
688 material.SetParamByIndex(6, noiseLo);
689 material.SetParamByIndex(7, noiseHi);
690 material.SetParamByIndex(8, ghostOffset[0]);
691 material.SetParamByIndex(9, ghostOffset[1]);
692 material.SetParamByIndex(10, ghostScale[0]);
693 material.SetParamByIndex(11, ghostScale[1]);
694 material.SetParamByIndex(12, colormod );
695
696 }
697
698 #ifdef ENABLE_LOGGING
699 static void CBMiscEnvironmentLoggingDryWet(bool enabled)
700 {
701 SendDiagRPC(enabled, ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_DRYWET);
702 }
703
704 static void CBMiscEnvironmentLoggingItemHeat(bool enabled)
705 {
706 SendDiagRPC(enabled, ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_ITEMHEAT);
707 }
708 #endif
709
710 static void CBMiscFallDamageDebug(bool enabled)
711 {
712 SendDiagRPC(enabled, ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG);
713 }
714
715 void UpdateFallDamageDebug()
716 {
717 if (DiagMenu.GetBool(DiagMenuIDs.MISC_FALLDAMAGE_DEBUG) && m_FallDamageDebugData)
718 DayZPlayerImplementFallDamage.DisplayFallDamageDebugInfo(true, m_FallDamageDebugData);
719 else if (m_FallDamageDebugData)
720 m_FallDamageDebugData = null;
721 }
722
723 //---------------------------------------------
724 static void CBMiscDisplayPlayerInfo(int value)
725 {
726 PluginRemotePlayerDebugClient prpdc = PluginRemotePlayerDebugClient.Cast(GetPlugin(PluginRemotePlayerDebugClient));
727 prpdc.RequestPlayerInfo(PlayerBase.Cast(GetGame().GetPlayer()), value);
728 }
729
730 //---------------------------------------------
731 static void CBMiscUniversalTemperatureSources(bool enabled)
732 {
734 client.RequestUniversalTemperatureSources(PlayerBase.Cast(GetGame().GetPlayer()), enabled);
735 }
736
737 //---------------------------------------------
738 static void CBMiscBulletImpact(bool enabled, int id)
739 {
740 PlayerBase player = GetPlayer();
743 DiagButtonActionParams(enabled, id, ScriptCaller.Create(player.SpawnDamageDealtEffect2), CachedObjectsParams.PARAM2_FLOAT_FLOAT);
744 }
745
746 //---------------------------------------------
747 static void CBMiscGoUnconscious(bool enabled, int id)
748 {
749 DiagButtonRPC(enabled, id, ERPCs.DIAG_MISC_GO_UNCONSCIOUS, true);
750 }
751
752 //---------------------------------------------
753 static void CBMiscGoUnconsciousDelayed(bool enabled, int id)
754 {
755 DiagButtonRPC(enabled, id, ERPCs.DIAG_MISC_GO_UNCONSCIOUS_DELAYED, true);
756 }
757
758 //---------------------------------------------
759 static void CBMiscQuickRestrain(bool enabled)
760 {
761 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
762 DiagToggleRPC(enabled, player.IsQuickRestrain(), ERPCs.DIAG_MISC_QUICK_RESTRAIN);
763 }
764
765 //---------------------------------------------
766 static void CBMiscHairHide(bool enabled, int id)
767 {
768 int value = DiagMenu.GetRangeValue(DiagMenuIDs.MISC_HAIR_LEVEL);
769 DiagButtonRPCIntInt(enabled, id, value, enabled, ERPCs.DIAG_MISC_HAIR_LEVEL_HIDE, true);
770 }
771
772 //---------------------------------------------
773 static void CBMiscHairHideAll(bool enabled)
774 {
776 CachedObjectsParams.PARAM2_INT_INT.param2 = enabled;
777
778 SendDiagRPC(CachedObjectsParams.PARAM2_INT_INT, ERPCs.DIAG_MISC_HAIR_LEVEL_HIDE, true);
779 }
780
781 //---------------------------------------------
782 static void CBMiscCamShake(bool enabled, int id)
783 {
784 DayZPlayerCamera cam = GetGame().GetPlayer().GetCurrentCamera();
785 DiagButtonAction(enabled, id, ScriptCaller.Create(cam.SpawnDiagCameraShake));
786 }
787
788 //---------------------------------------------
789 static void CBMiscQuickFishing(bool enabled)
790 {
791 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
792 DiagToggleRPC(enabled, player.IsQuickFishing(), ERPCs.DIAG_MISC_QUICK_FISHING);
793 }
794
795 //---------------------------------------------
796 static void CBMiscShockImpact(bool enabled, int id)
797 {
798 DiagButtonAction(enabled, id, ScriptCaller.Create(ShockImpact));
799 }
800
801 static void ShockImpact()
802 {
803 static float intensity;
804 intensity += 0.25;
805 intensity = Math.WrapFloat(intensity, 0.25, 1);
806
807 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
808 player.SpawnShockEffect(intensity);
809 }
810
811 //---------------------------------------------
812 static void CBMiscPlugArrows(bool enabled)
813 {
814 GetGame().EnableEMPlugs(enabled);
815 }
816
817 //---------------------------------------------
818 static void CBMiscTargetableByAI(bool enabled, int id)
819 {
820 PlayerBase player = GetPlayer();
821 if (player)
822 DiagToggleRPC(enabled, player.m_CanBeTargetedDebug, ERPCs.DIAG_MISC_TARGETABLE_BY_AI);
823 }
824
825 //---------------------------------------------
826 static void CBMiscHitIndication()
827 {
828 PlayerBase player = GetPlayer();
829
830 if (DiagMenu.GetBool(DiagMenuIDs.MISC_HIT_INDICATION_DEBUG))
831 {
832 HitDirectionEffectBase.m_Mode = DiagMenu.GetValue(DiagMenuIDs.MISC_HIT_INDICATION_MODE);
833 HitDirectionEffectBase.m_ID = DiagMenu.GetValue(DiagMenuIDs.MISC_HIT_INDICATION_TYPE);
838 HitDirectionEffectBase.m_Scatter = DiagMenu.GetRangeValue(DiagMenuIDs.MISC_HIT_INDICATION_SCATTER);
839
840 if (player)
841 {
842 player.SetHitPPEEnabled(!DiagMenu.GetBool(DiagMenuIDs.MISC_HIT_INDICATION_DISABLE_PPE));
843 }
844 }
845 else
846 {
848 if (player)
849 {
850 player.SetHitPPEEnabled(CfgGameplayHandler.GetHitIndicationPPEEnabled());
851 }
852 }
853 }
854
855 //---------------------------------------------
856 static void CBMiscHitIndicationSpawnHit(bool enabled, int id)
857 {
858 DiagButtonAction(enabled, id, ScriptCaller.Create(SpawnHitDirEffect));
859 }
860
861 static void SpawnHitDirEffect()
862 {
863 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
864 GetGame().GetMission().GetHud().SpawnHitDirEffect(player, DiagMenu.GetRangeValue(DiagMenuIDs.MISC_HIT_INDICATION_SPAWN_HIT_DIRECTION), 1.0);
865 }
866
867 //---------------------------------------------
868 static void CBDebugMonitor(bool enabled, int id)
869 {
870 SendDiagRPC(enabled, ERPCs.DIAG_MISC_DEBUG_MONITOR, true);
871
872 if (enabled)
874 else
876 }
877
878 static void CBPRADrawAll(bool enabled, int id)
879 {
882 }
883
884 static void CBPRADetect(bool enabled, int id)
885 {
886 if (enabled)
887 {
888 DayZPlayer player = GetGame().GetPlayer();
890 bool res = CfgPlayerRestrictedAreaHandler.IsPointInPlayerRestrictedArea(player.GetPosition(),pra);
891 if (res)
892 Print("player: " + player + " | at position: " + player.GetPosition() + " | intersects area: " + pra.areaName);
893 else
894 Print("player: " + player + " | at position: " + player.GetPosition() + " | is NOT in any PlayerRestrictedArea");
895 }
896 DiagMenu.SetValue(DiagMenuIDs.MISC_PRA_DETECT, false);
897 }
898
899 //---------------------------------------------
900 static void CBMiscFreezeEntity(bool enabled, int id)
901 {
902 DiagButtonAction(enabled, id, ScriptCaller.Create(FreezeEntity));
903 }
904
905 static void FreezeEntity()
906 {
907 EntityAI entity;
908 if (PluginSceneManager.GetInstance() && PluginSceneManager.GetInstance().IsOpened())
909 {
910 // Scene Editor
911 SceneObject scene_obj = PluginSceneManager.GetInstance().GetSelectedSceneObject();
912
913 if (scene_obj)
914 {
915 entity = scene_obj.GetObject();
916 }
917 }
918 else
919 {
920 // FreeDebugCamera
921 FreeDebugCamera camera = FreeDebugCamera.GetInstance();
922 entity = EntityAI.Cast(camera.GetCrosshairObject());
923 }
924
925 if (entity)
926 entity.DisableSimulation(!entity.GetIsSimulationDisabled());
927 }
928
929 //---------------------------------------------
930 static void CBMiscFreezePlayer(bool enabled, int id)
931 {
932 DiagButtonAction(enabled, id, ScriptCaller.Create(FreezePlayer));
933 }
934
935 static void FreezePlayer()
936 {
937 EntityAI player = GetGame().GetPlayer();
938 if (player)
939 player.DisableSimulation(!player.GetIsSimulationDisabled());
940 }
941
942 //---------------------------------------------
943 static void CBVehicleDebugOutput(int value)
944 {
945
946 int bitValue = 0;
947 if (value == 1)//"Basic"
948 {
949 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED;
950 }
951 if (value == 2)//"Extended"
952 {
953 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.DAMAGE_CONSIDERED;
954 }
955 else if (value == 3)//"Contact"
956 {
957 bitValue = EVehicleDebugOutputType.CONTACT;
958 }
959 else if (value == 4)//"Basic" + "Contact"
960 {
961 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.CONTACT;
962 }
963 SendDiagRPC(bitValue, ERPCs.DIAG_VEHICLE_DEBUG_OUTPUT, true);
964 }
965
966 //---------------------------------------------
967 static void CBDumpCrashData(bool value)
968 {
969 if (value)
970 {
971 SendDiagRPC(true, ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_REQUEST, true);
972 DiagMenu.SetValue(DiagMenuIDs.VEHICLE_DUMP_CRASH_DATA, 0);
973 }
974 //DiagButtonRPC(value, DiagMenuIDs.VEHICLE_DUMP_CRASH_DATA, ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_REQUEST, true);
975
976 }
977
978 //---------------------------------------------
979 static void SimulateMode(bool enabled, int id, int rpc)
980 {
981 int value = DiagMenu.GetRangeValue(DiagMenuIDs.SIMULATE_MODE);
982
983 switch (value)
984 {
985 case 0:
986 {
987 DiagButtonRPC(enabled, id, rpc, true);
988 break;
989 }
990 case 1:
991 {
992 DiagButtonRPCSelf(enabled, id, rpc);
993 break;
994 }
995 case 2:
996 {
997 DiagButtonRPC(enabled, id, rpc, true);
998 DiagButtonRPCSelf(enabled, id, rpc);
999 break;
1000 }
1001 }
1002 }
1003
1004 //---------------------------------------------
1005 static void CBSimulateInfiniteLoop(bool enabled, int id)
1006 {
1007 SimulateMode(enabled, id, ERPCs.DIAG_SIMULATE_INFINITE_LOOP);
1008 }
1009
1010 //---------------------------------------------
1011 static void CBSimulateNullPointer(bool enabled, int id)
1012 {
1013 SimulateMode(enabled, id, ERPCs.DIAG_SIMULATE_NULL_POINTER);
1014 }
1015
1016 //---------------------------------------------
1017 static void CBSimulateDivisionByZero(bool enabled, int id)
1018 {
1019 SimulateMode(enabled, id, ERPCs.DIAG_SIMULATE_DIVISION_BY_ZERO);
1020 }
1021
1022 //---------------------------------------------
1023 static void CBSimulateErrorFunction(bool enabled, int id)
1024 {
1025 SimulateMode(enabled, id, ERPCs.DIAG_SIMULATE_ERROR_FUNCTION);
1026 }
1027
1028 //---------------------------------------------
1029 static void CBWeaponParticles(bool enabled)
1030 {
1031 DiagToggleRPCServer(enabled, PrtTest.m_GunParticlesState, ERPCs.DIAG_WEAPON_PARTICLES);
1032 }
1033
1034 //---------------------------------------------
1035 static void CBWeaponDebug(bool enabled)
1036 {
1037 PlayerBase player = GetPlayer();
1038 DiagToggleAction(enabled, ScriptCaller.Create(player.ShowWeaponDebug), player.IsWeaponDebugEnabled());
1039 }
1040
1041 //---------------------------------------------
1042 static void CBWeaponAimNoise(bool enabled)
1043 {
1044 PlayerBase player = GetPlayer();
1045 if (player)
1046 {
1047 DayZPlayerImplementAiming aimModel = player.GetAimingModel();
1048 DiagToggleAction(enabled, ScriptCaller.Create(aimModel.SetAimNoiseAllowed), aimModel.IsAimNoiseAllowed());
1049 }
1050 }
1051
1052 //---------------------------------------------
1053 static void CBWeaponRecoil(bool enabled)
1054 {
1055 PlayerBase player = GetPlayer();
1056 if (player)
1057 {
1058 DayZPlayerImplementAiming aimModel = player.GetAimingModel();
1059 DiagToggleRPC(enabled, aimModel.IsProceduralRecoilEnabled(), ERPCs.DIAG_WEAPON_RECOIL);
1060 }
1061 }
1062
1063 //---------------------------------------------
1064 static void CBWeaponUnlimitedAmmo(bool enabled)
1065 {
1066 DiagDebugAction(DebugActionType.UNLIMITED_AMMO, enabled);
1067 }
1068
1069 //---------------------------------------------
1070 static void CBWeaponBurstVersion(int value)
1071 {
1072 PlayerBase player = GetPlayer();
1073 WeaponManager wpnMngr = player.GetWeaponManager();
1074 DiagToggleRPC(value, wpnMngr.GetBurstOption(), ERPCs.DIAG_WEAPON_BURST_VERSION);
1075 }
1076
1077 //---------------------------------------------
1078 static void CBBleedingSources(bool enabled)
1079 {
1080 PlayerBase player = GetPlayer();
1081 player.GetBleedingManagerRemote().SetDiag(enabled);
1082 }
1083
1084 //---------------------------------------------
1085 static void CBBleedingDisableBloodLoss(bool enabled)
1086 {
1087 SendDiagRPC(enabled, ERPCs.DIAG_BLEEDING_DISABLE_BLOOD_LOSS, true);
1088 }
1089
1090 //---------------------------------------------
1091 static void CBBleedingActivateSource(int value)
1092 {
1093 SendDiagRPC(value, ERPCs.DIAG_BLEEDING_ACTIVATE_SOURCE, true);
1094 }
1095
1096 //---------------------------------------------
1097 static void CBBleedingActivateAllSources(bool enabled, int id)
1098 {
1099 DiagButtonRPC(enabled, id, ERPCs.DIAG_BLEEDING_ACTIVATE_ALL_SOURCES, true);
1100 }
1101
1102 //---------------------------------------------
1103 static void CBBleedingActivateSourceLevel(int value)
1104 {
1105 PlayerBase player = GetPlayer();
1106 BleedingSourcesManagerBase mgr = player.GetBleedingManagerRemote();
1107
1108 int idx = 100; //invalid index, just deletes all
1109 if (value != 0)
1110 {
1111 string bone = ""; //lower-case!
1112 switch (value)
1113 {
1114 case 1: //PlayerConstants.BLEEDING_SOURCE_FLOW_MODIFIER_LOW
1115 bone = "lefttoebase";
1116 break;
1117
1118 case 2: //PlayerConstants.BLEEDING_SOURCE_FLOW_MODIFIER_MEDIUM
1119 bone = "leftarm";
1120 break;
1121
1122 case 3: //PlayerConstants.BLEEDING_SOURCE_FLOW_MODIFIER_HIGH
1123 bone = "neck";
1124 break;
1125 }
1126
1127 int count = mgr.m_BleedingSourceZone.Count();
1128
1129 for (int i = 0; i < count; ++i)
1130 {
1131 if (mgr.m_BleedingSourceZone.GetKey(i) == bone)
1132 {
1133 idx = i;
1134 break;
1135 }
1136 }
1137 }
1138
1139 CBBleedingActivateSource(idx);
1140 }
1141
1142 //---------------------------------------------
1143 static void CBBleedingReload(bool enabled, int id)
1144 {
1145 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
1146 BleedingSourcesManagerRemote bsMngrRem = player.GetBleedingManagerRemote();
1147 DiagButtonAction(enabled, id, ScriptCaller.Create(bsMngrRem.Reload));
1148 }
1149
1150 //---------------------------------------------
1151 static void CBBBleedingIndicators()
1152 {
1153 bool diagEnable = DiagMenu.GetBool(DiagMenuIDs.BLEEDINGINDICATORS);
1155 {
1157 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
1158 if (player && player.GetBleedingManagerRemote())
1159 {
1160 player.GetBleedingManagerRemote().Reload();
1161 }
1162 }
1163
1165
1167 {
1180
1181 DbgBleedingIndicationStaticInfo.m_DbgDropDesaturate = DiagMenu.GetBool(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_ENABLEDESATURATION);
1182 DbgBleedingIndicationStaticInfo.m_DbgDesaturationEnd = DiagMenu.GetRangeValue(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_DESATURATIONEND);
1188 }
1189 }
1190
1191 //---------------------------------------------
1192 static void CBLogsActions(bool enabled)
1193 {
1194 DiagToggleRPC(enabled, LogManager.IsActionLogEnable(), ERPCs.DIAG_LOGS_ACTIONS);
1195 }
1196
1197 //---------------------------------------------
1198 static void CBLogsWeapons(bool enabled)
1199 {
1200 DiagToggleRPC(enabled, LogManager.IsWeaponLogEnable(), ERPCs.DIAG_LOGS_WEAPONS);
1201 }
1202
1203 //---------------------------------------------
1204 static void CBLogsSync(bool enabled)
1205 {
1206 DiagToggleRPC(enabled, LogManager.IsSyncLogEnable(), ERPCs.DIAG_LOGS_SYNC);
1207 }
1208
1209 //---------------------------------------------
1210 static void CBLogsBaseBuilding(bool enabled)
1211 {
1212 DiagToggleRPC(enabled, LogManager.IsBaseBuildingLogEnable(), ERPCs.DIAG_LOGS_BASEBUILDING);
1213 }
1214
1215 //---------------------------------------------
1216 static void CBLogsSymptoms(bool enabled)
1217 {
1218 DiagToggleRPC(enabled, LogManager.IsSymptomLogEnable(), ERPCs.DIAG_LOGS_SYMPTOMS);
1219 }
1220
1221 //---------------------------------------------
1222 static void CBLogsInventoryMove(bool enabled)
1223 {
1224 DiagToggleRPC(enabled, LogManager.IsInventoryMoveLogEnable(), ERPCs.DIAG_LOGS_INVENTORY_MOVE);
1225 }
1226
1227 //---------------------------------------------
1228 static void CBLogsInventoryReservation(bool enabled)
1229 {
1230 DiagToggleRPC(enabled, LogManager.IsInventoryReservationLogEnable(), ERPCs.DIAG_LOGS_INVENTORY_RESERVATION);
1231 }
1232
1233 //---------------------------------------------
1234 static void CBLogsInventoryHFSM(bool enabled)
1235 {
1236 DiagToggleRPC(enabled, LogManager.IsInventoryHFSMLogEnable(), ERPCs.DIAG_LOGS_INVENTORY_HFSM);
1237 }
1238
1239 //---------------------------------------------
1240 static void CBLogsQuickbar(bool enabled)
1241 {
1242 DiagToggleRPC(enabled, LogManager.IsQuickbarLogEnable(), ERPCs.DIAG_LOGS_QUICKBAR);
1243 }
1244
1245 //---------------------------------------------
1246 static void CBLogsBleedingChances(bool enabled)
1247 {
1248 DiagToggleRPC(enabled, LogManager.IsBleedingChancesLogEnable(), ERPCs.DIAG_LOGS_BLEEDING_CHANCES);
1249 }
1250
1251 //---------------------------------------------
1252 static void CBTriggerDebug(bool enabled)
1253 {
1254 EnableDebugSystemClient(ESubscriberSystems.TRIGGERS, enabled);
1255 }
1256
1257 //---------------------------------------------
1258 static void CBBaseBuildingWood(bool enabled)
1259 {
1260 SendDiagRPC(enabled, ERPCs.DIAG_BASEBUILDING_WOOD, true);
1261 }
1262
1263 //---------------------------------------------
1264 static void CBBaseBuildingGate(bool enabled)
1265 {
1266 SendDiagRPC(enabled, ERPCs.DIAG_BASEBUILDING_GATE, true);
1267 }
1268
1269 //---------------------------------------------
1270 static void CBFinishersFinisherForced(int value)
1271 {
1272 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
1273 DiagToggleRPC(value - 1, player.GetMeleeCombat().DebugGetForcedFinisherType(), ERPCs.DIAG_FINISHERS_FORCE_FINISHER);
1274 }
1275
1276 //---------------------------------------------
1277 static void CBCameraToolsEnableRemoteCamera(bool enabled)
1278 {
1279 PlayerBase player = GetPlayer();
1280
1281 if (!player)
1282 return;
1283
1284 if (!enabled && player.m_CameraToolsMenuClient)
1285 {
1286 player.m_CameraToolsMenuClient.DelayedDestroy();
1287 }
1288
1289 auto param = new Param2<bool, EntityAI>(enabled, GetGame().GetPlayer());
1290 GetGame().RPCSingleParam( null, ERPCs.DIAG_CAMERATOOLS_CAM_SUBSCRIBE, param, true );
1291 }
1292
1293 //---------------------------------------------
1294 // Misc
1295 //---------------------------------------------
1296 static PlayerBase GetPlayer()
1297 {
1298 if (!GetGame())
1299 return null;
1300
1301 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
1302
1303 if (DiagMenu.GetBool(DiagMenuIDs.MISC_ACTION_ON_CURSOR))
1304 {
1305 float hitFraction;
1307 vector end = start + (GetGame().GetCurrentCameraDirection() * 5.0);
1308
1309 vector hitPos, hitNormal;
1310 Object hitObj;
1311
1312 PhxInteractionLayers hitMask = 0xFFFFFFFFFF;
1313
1314 DayZPhysics.RayCastBullet(start, end, hitMask, null, hitObj, hitPos, hitNormal, hitFraction);
1315 Class.CastTo(player, hitObj);
1316 }
1317
1318 return player;
1319 }
1320
1321 //---------------------------------------------
1322 // DebugAction
1323 //---------------------------------------------
1324 static void DiagDebugAction(DebugActionType type, bool enable)
1325 {
1326 int mask;
1327 if (enable)
1328 {
1329 mask = (ItemBase.GetDebugActionsMask() | type);
1330 }
1331 else
1332 {
1333 mask = (ItemBase.GetDebugActionsMask() & (~type));
1334 }
1335
1336 DiagToggleRPCAction(mask, ScriptCaller.Create(ItemBase.SetDebugActionsMask), ItemBase.HasDebugActionsMask(type), ERPCs.DIAG_ITEM_DEBUG_ACTIONS);
1337 }
1338
1339 //---------------------------------------------
1340 // SubscriberClient
1341 //---------------------------------------------
1342 static void EnableDebugSystemClient(ESubscriberSystems system, bool enable)
1343 {
1344 int mask;
1345 if (enable)
1346 {
1347 mask = (m_SystemsMask | system);//turn on bit
1348 }
1349 else
1350 {
1351 mask = (m_SystemsMask & (~system));//turn off bit
1352 }
1353
1354 if (mask != m_SystemsMask)
1355 {
1356 CachedObjectsParams.PARAM1_INT.param1 = mask;
1357 GetGame().RPCSingleParam( GetGame().GetPlayer(), ERPCs.DEV_DIAGMENU_SUBSCRIBE, CachedObjectsParams.PARAM1_INT, true, GetGame().GetPlayer().GetIdentity() );
1358 m_SystemsMask = mask;
1359 }
1360 }
1361
1362
1363 //---------------------------------------------
1364 // Helper diag functions
1365 //---------------------------------------------
1366 static void DiagButtonActionParams(bool enabled, int id, ScriptCaller action, Param params)
1367 {
1368 if ( enabled )
1369 {
1370 action.Invoke(params);
1371 DiagMenu.SetValue(id, false);
1372 }
1373 }
1374
1375 //---------------------------------------------
1376 static void DiagButtonAction(bool enabled, int id, ScriptCaller action)
1377 {
1378 DiagButtonActionParams(enabled, id, action, null);
1379 }
1380
1381 //---------------------------------------------
1382 static void DiagButtonRPC(bool enabled, int id, int rpc, bool serverOnly = false)
1383 {
1384 ScriptCaller action = ScriptCaller.Create(SendDiagRPCBasic);
1385 SendDiagRPCBasicParam params = new SendDiagRPCBasicParam(rpc, serverOnly);
1386
1387 DiagButtonActionParams(enabled, id, action, params);
1388 }
1389
1390 //---------------------------------------------
1391 static void DiagButtonRPCSelf(bool enabled, int id, int rpc)
1392 {
1393 ScriptCaller action = ScriptCaller.Create(SendDiagRPCSelfBasic);
1394 SendDiagRPCSelfBasicParam params = new SendDiagRPCSelfBasicParam(rpc);
1395
1396 DiagButtonActionParams(enabled, id, action, params);
1397 }
1398
1399 //---------------------------------------------
1400 static void DiagButtonRPCIntInt(bool enabled, int id, int value, int value2, int rpc, bool serverOnly = false)
1401 {
1402 ScriptCaller action = ScriptCaller.Create(SendDiagRPCParam);
1403
1404 CachedObjectsParams.PARAM2_INT_INT.param1 = value;
1405 CachedObjectsParams.PARAM2_INT_INT.param2 = value2;
1406 SendDiagRPCParamParam params = new SendDiagRPCParamParam(rpc, serverOnly, CachedObjectsParams.PARAM2_INT_INT);
1407
1408 DiagButtonActionParams(enabled, id, action, params);
1409 }
1410
1411 //---------------------------------------------
1412 static void DiagToggleRPC(bool value, int current, int rpc)
1413 {
1414 if (value != current)
1415 {
1416 SendDiagRPC(value, rpc, false);
1417 }
1418 }
1419
1420 //---------------------------------------------
1421 static void DiagToggleRPC(int value, int current, int rpc)
1422 {
1423 if (value != current)
1424 {
1425 SendDiagRPC(value, rpc, false);
1426 }
1427 }
1428
1429 //---------------------------------------------
1430 static void DiagToggleRPC(float value, int current, int rpc)
1431 {
1432 if (value != current)
1433 {
1434 SendDiagRPC(value, rpc, false);
1435 }
1436 }
1437
1438 //---------------------------------------------
1439 static void DiagToggleRPCServer(bool value, out bool current, int rpc)
1440 {
1441 if (value != current)
1442 {
1443 current = value;
1444 SendDiagRPC(value, rpc, true);
1445 }
1446 }
1447
1448 //---------------------------------------------
1449 static void DiagToggleRPCServer(int value, out int current, int rpc)
1450 {
1451 if (value != current)
1452 {
1453 current = value;
1454 SendDiagRPC(value, rpc, true);
1455 }
1456 }
1457
1458 //---------------------------------------------
1459 static void DiagToggleRPCServer(float value, out float current, int rpc)
1460 {
1461 if (value != current)
1462 {
1463 current = value;
1464 SendDiagRPC(value, rpc, true);
1465 }
1466 }
1467
1468 //---------------------------------------------
1469 static void DiagToggleRPCAction(int value, ScriptCaller action, int current, int rpc)
1470 {
1471 if (value != current)
1472 {
1473 SendDiagRPC(value, rpc);
1474 action.Invoke(value);
1475 }
1476 }
1477
1478 //---------------------------------------------
1479 static void DiagToggleAction(int value, ScriptCaller action, int current)
1480 {
1481 if (value != current)
1482 {
1483 action.Invoke(value);
1484 }
1485 }
1486
1487 //---------------------------------------------
1488 static void SendDiagRPCSelf(Param value, int rpc)
1489 {
1490 PlayerBase player = GetPlayer();
1491 if (player)
1492 {
1493 GetGame().RPCSelfSingleParam(player, rpc, value);
1494 }
1495 }
1496
1497 //---------------------------------------------
1498 static void SendDiagRPCSelfBasic(SendDiagRPCSelfBasicParam param)
1499 {
1500 SendDiagRPCSelf(null, param.param1);
1501 }
1502
1503 //---------------------------------------------
1504 static void SendDiagRPCSelfParam(SendDiagRPCSelfParamParam param)
1505 {
1506 SendDiagRPCSelf(param.param2, param.param1);
1507 }
1508
1509 //---------------------------------------------
1510 static void SendDiagRPC(Param value, int rpc, bool serverOnly = false)
1511 {
1512 PlayerBase player = GetPlayer();
1513 if (player)
1514 {
1515 PlayerIdentity playerIdentity = player.GetIdentity();
1516 if (GetGame().IsMultiplayer() && playerIdentity)
1517 {
1518 GetGame().RPCSingleParam(player, rpc, value, true, playerIdentity);
1519 }
1520
1521 if (!GetGame().IsMultiplayer() || !serverOnly)
1522 {
1523 GetGame().RPCSelfSingleParam(player, rpc, value);
1524 }
1525 }
1526 }
1527
1528 //---------------------------------------------
1529 static void SendDiagRPCBasic(SendDiagRPCBasicParam param)
1530 {
1531 SendDiagRPC(null, param.param1, param.param2);
1532 }
1533
1534 //---------------------------------------------
1535 static void SendDiagRPCParam(SendDiagRPCParamParam param)
1536 {
1537 SendDiagRPC(param.param3, param.param1, param.param2);
1538 }
1539
1540 //---------------------------------------------
1541 static void SendDiagRPC(int rpc, bool serverOnly = false)
1542 {
1543 SendDiagRPC(null, rpc, serverOnly);
1544 }
1545
1546 //---------------------------------------------
1547 static void SendDiagRPC(bool value, int rpc, bool serverOnly = false)
1548 {
1549 CachedObjectsParams.PARAM1_BOOL.param1 = value;
1550 SendDiagRPC(CachedObjectsParams.PARAM1_BOOL, rpc, serverOnly);
1551 }
1552
1553 //---------------------------------------------
1554 static void SendDiagRPC(int value, int rpc, bool serverOnly = false)
1555 {
1556 CachedObjectsParams.PARAM1_INT.param1 = value;
1557 SendDiagRPC(CachedObjectsParams.PARAM1_INT, rpc, serverOnly);
1558 }
1559
1560 //---------------------------------------------
1561 static void SendDiagRPC(float value, int rpc, bool serverOnly = false)
1562 {
1563 CachedObjectsParams.PARAM1_FLOAT.param1 = value;
1564 SendDiagRPC(CachedObjectsParams.PARAM1_FLOAT, rpc, serverOnly);
1565 }
1566#endif
1567}
enum EScriptInvokerInsertFlags ScriptCaller()
Designed to hold 1 valid call.
Param3 int
PhxInteractionLayers
Определения DayZPhysics.c:2
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
Определения DayZPlayerImplementFallDamage.c:73
Mission mission
Определения DisplayStatus.c:28
DiagMenuIDs
Определения EDiagMenuIDs.c:2
ERPCs
Определения ERPCs.c:2
void Environment(PlayerBase pPlayer)
Определения Environment.c:106
PlayerBase GetPlayer()
Определения ModifierBase.c:51
DebugActionType
Определения PluginDiagMenu.c:7
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
void UiHintPanel(Widget parent_widget)
Определения UiHintPanel.c:324
ref map< string, ref BleedingSourceZone > m_BleedingSourceZone
Определения BleedingSourcesManagerBase.c:4
proto native void RPCSelfSingleParam(Object target, int rpcType, Param param)
proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
proto native World GetWorld()
proto native DayZPlayer GetPlayer()
proto native vector GetCurrentCameraPosition()
proto native vector GetCurrentCameraDirection()
proto native Mission GetMission()
static ref Param1< bool > PARAM1_BOOL
Определения UtilityClasses.c:12
static ref Param1< int > PARAM1_INT
Определения UtilityClasses.c:11
static ref Param2< int, int > PARAM2_INT_INT
Определения UtilityClasses.c:16
static ref Param1< float > PARAM1_FLOAT
Определения UtilityClasses.c:13
static ref Param2< float, float > PARAM2_FLOAT_FLOAT
Определения UtilityClasses.c:21
static bool GetHitIndicationPPEEnabled()
Определения CfgGameplayHandler.c:387
static void DrawBoxesDebug(bool draw)
static void DrawPolygonLinesDebug(bool draw)
static bool IsPointInPlayerRestrictedArea(vector point, out PlayerRestrictedAreaInstance hitArea)
Super root of all classes in Enforce script.
Определения EnScript.c:11
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
Определения DayZPhysics.c:124
void SetAimNoiseAllowed(bool state)
Определения DayZPlayerImplementAiming.c:129
at which point does the stabilization start to get affected
Определения DayZPlayerImplementAiming.c:33
static bool m_DbgEnableBleedingIndication
Определения BleedingIndicationStaticInfo.c:4
static float m_DbgDropProgressTreshold
Определения BleedingIndicationStaticInfo.c:11
static float m_DbgDropSizeVariationMax
Определения BleedingIndicationStaticInfo.c:15
static float m_DbgDropSizeVariationMin
Определения BleedingIndicationStaticInfo.c:14
static info (non-constants)
Определения BleedingIndicationStaticInfo.c:3
Определения DbgUI.c:60
Определения EnDebug.c:241
static int m_RotationOverride
Определения HitDirectionBase.c:177
static float m_Scatter
Определения HitDirectionBase.c:178
static int m_ID
Определения HitDirectionBase.c:171
static int m_Mode
Определения HitDirectionBase.c:170
static float m_DurationMax
Определения HitDirectionBase.c:174
static float m_BreakPointBase
Определения HitDirectionBase.c:175
static void CheckValues()
range 0..180, randomized offset of direction to make it less acurate
Определения HitDirectionBase.c:181
static float m_DistanceAdjust
range 0..1, a point where the fading starts
Определения HitDirectionBase.c:176
void SpawnHitDirEffect(DayZPlayer player, float hit_direction, float intensity_max)
proto native Transport GetTransport()
proto native int GetVehicleSeat()
Определения human.c:690
static bool IsWeaponLogEnable()
Определения 3_Game/tools/Debug.c:718
static bool IsBaseBuildingLogEnable()
Определения 3_Game/tools/Debug.c:698
static bool IsInventoryReservationLogEnable()
Определения 3_Game/tools/Debug.c:658
static bool IsSymptomLogEnable()
Определения 3_Game/tools/Debug.c:708
static bool IsSyncLogEnable()
Определения 3_Game/tools/Debug.c:678
static bool IsInventoryHFSMLogEnable()
Определения 3_Game/tools/Debug.c:668
static bool IsBleedingChancesLogEnable()
Определения 3_Game/tools/Debug.c:733
static bool IsInventoryMoveLogEnable()
Определения 3_Game/tools/Debug.c:648
static bool IsActionLogEnable()
Определения 3_Game/tools/Debug.c:638
static bool IsQuickbarLogEnable()
Определения 3_Game/tools/Debug.c:688
Определения 3_Game/tools/Debug.c:594
proto void SetParamByIndex(int paramIndex, void value)
Определения proto.c:268
Определения EnMath.c:7
void HideDebugMonitor()
Определения gameplay.c:782
Hud GetHud()
Определения gameplay.c:721
void CreateDebugMonitor()
Определения gameplay.c:781
Mission class.
Определения gameplay.c:687
Определения ObjectTyped.c:2
Определения PPEConstants.c:68
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения SurvivorBase.c:2
Определения PlayerBaseClient.c:2
The class that will be instanced (moddable)
Определения gameplay.c:389
void PluginUniversalTemperatureSourceClient()
void PluginSceneManager()
Определения PluginSceneManager.c:21
void OnInit()
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
Определения PluginDeveloper.c:61
Определения PluginDiagMenu.c:30
static bool m_GunParticlesState
Определения gameplay.c:1538
Определения gameplay.c:1537
EntityAI GetObject()
Определения SceneObject.c:59
Определения SceneObject.c:2
proto bool Read(void value_in)
float GetSpecialtyLevel()
Определения SoftSkillsManager.c:296
bool GetSoftSkillsState()
Определения SoftSkillsManager.c:317
bool IsLinear()
Определения SoftSkillsManager.c:329
bool IsDebug()
Определения SoftSkillsManager.c:409
void CreateDebugWindow(bool create)
Определения SoftSkillsManager.c:377
override Shape DebugFreeAreaAtDoor(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
Определения Car.c:136
Определения WeaponManager.c:2
proto native Material GetMaterial(string materialName)
Определения EnConvert.c:106
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
Определения dayzplayer.c:56
Serializer ParamsReadContext
Определения gameplay.c:15
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto void InputFloat(string txt, out float value, int pxWidth=150)
static proto native void Text(string label)
static proto native void SameLine()
static proto native void Spacer(int height)
static proto void SetValue(int id, int value)
Set value at the given script id.
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
static proto bool BindCallback(int id, func callback)
Bind a callback to the given id.
static proto int GetValue(int id)
Get value as int from the given script id.
static proto float GetRangeValue(int id)
Get range value at the given script id.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float WrapFloat(float f, float min, float max)
Returns wrap number to specified interval [min, max[.
proto native void OnUpdate()
Определения 3_Game/tools/tools.c:349