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