9 static int m_SystemsMask;
12 bool m_ModifiersEnabled =
true;
14 bool m_StaminaDisabled;
18 bool m_LogPlayerStats;
19 Shape m_VehicleFreeAreaBox;
20 ref EnvDebugData m_EnvDebugData;
21 ref FallDamageDebugData m_FallDamageDebugData;
23 ref WeaponLiftDiag m_WeaponLiftDiag =
new WeaponLiftDiag();
33 protected void BindCallbacks()
94 DiagMenu.BindCallback(
DiagMenuIDs.MISC_ENVIRONMENT_LOGGING_DRYWET, CBMiscEnvironmentLoggingDryWet);
95 DiagMenu.BindCallback(
DiagMenuIDs.MISC_ENVIRONMENT_LOGGING_ITEMHEAT, CBMiscEnvironmentLoggingItemHeat);
105 DiagMenu.BindCallback(
DiagMenuIDs.MISC_UNIVERSAL_TEMPERATURE_SOURCES, CBMiscUniversalTemperatureSources);
108 DiagMenu.BindCallback(
DiagMenuIDs.MISC_GO_UNCONSCIOUS_DELAYED, CBMiscGoUnconsciousDelayed);
130 DiagMenu.BindCallback(
DiagMenuIDs.MISC_HIT_INDICATION_SPAWN_HIT, CBMiscHitIndicationSpawnHit);
170 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDING_DISABLE_BLOOD_LOSS, CBBleedingDisableBloodLoss);
172 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDING_ACTIVATE_ALL_SOURCES, CBBleedingActivateAllSources);
173 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDING_ACTIVATE_SOURCE_LEVEL, CBBleedingActivateSourceLevel);
180 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_USEVALUEOVERRIDES, CBBBleedingIndicators);
181 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_RANDOMROTATION, CBBBleedingIndicators);
182 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_SEQUENCE_DURATION, CBBBleedingIndicators);
183 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_BASEDURATION, CBBBleedingIndicators);
184 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_MINDELAY, CBBBleedingIndicators);
185 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_MAXDELAY, CBBBleedingIndicators);
186 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_PROGRESSTHRESHOLD, CBBBleedingIndicators);
187 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_STARTSIZE, CBBBleedingIndicators);
189 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_RNDSCALEMIN, CBBBleedingIndicators);
190 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_RNDSCALEMAX, CBBBleedingIndicators);
192 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_SLIDEDISTANCE, CBBBleedingIndicators);
197 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_ENABLEDESATURATION, CBBBleedingIndicators);
198 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_DESATURATIONEND, CBBBleedingIndicators);
202 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_A_START, CBBBleedingIndicators);
203 DiagMenu.BindCallback(
DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_A_END, CBBBleedingIndicators);
242 DiagMenu.BindCallback(
DiagMenuIDs.CAMERATOOLS_ENABLE_REMOTE_CAMERA, CBCameraToolsEnableRemoteCamera);
248 super.OnRPC(player, rpc_type, ctx);
252 case ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG_DATA:
255 m_EnvDebugData =
new EnvDebugData();
257 ctx.Read(m_EnvDebugData);
261 case ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG_DATA:
263 if (!m_FallDamageDebugData)
264 m_FallDamageDebugData =
new FallDamageDebugData();
266 ctx.Read(m_FallDamageDebugData);
270 case ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_CONTENTS:
272 Param1<array<ref CrashDebugData>> par =
new Param1<array<ref CrashDebugData>>(null);
275 CrashDebugData.DumpDataArray(par.param1);
282 override void OnUpdate(
float delta_time)
284 super.OnUpdate(delta_time);
294 UpdateMiscVehicleGetOutBox();
295 UpdateEnvironmentDebug();
297 UpdateMaterialDebug();
298 UpdateWeaponLiftDiag(delta_time);
302 void CheckTimeAccel()
304 if (!FeatureTimeAccel.m_CurrentTimeAccel)
311 TimeAccelParam param = GetTimeAccelMenuState();
313 if (!FeatureTimeAccel.AreTimeAccelParamsSame(param, FeatureTimeAccel.m_CurrentTimeAccel))
315 int timeAccelBig = param.param2;
316 float timeAccelSmall = param.param2 - timeAccelBig;
317 FeatureTimeAccel.CopyTimeAccelClipboard(param.param1, timeAccelBig, timeAccelSmall, param.param3 );
319 FeatureTimeAccel.m_CurrentTimeAccel = param;
326 static void CBCraftingGenerate(
bool enabled,
int id)
328 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
329 DiagButtonAction(enabled,
id,
ScriptCaller.Create(pluginRecipesManager.CallbackGenerateCache));
333 static void CBCraftingInstant(
bool enabled)
335 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
336 DiagToggleRPC(enabled, pluginRecipesManager.IsEnableDebugCrafting(),
ERPCs.DIAG_CRAFTING_INSTANT);
340 static void CBCraftingDump(
bool enabled,
int id)
342 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
343 DiagButtonAction(enabled,
id,
ScriptCaller.Create(pluginRecipesManager.GenerateHumanReadableRecipeList));
347 static void CBCheatsModifiers(
bool enabled)
350 DiagToggleRPCServer(enabled, pluginDiag.m_ModifiersEnabled,
ERPCs.DIAG_CHEATS_MODIFIERS);
354 static void CBCheatsKillPlayer(
bool enabled,
int id)
356 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_KILL_PLAYER,
true);
360 static void CBCheatsInvincibility(
int value)
363 DiagToggleRPCServer(value, pluginDiag.m_IsInvincible,
ERPCs.DIAG_CHEATS_INVINCIBILITY);
367 static void CBCheatsStaminaDisable(
bool enabled)
371 player.SetStaminaDisabled(enabled);
374 DiagToggleRPCServer(enabled, pluginDiag.m_StaminaDisabled,
ERPCs.DIAG_CHEATS_DISABLE_STAMINA);
378 static void CBCheatsResetPlayer(
bool enabled,
int id)
382 player.ResetPlayer(
false);
383 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_RESET_PLAYER,
true);
387 static void CBCheatsResetPlayerMax(
bool enabled,
int id)
391 player.ResetPlayer(
true);
392 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_RESET_PLAYER_MAX,
true);
396 static void CBCheatsInventoryAccess(
bool enabled)
398 DiagToggleRPCServer(enabled,
PlayerBase.DEBUG_INVENTORY_ACCESS,
ERPCs.DIAG_CHEATS_INVENTORY_ACCESS);
402 static void CBCheatsFixItems(
bool enabled,
int id)
404 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_ITEMS_FIX,
true);
407 static void CBCreateHit(
bool enabled,
int id)
409 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_CREATE_HIT,
true);
412 static void CBCreateHitLight(
bool enabled,
int id)
414 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_CREATE_HIT_LIGHT,
true);
418 static void CBPlayerAgentsInjectActions(
bool enabled)
424 static void CBSoftSkillsShowDebug(
bool enabled)
431 static void CBSoftSkillsToggleState(
bool enabled)
438 static void CBSoftSkillsToggleModel(
bool enabled)
441 DiagToggleRPC(enabled, ssMngr.
IsLinear(),
ERPCs.DIAG_SOFT_SKILLS_TOGGLE_MODEL);
445 static void CBSoftSkillsSpecialtyValue(
float value)
452 static void CBLifespanBloodyHands(
bool enabled)
456 DiagToggleRPCServer(enabled, player.HasBloodyHands(),
ERPCs.DIAG_LIFESPAN_BLOODY_HANDS);
460 static void CBLifespanPlaytimeUpdate(
float value)
463 DiagToggleRPCServer(value * 60, pluginDiag.m_Playtime,
ERPCs.DIAG_LIFESPAN_PLAYTIME_UPDATE);
467 static void CBMiscPersonalLight(
bool enabled)
474 static void CBMiscItemDebugActions(
bool enabled)
480 static void CBMiscLogPlayerStats(
bool enabled)
483 DiagToggleRPC(enabled, pluginDiag.m_LogPlayerStats,
ERPCs.DIAG_MISC_LOG_PLAYER_STATS);
487 static void CBMiscForceHintIndex(
int index)
493 static void CBMiscPermanentCrossHair(
bool enabled)
495 PluginPermanentCrossHair crosshair = PluginPermanentCrossHair.Cast(
GetPlugin(PluginPermanentCrossHair));
496 crosshair.SwitchPermanentCrossHair(enabled);
500 void UpdateMiscVehicleGetOutBox()
504 if (m_VehicleFreeAreaBox)
506 m_VehicleFreeAreaBox.Destroy();
507 m_VehicleFreeAreaBox = null;
510 HumanCommandVehicle hcv =
GetGame().GetPlayer().GetCommand_Vehicle();
516 else if (m_VehicleFreeAreaBox)
518 m_VehicleFreeAreaBox.Destroy();
519 m_VehicleFreeAreaBox = null;
524 static void CBMiscToggleHud(
bool enabled)
527 mission.GetHud().Show(!enabled);
530 mission.HideCrosshairVisibility();
534 mission.RefreshCrosshairVisibility();
539 static void CBMiscEnvironmentDebug(
bool enabled)
541 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG);
544 void UpdateEnvironmentDebug()
547 Environment.DisplayEnvDebugPlayerInfo(
true, m_EnvDebugData);
548 else if (m_EnvDebugData)
549 m_EnvDebugData = null;
553 void UpdateMaterialDebug()
562 void UpdateWeaponLiftDiag(
float delta_time)
568 GetWeaponLiftDiag().DrawDiag(weaponLiftDebug, delta_time);
575 static WeaponLiftDiag GetWeaponLiftDiag()
578 return pluginDiag.m_WeaponLiftDiag;
585 string materialPath =
"Graphics/Materials/postprocess/ghost";
593 DbgUI.Begin(
"GhostEffect Debug");
595 float channelWeights[] = { 0, 0, 0, 0 };
596 float noiseOffset[] = { 0, 0 };
597 float noiseScale[] = { 1, 1 };
598 float noiseLo[] = { 0, 0, 0, 0 };
599 float noiseHi[] = { 1, 1, 1, 1 };
600 float ghostOffset[] = { 0, 0 };
601 float ghostScale[] = { 1, 1 };
602 float colormod[] = { 1, 1, 1, 0.5 };
603 int spacer_height = 10;
605 float rw, gw, bw, aw;
606 DbgUI.Text(
"noise_channel_weight");
608 DbgUI.InputFloat(
"noise_weight_r", rw);
609 DbgUI.InputFloat(
"noise_weight_g", gw);
610 DbgUI.InputFloat(
"noise_weight_b", bw);
611 DbgUI.InputFloat(
"noise_weight_a", aw);
613 DbgUI.Spacer(spacer_height);
616 float nsx = 1, nsy = 1;
617 DbgUI.Text(
"noise_offset");
619 DbgUI.InputFloat(
"noise_offset_x", nox);
620 DbgUI.InputFloat(
"noise_offset_y", noy);
621 DbgUI.InputFloat(
"noise_scale_x", nsx);
622 DbgUI.InputFloat(
"noise_scale_y", nsy);
624 DbgUI.Spacer(spacer_height);
626 float rl = 0, rh = 1;
627 float gl = 0, gh = 1;
628 float bl = 0, bh = 1;
629 float al = 0, ah = 1;
630 DbgUI.Text(
"noise_remap");
632 DbgUI.InputFloat(
"lo_r", rl);
634 DbgUI.InputFloat(
"hi_r", rh);
636 DbgUI.InputFloat(
"lo_g", gl);
638 DbgUI.InputFloat(
"hi_g", gh);
640 DbgUI.InputFloat(
"lo_b", bl);
642 DbgUI.InputFloat(
"hi_b", bh);
644 DbgUI.InputFloat(
"lo_a", al);
646 DbgUI.InputFloat(
"hi_a", ah);
648 DbgUI.Spacer(spacer_height);
650 float gox = 50, goy = 25;
651 float gsx = 0.85, gsy = 0.85;
652 DbgUI.Text(
"ghost_offset");
654 DbgUI.InputFloat(
"ghost_offset_x", gox);
655 DbgUI.InputFloat(
"ghost_offset_y", goy);
656 DbgUI.InputFloat(
"ghost_scale_x", gsx);
657 DbgUI.InputFloat(
"ghost_scale_y", gsy);
659 DbgUI.Spacer(spacer_height);
661 float cmr = 1, cmg = 1, cmb = 1, cma = 1;
662 DbgUI.Text(
"color_mod");
664 DbgUI.InputFloat(
"color_mod_r", cmr);
665 DbgUI.InputFloat(
"color_mod_g", cmg);
666 DbgUI.InputFloat(
"color_mod_b", cmb);
667 DbgUI.InputFloat(
"color_curve", cma);
669 DbgUI.Spacer(spacer_height);
671 channelWeights = { rw, gw, bw, aw };
672 noiseOffset = { nox, noy };
673 noiseScale = { nsx, nsy };
674 noiseLo = { rl, gl, bl, al };
675 noiseHi = { rh, gh, bh, ah };
676 ghostOffset = { gox, goy };
677 ghostScale = { gsx, gsy };
678 colormod = { cmr, cmg, cmb, cma };
683 material.SetParamByIndex(1, channelWeights);
684 material.SetParamByIndex(2, noiseOffset[0]);
685 material.SetParamByIndex(3, noiseOffset[1]);
686 material.SetParamByIndex(4, noiseScale[0]);
687 material.SetParamByIndex(5, noiseScale[1]);
688 material.SetParamByIndex(6, noiseLo);
689 material.SetParamByIndex(7, noiseHi);
690 material.SetParamByIndex(8, ghostOffset[0]);
691 material.SetParamByIndex(9, ghostOffset[1]);
692 material.SetParamByIndex(10, ghostScale[0]);
693 material.SetParamByIndex(11, ghostScale[1]);
694 material.SetParamByIndex(12, colormod );
698 #ifdef ENABLE_LOGGING
699 static void CBMiscEnvironmentLoggingDryWet(
bool enabled)
701 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_DRYWET);
704 static void CBMiscEnvironmentLoggingItemHeat(
bool enabled)
706 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_ITEMHEAT);
710 static void CBMiscFallDamageDebug(
bool enabled)
712 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG);
715 void UpdateFallDamageDebug()
718 DayZPlayerImplementFallDamage.DisplayFallDamageDebugInfo(
true, m_FallDamageDebugData);
719 else if (m_FallDamageDebugData)
720 m_FallDamageDebugData = null;
724 static void CBMiscDisplayPlayerInfo(
int value)
726 PluginRemotePlayerDebugClient prpdc = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
731 static void CBMiscUniversalTemperatureSources(
bool enabled)
738 static void CBMiscBulletImpact(
bool enabled,
int id)
747 static void CBMiscGoUnconscious(
bool enabled,
int id)
749 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_MISC_GO_UNCONSCIOUS,
true);
753 static void CBMiscGoUnconsciousDelayed(
bool enabled,
int id)
755 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_MISC_GO_UNCONSCIOUS_DELAYED,
true);
759 static void CBMiscQuickRestrain(
bool enabled)
762 DiagToggleRPC(enabled, player.IsQuickRestrain(),
ERPCs.DIAG_MISC_QUICK_RESTRAIN);
766 static void CBMiscHairHide(
bool enabled,
int id)
769 DiagButtonRPCIntInt(enabled,
id, value, enabled,
ERPCs.DIAG_MISC_HAIR_LEVEL_HIDE,
true);
773 static void CBMiscHairHideAll(
bool enabled)
782 static void CBMiscCamShake(
bool enabled,
int id)
785 DiagButtonAction(enabled,
id,
ScriptCaller.Create(cam.SpawnDiagCameraShake));
789 static void CBMiscQuickFishing(
bool enabled)
792 DiagToggleRPC(enabled, player.IsQuickFishing(),
ERPCs.DIAG_MISC_QUICK_FISHING);
796 static void CBMiscShockImpact(
bool enabled,
int id)
798 DiagButtonAction(enabled,
id,
ScriptCaller.Create(ShockImpact));
801 static void ShockImpact()
803 static float intensity;
805 intensity =
Math.WrapFloat(intensity, 0.25, 1);
808 player.SpawnShockEffect(intensity);
812 static void CBMiscPlugArrows(
bool enabled)
814 GetGame().EnableEMPlugs(enabled);
818 static void CBMiscTargetableByAI(
bool enabled,
int id)
822 DiagToggleRPC(enabled, player.m_CanBeTargetedDebug,
ERPCs.DIAG_MISC_TARGETABLE_BY_AI);
826 static void CBMiscHitIndication()
856 static void CBMiscHitIndicationSpawnHit(
bool enabled,
int id)
858 DiagButtonAction(enabled,
id,
ScriptCaller.Create(SpawnHitDirEffect));
861 static void SpawnHitDirEffect()
864 GetGame().GetMission().GetHud().SpawnHitDirEffect(player,
DiagMenu.GetRangeValue(
DiagMenuIDs.MISC_HIT_INDICATION_SPAWN_HIT_DIRECTION), 1.0);
868 static void CBDebugMonitor(
bool enabled,
int id)
870 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_DEBUG_MONITOR,
true);
873 GetGame().GetMission().CreateDebugMonitor();
875 GetGame().GetMission().HideDebugMonitor();
878 static void CBPRADrawAll(
bool enabled,
int id)
884 static void CBPRADetect(
bool enabled,
int id)
892 Print(
"player: " + player +
" | at position: " + player.GetPosition() +
" | intersects area: " + pra.areaName);
894 Print(
"player: " + player +
" | at position: " + player.GetPosition() +
" | is NOT in any PlayerRestrictedArea");
900 static void CBMiscFreezeEntity(
bool enabled,
int id)
902 DiagButtonAction(enabled,
id,
ScriptCaller.Create(FreezeEntity));
905 static void FreezeEntity()
908 if (PluginSceneManager.GetInstance() && PluginSceneManager.GetInstance().IsOpened())
911 SceneObject scene_obj = PluginSceneManager.GetInstance().GetSelectedSceneObject();
921 FreeDebugCamera camera = FreeDebugCamera.GetInstance();
922 entity =
EntityAI.Cast(camera.GetCrosshairObject());
926 entity.DisableSimulation(!entity.GetIsSimulationDisabled());
930 static void CBMiscFreezePlayer(
bool enabled,
int id)
932 DiagButtonAction(enabled,
id,
ScriptCaller.Create(FreezePlayer));
935 static void FreezePlayer()
939 player.DisableSimulation(!player.GetIsSimulationDisabled());
943 static void CBVehicleDebugOutput(
int value)
949 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED;
953 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.DAMAGE_CONSIDERED;
957 bitValue = EVehicleDebugOutputType.CONTACT;
961 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.CONTACT;
963 SendDiagRPC(bitValue,
ERPCs.DIAG_VEHICLE_DEBUG_OUTPUT,
true);
967 static void CBDumpCrashData(
bool value)
971 SendDiagRPC(
true,
ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_REQUEST,
true);
979 static void SimulateMode(
bool enabled,
int id,
int rpc)
987 DiagButtonRPC(enabled,
id, rpc,
true);
992 DiagButtonRPCSelf(enabled,
id, rpc);
997 DiagButtonRPC(enabled,
id, rpc,
true);
998 DiagButtonRPCSelf(enabled,
id, rpc);
1005 static void CBSimulateInfiniteLoop(
bool enabled,
int id)
1007 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_INFINITE_LOOP);
1011 static void CBSimulateNullPointer(
bool enabled,
int id)
1013 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_NULL_POINTER);
1017 static void CBSimulateDivisionByZero(
bool enabled,
int id)
1019 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_DIVISION_BY_ZERO);
1023 static void CBSimulateErrorFunction(
bool enabled,
int id)
1025 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_ERROR_FUNCTION);
1029 static void CBWeaponParticles(
bool enabled)
1031 DiagToggleRPCServer(enabled,
PrtTest.m_GunParticlesState,
ERPCs.DIAG_WEAPON_PARTICLES);
1035 static void CBWeaponDebug(
bool enabled)
1038 DiagToggleAction(enabled,
ScriptCaller.Create(player.ShowWeaponDebug), player.IsWeaponDebugEnabled());
1042 static void CBWeaponAimNoise(
bool enabled)
1053 static void CBWeaponRecoil(
bool enabled)
1064 static void CBWeaponUnlimitedAmmo(
bool enabled)
1070 static void CBWeaponBurstVersion(
int value)
1074 DiagToggleRPC(value, wpnMngr.GetBurstOption(),
ERPCs.DIAG_WEAPON_BURST_VERSION);
1078 static void CBBleedingSources(
bool enabled)
1081 player.GetBleedingManagerRemote().SetDiag(enabled);
1085 static void CBBleedingDisableBloodLoss(
bool enabled)
1087 SendDiagRPC(enabled,
ERPCs.DIAG_BLEEDING_DISABLE_BLOOD_LOSS,
true);
1091 static void CBBleedingActivateSource(
int value)
1093 SendDiagRPC(value,
ERPCs.DIAG_BLEEDING_ACTIVATE_SOURCE,
true);
1097 static void CBBleedingActivateAllSources(
bool enabled,
int id)
1099 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_BLEEDING_ACTIVATE_ALL_SOURCES,
true);
1103 static void CBBleedingActivateSourceLevel(
int value)
1115 bone =
"lefttoebase";
1127 int count = mgr.m_BleedingSourceZone.Count();
1129 for (
int i = 0; i < count; ++i)
1131 if (mgr.m_BleedingSourceZone.GetKey(i) == bone)
1139 CBBleedingActivateSource(idx);
1143 static void CBBleedingReload(
bool enabled,
int id)
1146 BleedingSourcesManagerRemote bsMngrRem = player.GetBleedingManagerRemote();
1147 DiagButtonAction(enabled,
id,
ScriptCaller.Create(bsMngrRem.Reload));
1151 static void CBBBleedingIndicators()
1158 if (player && player.GetBleedingManagerRemote())
1160 player.GetBleedingManagerRemote().Reload();
1192 static void CBLogsActions(
bool enabled)
1194 DiagToggleRPC(enabled,
LogManager.IsActionLogEnable(),
ERPCs.DIAG_LOGS_ACTIONS);
1198 static void CBLogsWeapons(
bool enabled)
1200 DiagToggleRPC(enabled,
LogManager.IsWeaponLogEnable(),
ERPCs.DIAG_LOGS_WEAPONS);
1204 static void CBLogsSync(
bool enabled)
1206 DiagToggleRPC(enabled,
LogManager.IsSyncLogEnable(),
ERPCs.DIAG_LOGS_SYNC);
1210 static void CBLogsBaseBuilding(
bool enabled)
1212 DiagToggleRPC(enabled,
LogManager.IsBaseBuildingLogEnable(),
ERPCs.DIAG_LOGS_BASEBUILDING);
1216 static void CBLogsSymptoms(
bool enabled)
1218 DiagToggleRPC(enabled,
LogManager.IsSymptomLogEnable(),
ERPCs.DIAG_LOGS_SYMPTOMS);
1222 static void CBLogsInventoryMove(
bool enabled)
1224 DiagToggleRPC(enabled,
LogManager.IsInventoryMoveLogEnable(),
ERPCs.DIAG_LOGS_INVENTORY_MOVE);
1228 static void CBLogsInventoryReservation(
bool enabled)
1230 DiagToggleRPC(enabled,
LogManager.IsInventoryReservationLogEnable(),
ERPCs.DIAG_LOGS_INVENTORY_RESERVATION);
1234 static void CBLogsInventoryHFSM(
bool enabled)
1236 DiagToggleRPC(enabled,
LogManager.IsInventoryHFSMLogEnable(),
ERPCs.DIAG_LOGS_INVENTORY_HFSM);
1240 static void CBLogsQuickbar(
bool enabled)
1242 DiagToggleRPC(enabled,
LogManager.IsQuickbarLogEnable(),
ERPCs.DIAG_LOGS_QUICKBAR);
1246 static void CBLogsBleedingChances(
bool enabled)
1248 DiagToggleRPC(enabled,
LogManager.IsBleedingChancesLogEnable(),
ERPCs.DIAG_LOGS_BLEEDING_CHANCES);
1252 static void CBTriggerDebug(
bool enabled)
1254 EnableDebugSystemClient(ESubscriberSystems.TRIGGERS, enabled);
1258 static void CBBaseBuildingWood(
bool enabled)
1260 SendDiagRPC(enabled,
ERPCs.DIAG_BASEBUILDING_WOOD,
true);
1264 static void CBBaseBuildingGate(
bool enabled)
1266 SendDiagRPC(enabled,
ERPCs.DIAG_BASEBUILDING_GATE,
true);
1270 static void CBFinishersFinisherForced(
int value)
1273 DiagToggleRPC(value - 1, player.GetMeleeCombat().DebugGetForcedFinisherType(),
ERPCs.DIAG_FINISHERS_FORCE_FINISHER);
1277 static void CBCameraToolsEnableRemoteCamera(
bool enabled)
1284 if (!enabled && player.m_CameraToolsMenuClient)
1286 player.m_CameraToolsMenuClient.DelayedDestroy();
1290 GetGame().RPCSingleParam( null,
ERPCs.DIAG_CAMERATOOLS_CAM_SUBSCRIBE, param,
true );
1307 vector end = start + (
GetGame().GetCurrentCameraDirection() * 5.0);
1309 vector hitPos, hitNormal;
1314 DayZPhysics.RayCastBullet(start, end, hitMask, null, hitObj, hitPos, hitNormal, hitFraction);
1315 Class.CastTo(player, hitObj);
1329 mask = (
ItemBase.GetDebugActionsMask() | type);
1333 mask = (
ItemBase.GetDebugActionsMask() & (~type));
1342 static void EnableDebugSystemClient(ESubscriberSystems system,
bool enable)
1347 mask = (m_SystemsMask | system);
1351 mask = (m_SystemsMask & (~system));
1354 if (mask != m_SystemsMask)
1358 m_SystemsMask = mask;
1366 static void DiagButtonActionParams(
bool enabled,
int id,
ScriptCaller action,
Param params)
1370 action.Invoke(params);
1376 static void DiagButtonAction(
bool enabled,
int id,
ScriptCaller action)
1378 DiagButtonActionParams(enabled,
id, action, null);
1382 static void DiagButtonRPC(
bool enabled,
int id,
int rpc,
bool serverOnly =
false)
1385 SendDiagRPCBasicParam params =
new SendDiagRPCBasicParam(rpc, serverOnly);
1387 DiagButtonActionParams(enabled,
id, action, params);
1391 static void DiagButtonRPCSelf(
bool enabled,
int id,
int rpc)
1394 SendDiagRPCSelfBasicParam params =
new SendDiagRPCSelfBasicParam(rpc);
1396 DiagButtonActionParams(enabled,
id, action, params);
1400 static void DiagButtonRPCIntInt(
bool enabled,
int id,
int value,
int value2,
int rpc,
bool serverOnly =
false)
1406 SendDiagRPCParamParam params =
new SendDiagRPCParamParam(rpc, serverOnly,
CachedObjectsParams.PARAM2_INT_INT);
1408 DiagButtonActionParams(enabled,
id, action, params);
1412 static void DiagToggleRPC(
bool value,
int current,
int rpc)
1414 if (value != current)
1416 SendDiagRPC(value, rpc,
false);
1421 static void DiagToggleRPC(
int value,
int current,
int rpc)
1423 if (value != current)
1425 SendDiagRPC(value, rpc,
false);
1430 static void DiagToggleRPC(
float value,
int current,
int rpc)
1432 if (value != current)
1434 SendDiagRPC(value, rpc,
false);
1439 static void DiagToggleRPCServer(
bool value, out
bool current,
int rpc)
1441 if (value != current)
1444 SendDiagRPC(value, rpc,
true);
1449 static void DiagToggleRPCServer(
int value, out
int current,
int rpc)
1451 if (value != current)
1454 SendDiagRPC(value, rpc,
true);
1459 static void DiagToggleRPCServer(
float value, out
float current,
int rpc)
1461 if (value != current)
1464 SendDiagRPC(value, rpc,
true);
1469 static void DiagToggleRPCAction(
int value,
ScriptCaller action,
int current,
int rpc)
1471 if (value != current)
1473 SendDiagRPC(value, rpc);
1474 action.Invoke(value);
1479 static void DiagToggleAction(
int value,
ScriptCaller action,
int current)
1481 if (value != current)
1483 action.Invoke(value);
1488 static void SendDiagRPCSelf(
Param value,
int rpc)
1493 GetGame().RPCSelfSingleParam(player, rpc, value);
1498 static void SendDiagRPCSelfBasic(SendDiagRPCSelfBasicParam param)
1500 SendDiagRPCSelf(null, param.param1);
1504 static void SendDiagRPCSelfParam(SendDiagRPCSelfParamParam param)
1506 SendDiagRPCSelf(param.param2, param.param1);
1510 static void SendDiagRPC(
Param value,
int rpc,
bool serverOnly =
false)
1516 if (
GetGame().IsMultiplayer() && playerIdentity)
1518 GetGame().RPCSingleParam(player, rpc, value,
true, playerIdentity);
1521 if (!
GetGame().IsMultiplayer() || !serverOnly)
1523 GetGame().RPCSelfSingleParam(player, rpc, value);
1529 static void SendDiagRPCBasic(SendDiagRPCBasicParam param)
1531 SendDiagRPC(null, param.param1, param.param2);
1535 static void SendDiagRPCParam(SendDiagRPCParamParam param)
1537 SendDiagRPC(param.param3, param.param1, param.param2);
1541 static void SendDiagRPC(
int rpc,
bool serverOnly =
false)
1543 SendDiagRPC(null, rpc, serverOnly);
1547 static void SendDiagRPC(
bool value,
int rpc,
bool serverOnly =
false)
1554 static void SendDiagRPC(
int value,
int rpc,
bool serverOnly =
false)
1561 static void SendDiagRPC(
float value,
int rpc,
bool serverOnly =
false)