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