3 const int SIMPLIFIED_SHOCK_CAP = 63;
4 const int SHAKE_LEVEL_MAX = 7;
12 private int m_FaceCoveredForShaveLayers = 0;
20 const int ACT_STORE_SAVE_VERSION = 4;
52 const int OVERLOAD_LIMIT = 30000;
87 bool m_QuickBarFT =
false;
109 float m_UnconsciousVignetteTarget = 2;
110 float m_CameraSwayModifier = 0.2;
127 float m_UnconsciousEndTime = 0;
141 const string SOUND_BREAK_LEG =
"broken_leg_SoundSet";
143 static bool DEBUG_INVENTORY_ACCESS =
false;
146 float m_UnconRefillModifier = 1;
152 const string CONTAMINATED_AREA_AMBIENT =
"ContaminatedArea_SoundSet";
189 vector m_LocalProjectionPosition =
"0 0 0 ";
190 vector m_LocalProjectionOrientation =
"0 0 0 ";
194 int m_AddModifier = -1;
219 bool m_IsFighting =
false;
230 protected float m_LastMapScale = -1.0;
236 protected int m_InventorySoftLockCount = 0;
293 m_StoreLoadVersion = 0;
294 m_IsCraftingReady =
false;
296 m_LastShavedSeconds = 0;
298 m_HasBloodTypeVisible =
false;
300 m_LifespanLevelLocal = -1;
302 m_CorpseStateLocal = 0;
303 m_HasBloodyHandsVisible = 0;
304 m_PlayerLoaded =
false;
305 m_PlayerSelected =
false;
306 m_ProcessUIWarning =
false;
307 m_FlagRaisingTendency =
true;
308 m_LiquidTendencyDrain =
false;
317 m_VisibilityCoef = 1.0;
320 m_ActionQBControl =
false;
321 m_QuickBarHold =
false;
322 m_HideHairAnimated =
true;
323 m_WorkingNVGHeadset =
false;
324 m_LoweredNVGHeadset =
false;
325 m_AreHandsLocked =
false;
329 m_CanDisplayHitEffectPPE =
true;
360 m_ModuleRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
362 m_TrasferValues =
new TransferValues(
this);
370 if (!
GetGame().IsDedicatedServer())
372 m_MeleeDebug =
false;
373 m_UALastMessage =
"";
374 m_UALastMessageTimer =
new Timer;
383 m_ProcessRemoveEffectWidgets =
new array<int>;
386 m_ProcessRemoveGlassesEffects =
new array<int>;
389 m_ActionManager =
NULL;
392 m_ConfigEmotesProfile = PluginConfigEmotesProfile.Cast(
GetPlugin(PluginConfigEmotesProfile));
396 PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(
GetPlugin(PluginConfigDebugProfileFixed));
398 PluginDeveloper m_Developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
419 m_Developer.ClearInventory(
player);
448 m_BleedingSourcesLow.Insert(
"RightToeBase");
449 m_BleedingSourcesLow.Insert(
"RightFoot");
450 m_BleedingSourcesLow.Insert(
"LeftToeBase");
451 m_BleedingSourcesLow.Insert(
"LeftFoot");
452 m_BleedingSourcesLow.Insert(
"RightUpLegRoll");
453 m_BleedingSourcesLow.Insert(
"RightUpLeg");
454 m_BleedingSourcesLow.Insert(
"RightLegRoll");
455 m_BleedingSourcesLow.Insert(
"RightLeg");
456 m_BleedingSourcesLow.Insert(
"LeftUpLegRoll");
457 m_BleedingSourcesLow.Insert(
"LeftUpLeg");
458 m_BleedingSourcesLow.Insert(
"LeftLegRoll");
459 m_BleedingSourcesLow.Insert(
"LeftLeg");
462 m_BleedingSourcesUp.Insert(
"RightForeArmRoll");
463 m_BleedingSourcesUp.Insert(
"LeftForeArmRoll");
464 m_BleedingSourcesUp.Insert(
"RightForeArm");
465 m_BleedingSourcesUp.Insert(
"RightArmRoll");
466 m_BleedingSourcesUp.Insert(
"RightArm");
467 m_BleedingSourcesUp.Insert(
"RightShoulder");
468 m_BleedingSourcesUp.Insert(
"LeftForeArm");
469 m_BleedingSourcesUp.Insert(
"LeftArmRoll");
470 m_BleedingSourcesUp.Insert(
"LeftArm");
471 m_BleedingSourcesUp.Insert(
"LeftShoulder");
472 m_BleedingSourcesUp.Insert(
"Spine3");
473 m_BleedingSourcesUp.Insert(
"Spine2");
474 m_BleedingSourcesUp.Insert(
"Spine1");
475 m_BleedingSourcesUp.Insert(
"Spine");
476 m_BleedingSourcesUp.Insert(
"Pelvis");
477 m_BleedingSourcesUp.Insert(
"Neck");
480 RegisterNetSyncVariableInt(
"m_BloodType", 0, 128);
481 RegisterNetSyncVariableInt(
"m_ShockSimplified", 0, SIMPLIFIED_SHOCK_CAP);
484 RegisterNetSyncVariableInt(
"m_StaminaState", 0,
eStaminaState.COUNT - 1);
485 RegisterNetSyncVariableInt(
"m_BleedingBits");
486 RegisterNetSyncVariableInt(
"m_Shakes", 0, SHAKE_LEVEL_MAX);
489 RegisterNetSyncVariableInt(
"m_MixedSoundStates", 0,
eMixedSoundStates.COUNT - 1);
491 RegisterNetSyncVariableInt(
"m_RefreshAnimStateIdx", 0, 3);
492 RegisterNetSyncVariableInt(
"m_BrokenLegState", -
eBrokenLegs.BROKEN_LEGS_SPLINT,
eBrokenLegs.BROKEN_LEGS_SPLINT);
493 RegisterNetSyncVariableInt(
"m_SyncedModifiers", 0, ((
eModifierSyncIDs.LAST_INDEX - 1) * 2) - 1);
494 RegisterNetSyncVariableInt(
"m_HasBloodyHandsVisible", 0,
eBloodyHandsTypes.LAST_INDEX - 1);
495 RegisterNetSyncVariableInt(
"m_ActionSoundCategoryHash");
497 RegisterNetSyncVariableBool(
"m_IsUnconscious");
498 RegisterNetSyncVariableBool(
"m_IsRestrained");
499 RegisterNetSyncVariableBool(
"m_IsInWater");
500 RegisterNetSyncVariableBool(
"m_InsideEffectArea");
502 RegisterNetSyncVariableBool(
"m_HasBloodTypeVisible");
504 RegisterNetSyncVariableBool(
"m_IsRestrainStarted");
505 RegisterNetSyncVariableBool(
"m_IsRestrainPrelocked");
506 RegisterNetSyncVariableBool(
"m_HasHeatBuffer");
508 RegisterNetSyncVariableFloat(
"m_CurrentShock");
510 m_OriginalSlidePoseAngle = GetSlidePoseAngle();
515 m_DecayedTexture = ConfigGetString(
"decayedTexture");
522 m_AntibioticsActive++;
527 m_AntibioticsActive--;
528 if (m_AntibioticsActive < 0)
530 m_AntibioticsActive = 0;
531 Error(
"DecreaseAntibioticsCount called more times than IncreaseAntibioticsCount (should be equal) - check your code, forcing clamp to 0");
537 return (m_AntibioticsActive > 0);
542 m_ActionSoundCategoryHash =
hash;
551 if (!m_InsideEffectArea)
554 if (!m_CurrentEffectTrigger)
563 RemoveCurrentEffectTrigger();
574 m_CurrentEffectTrigger =
trigger;
582 if (m_CurrentEffectTrigger)
589 SetContaminatedEffectEx(
false, m_CurrentEffectTrigger.
m_PPERequester);
590 m_CurrentEffectTrigger =
null;
596 if (m_ContaminatedAreaCount == 0)
597 OnContaminatedAreaEnterServer();
598 m_ContaminatedAreaCount++;
603 m_ContaminatedAreaCount--;
604 if (m_ContaminatedAreaCount <= 0)
606 m_ContaminatedAreaCount = 0;
607 OnContaminatedAreaExitServer();
612 if (m_EffectAreaCount == 0)
614 m_InsideEffectArea =
true;
616 OnPlayerIsNowInsideEffectAreaBeginServer();
624 if (m_EffectAreaCount <= 0)
626 m_EffectAreaCount = 0;
627 m_InsideEffectArea =
false;
629 OnPlayerIsNowInsideEffectAreaEndServer();
636 GetModifiersManager().ActivateModifier(
eModifiers.MDF_AREAEXPOSURE);
642 GetModifiersManager().DeactivateModifier(
eModifiers.MDF_AREAEXPOSURE);
663 RemoveCurrentEffectTrigger();
676 string str =
"Warning! GetItemOnSlot() >> found item on slot " +
slot_type +
" can't be cast to ItemBase! Found item is " +
item_EAI.GetType() +
" and the player is " +
GetType() +
"!";
687 return GetItemOnSlot(
"Headgear");
700 if (GetInventory().HasInventoryReservation(
item,
null))
705 if (GetHumanInventory().GetEntityInHands() ==
item)
718 return m_BreathVapour;
754 return (m_BleedingBits != 0);
759 if (m_BleedingBits !=
bits)
761 if (m_BleedingBits == 0)
766 m_BleedingBits =
bits;
772 return m_BleedingBits;
798 return m_HealingsCount;
803 return m_DiseaseCount;
819 m_ProcessAddEffectWidgets.InsertArray(
effects);
824 m_ProcessRemoveEffectWidgets.InsertArray(
effects);
829 m_ProcessAddGlassesEffects.Insert(
id);
834 m_ProcessRemoveGlassesEffects.Insert(
id);
839 return m_DamageDealtEffect;
844 if (m_DamageDealtEffect)
845 delete m_DamageDealtEffect;
847 if (m_CanDisplayHitEffectPPE)
854 delete m_EffectRadial;
861 return m_FlashbangEffect;
866 if (m_FlashbangEffect)
868 m_FlashbangEffect.Stop();
869 delete m_FlashbangEffect;
877 return m_ShockDealtEffect;
882 if (m_ShockDealtEffect)
883 delete m_ShockDealtEffect;
895 if (GetBleedingManagerServer())
896 delete GetBleedingManagerServer();
898 if (GetModifiersManager())
899 GetModifiersManager().DeactivateAllModifiers();
906 GetGame().EnableVoN(
this,
false);
907 if (!
GetGame().IsDedicatedServer())
909 GetSymptomManager().OnPlayerKilled();
911 if (GetEconomyProfile() && !m_CorpseProcessing && m_CorpseState == 0 &&
GetGame().GetMission().InsertCorpse(
this))
913 m_CorpseProcessing =
true;
920 GetGame().GetMission().SyncRespawnModeInfo(GetIdentity());
935 m_LastShockHitTime =
GetGame().GetTime();
937 if (!IsUnconscious())
939 if (
GetGame().ConfigIsExisting(
"cfgAmmo " +
ammo +
" unconRefillModifier"))
940 m_UnconRefillModifier =
GetGame().ConfigGetInt(
"cfgAmmo " +
ammo +
" unconRefillModifier");
942 m_UnconRefillModifier = 1;
961 Print(
"EEHitBy() | " + GetDisplayName() +
" hit by " +
source.GetDisplayName() +
" to " +
dmgZone);
968 if (
GetGame().IsDebugMonitor())
969 m_DebugMonitorValues.SetLastDamage(
source.GetDisplayName());
972 m_ActionManager.Interrupt();
985 if (GetHealth(
"RightLeg",
"Health") <= 1 || GetHealth(
"LeftLeg",
"Health") <= 1 || GetHealth(
"RightFoot",
"Health") <= 1 || GetHealth(
"LeftFoot",
"Health") <= 1)
988 GetModifiersManager().DeactivateModifier(
eModifiers.MDF_BROKEN_LEGS);
989 GetModifiersManager().ActivateModifier(
eModifiers.MDF_BROKEN_LEGS);
992 if (
ammo ==
"Bullet_CupidsBolt" && IsAlive())
995 m_ModifiersManager.ResetAll();
996 m_ModifiersManager.ActivateModifier(
eModifiers.MDF_IMMUNITYBOOST);
999 if (m_BleedingManagerServer)
1000 m_BleedingManagerServer.RemoveAllSources();
1003 if (GetPlayerStats())
1005 int bloodType = GetStatBloodType().Get();
1008 float heatBuffer = GetStatHeatBuffer().Get();
1011 GetPlayerStats().ResetAllStats();
1022 m_AgentPool.RemoveAllAgents();
1028 if (IsUnconscious())
1033 m_ShockHandler.CheckValue(
true);
1043 if (m_MeleeFightLogic.IsInBlock())
1046 sound.SetAutodestroy(
true);
1053 StopSoundSet(m_SoundFliesEffect);
1073 OnPlayerRecievedHit();
1076 if (
hitData.m_AmmoType ==
"Bullet_CupidsBolt")
1086 if (m_MeleeFightLogic.IsInBlock())
1089 sound.SetAutodestroy(
true);
1093 SpawnDamageDealtEffect();
1104 SpawnFlashbangEffect(
this,
visual);
1127 return m_DefaultHitPosition;
1145 m_FaceCoveredForShaveLayers++;
1150 m_FaceCoveredForShaveLayers--;
1161 m_QuickBarBase.updateSlotsCount();
1162 CalculateVisibilityForAI();
1165 HideHairSelections(
itemIB,
true);
1171 if (!
GetGame().IsDedicatedServer())
1173 if (
clothing.GetEffectWidgetTypes())
1174 QueueAddEffectWidget(
clothing.GetEffectWidgetTypes());
1176 if (
clothing.GetGlassesEffectID() > -1)
1177 QueueAddGlassesEffect(
clothing.GetGlassesEffectID());
1180 UpdateCorpseStateVisual();
1182 else if (
GetGame().IsServer())
1185 GetModifiersManager().ActivateModifier(
eModifiers.MDF_MASK);
1188 clothing.UpdateNVGStatus(
this,
true);
1200 m_QuickBarBase.updateSlotsCount();
1201 CalculateVisibilityForAI();
1209 if (!
GetGame().IsDedicatedServer())
1211 if (
clothing.GetEffectWidgetTypes())
1212 QueueRemoveEffectWidget(
clothing.GetEffectWidgetTypes());
1214 if (
clothing.GetGlassesEffectID() > -1)
1215 QueueRemoveGlassesEffect(
clothing.GetGlassesEffectID());
1221 GetModifiersManager().DeactivateModifier(
eModifiers.MDF_MASK);
1226 UpdateCorpseStateVisual();
1262 if (slot ==
"Melee")
1267 else if (slot ==
"Shoulder")
1302 return m_CanDisplayHitEffectPPE;
1307 m_CanDisplayHitEffectPPE =
enabled;
1312 if (ConfigGetBool(
"woman") != 1)
1329 return m_PlayerSoundManagerServer;
1335 if (!m_UndergroundHandler && IsAlive())
1338 return m_UndergroundHandler;
1343 m_UndergroundHandler =
null;
1396 if (IsControlledPlayer())
1404 SetActionsRemoteTarget();
1412 SetActionsRemoteTarget(m_InputActionMapAsTarget);
1427 if (IsControlledPlayer())
1437 if (IsControlledPlayer())
1450 typename ai =
action.GetInputType();
1475 typename ai =
action.GetInputType();
1498 return m_RecipePick;
1516 return m_ActionManager;
1521 return m_EmoteManager;
1526 return m_RGSManager;
1554 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"LeftForeArmRoll"))
1559 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"RightForeArmRoll"))
1573 string surface;
int liquid;
1591 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"RightFoot"))
1597 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"LeftFoot"))
1627#ifdef DIAG_DEVELOPER
1637 m_AllowQuickRestrain =
enable;
1642 m_AllowQuickFishing =
enable;
1647 return m_AllowQuickRestrain;
1652 return m_AllowQuickFishing;
1662 return m_CraftingManager;
1672 return m_WeaponManager;
1684 if (GetThrowing() && GetThrowing().IsThrowingModeEnabled())
1697 return m_IsRestrainStarted;
1708 return m_IsRestrainPrelocked;
1719 return m_IsRestrained;
1729 if (IsControlledPlayer())
1730 return !IsRestrained() && !IsRestrainPrelocked();
1746 return super.CanReceiveItemIntoCargo(
item);
1778 return GetCraftingManager().GetRecipeID();
1786 GetCraftingManager().SetRecipeID(
recipeID);
1796 return m_ConstructionActionData;
1801 if (m_ConstructionActionData)
1802 m_ConstructionActionData.ResetActionIndexes();
1810 return m_LastFirePoint;
1814 return m_LastFirePointRot;
1818 return m_LastFirePointIndex;
1840 int index = m_QuickBarBase.FindEntityIndex(
entity);
1842 m_QuickBarBase.SetEntityShortcut(
entity, -1);
1847 int index = m_QuickBarBase.FindEntityIndex(
entity);
1849 m_QuickBarBase.SetShotcutEnable(
index,
value);
1858 if (m_QuickBarBase.GetEntity(
index) ==
NULL)
1867 return m_QuickBarBase.GetSize();
1872 return m_QuickBarBase.GetEntity(
index);
1877 int i = FindQuickBarEntityIndex(
entity);
1879 m_QuickBarBase.UpdateShotcutVisibility(
i);
1889 m_QuickBarBase.OnSetEntityRequest(
ctx);
1900 AddHealth(
"LeftLeg",
"Health", (GetMaxHealth(
"LeftLeg",
"Health") - GetHealth(
"LeftLeg",
"Health")) *
add_health_coef);
1901 AddHealth(
"RightLeg",
"Health", (GetMaxHealth(
"RightLeg",
"Health") - GetHealth(
"RightLeg",
"Health")) *
add_health_coef);
1902 AddHealth(
"RightFoot",
"Health", (GetMaxHealth(
"RightFoot",
"Health") - GetHealth(
"RightFoot",
"Health")) *
add_health_coef);
1903 AddHealth(
"LeftFoot",
"Health", (GetMaxHealth(
"LeftFoot",
"Health") - GetHealth(
"LeftFoot",
"Health")) *
add_health_coef);
1914 req.SetStamina01(GetStaminaHandler().GetStaminaNormalized());
1920 if (!GetDrowningWaterLevelCheck())
1936 if (IsTryingHoldBreath() && CanStartConsumingStamina(
EStaminaConsumers.HOLD_BREATH))
1938 if (!m_IsHoldingBreath)
1940 OnHoldBreathStart();
1941 m_IsHoldingBreath =
true;
1944 else if (!IsTryingHoldBreath() || !CanConsumeStamina(
EStaminaConsumers.HOLD_BREATH))
1946 if (m_IsHoldingBreath) OnHoldBreathEnd();
1947 m_IsHoldingBreath =
false;
1970 return m_IsHoldingBreath;
1980 return m_MixedSoundStates;
1985 if (m_SaySoundLastSetName !=
name)
1990 m_SaySoundLastSetName =
name;
1993 m_SaySoundObject = m_SaySoundBuilder.BuildSoundObject();
1995 return GetGame().GetSoundScene().Play3D(m_SaySoundObject, m_SaySoundBuilder);
2002 int attcount = this.GetInventory().AttachmentCount();
2036 if (m_ModuleLifespan)
2037 m_ModuleLifespan.SynchLifespanVisual(
this, m_LifeSpanState, m_HasBloodyHandsVisible, m_HasBloodTypeVisible,
m_BloodType);
2040 if (IsControlledPlayer())
2050 GetGame().GetUIManager().CloseAll();
2051 GetGame().GetMission().SetPlayerRespawning(
false);
2052 GetGame().GetMission().OnPlayerRespawned(
this);
2058 m_EffectWidgets =
GetGame().GetMission().GetEffectWidgets();
2060 if (!
GetGame().IsDedicatedServer())
2066 m_CharactersHead = Head_Default.Cast(GetInventory().FindPlaceholderForSlot(
slot_id));
2067 CheckHairClippingOnCharacterLoad();
2068 UpdateHairSelectionVisibility();
2069 PreloadDecayTexture();
2073 wpn.ValidateAndRepair();
2078 m_PlayerLoaded =
true;
2086 m_PlayerDisconnectProcessed =
state;
2091 return m_PlayerDisconnectProcessed;
2101 return m_HologramServer;
2106 return m_HologramLocal;
2113 m_HologramServer =
new Hologram(
this, GetLocalProjectionPosition(),
item);
2114 GetHologramServer().SetProjectionPosition(GetLocalProjectionPosition());
2115 GetHologramServer().SetProjectionOrientation(GetLocalProjectionOrientation());
2116 GetHologramServer().GetProjectionEntity().OnPlacementStarted(
this);
2117 GetHologramServer().CheckPowerSource();
2118 GetHologramServer().RefreshVisual();
2129 m_HologramLocal =
new Hologram(
this, GetLocalProjectionPosition(),
item);
2130 GetHologramLocal().GetProjectionEntity().OnPlacementStarted(
this);
2138 if (IsPlacingServer())
2140 GetHologramServer().CheckPowerSource();
2141 GetHologramServer().GetParentEntity().OnPlacementCancelled(
this);
2144 delete m_HologramServer;
2158 m_AreHandsLocked =
true;
2172 delete m_HologramLocal;
2178 delete m_HologramServer;
2184 delete m_HologramLocal;
2189 if (m_HologramServer)
2197 if (m_HologramLocal)
2205 if (
enable != m_IsDrowning)
2219 if (IsControlledPlayer())
2225 SpawnDrowningBubbles();
2232 if (IsControlledPlayer())
2245 PlacingCancelServer();
2263 else if (!
GetGame().IsMultiplayer())
2287 if (
item.IsKindOf(
t))
2301 if (IsPlacingLocal())
2312 PlacingCancelLocal();
2315 PlacingStartLocal(GetItemInHands());
2317 PlacingStartLocal(
item);
2332 return m_LocalProjectionPosition;
2337 return m_LocalProjectionOrientation;
2363 SetContaminatedEffectEx(
false);
2367 StopSoundSet(m_SoundFliesEffect);
2372 m_CameraSwayModifier =
new_camera.GetWeaponSwayModifier();
2378 return m_CurrentCamera;
2383 if (!m_CurrentCamera)
2391 return m_BleedingManagerServer;
2396 return m_BleedingManagerRemote;
2401 return m_SymptomManager;
2412 return m_TrasferValues;
2417 return m_DebugMonitorValues;
2563 if (!IsPlayerSelected() || !IsAlive())
2565 if (m_ModifiersManager)
2566 m_ModifiersManager.OnScheduledTick(
deltaTime);
2567 if (m_NotifiersManager)
2568 m_NotifiersManager.OnScheduledTick();
2569 if (m_TrasferValues)
2570 m_TrasferValues.OnScheduledTick(
deltaTime);
2573 if (GetBleedingManagerServer())
2574 GetBleedingManagerServer().OnTick(
deltaTime);
2594 if (!m_DeathSyncSent && m_KillerData)
2599 m_DeathSyncSent =
true;
2603 if (m_DebugMonitorValues)
2604 m_DebugMonitorValues.OnScheduledTick(
delta_time);
2605 if (GetSymptomManager())
2612 if (m_PlayerSoundEventHandler)
2613 m_PlayerSoundEventHandler.OnTick(
delta_time);
2615 if (m_ProcessRemoveEffectWidgets && m_ProcessRemoveEffectWidgets.Count() > 0)
2618 if (m_ProcessAddEffectWidgets && m_ProcessAddEffectWidgets.Count() > 0)
2621 HandleGlassesEffect();
2623 if (m_ContaminatedAreaEffectEnabled)
2624 ContaminatedParticleAdjustment();
2626#ifdef DIAG_DEVELOPER
2628 m_WeaponDebug.OnCommandHandlerUpdate();
2631 m_ProcessAddEffectWidgets.Clear();
2632 m_ProcessRemoveEffectWidgets.Clear();
2638 UpdateMovementInertia();
2655 int m_DbgListSelection = 0;
2656 float m_DbgSliderValue = 0.0;
2661 return m_NotifiersManager;
2688 w.ResetWeaponAnimState();
2693 cm.SetMeleeBlock(
false);
2694 GetMeleeFightLogic().SetBlock(
false);
2714 if (IsPlacingLocal())
2722 return m_PlayerStomach;
2734 CheckZeroSoundEvent();
2735 CheckSendSoundEvent();
2737 ProcessADDModifier();
2739 if (m_BrokenLegsJunctureReceived)
2741 m_BrokenLegsJunctureReceived =
false;
2742 bool initial = m_BrokenLegState < 0;
2749 BrokenLegForceProne();
2757 GetDayZPlayerInventory().HandleInventory(
pDt);
2759 if (IsFireWeaponRaised() || m_IsHoldingBreath)
2760 ProcessHoldBreath(
pDt);
2764 if (m_AreHandsLocked && GetHumanInventory().GetEntityInHands())
2765 m_AreHandsLocked =
false;
2768 if (
hic.CameraIsFreeLook() && m_DirectionToCursor ==
vector.
Zero)
2769 m_DirectionToCursor =
GetGame().GetCurrentCameraDirection();
2770 else if (!
hic.CameraIsFreeLook() && m_DirectionToCursor !=
vector.
Zero)
2773 if (m_WeaponManager)
2774 m_WeaponManager.Update(
pDt);
2775 if (m_EmoteManager && IsPlayerSelected())
2776 m_EmoteManager.Update(
pDt);
2778 m_RGSManager.Update();
2779 if (m_StanceIndicator)
2780 m_StanceIndicator.Update();
2783 if (m_InjuryHandler)
2784 m_InjuryHandler.Update(
pDt);
2785 if (m_HCAnimHandler)
2788 m_ShockHandler.Update(
pDt);
2792 GetPlayerSoundManagerServer().Update();
2797 GetHumanInventory().Update(
pDt);
2799 ProcessDrowning(
pDt);
2811 if (!m_UnconsciousDebug)
2814 if (m_ShouldBeUnconscious && m_IsUnconscious)
2819 m_Swimming.m_bWasSwimming |=
hcu.IsInWater();
2822 if (m_Swimming.m_bWasSwimming)
2825 OnUnconsciousUpdate(
pDt, m_LastCommandBeforeUnconscious);
2828 else if (m_ShouldBeUnconscious)
2835 OnUnconsciousUpdate(
pDt, m_LastCommandBeforeUnconscious);
2837 m_IsUnconscious =
true;
2838 OnUnconsciousStart();
2848 m_TransportCache =
hcv.GetTransport();
2851 m_JumpClimb.CheckAndFinishJump();
2857 else if (m_IsUnconscious)
2862 OnUnconsciousUpdate(
pDt, m_LastCommandBeforeUnconscious);
2865 if (m_UnconsciousTime > 2)
2870 if (m_Swimming.m_bWasSwimming || m_LastCommandBeforeUnconscious ==
DayZPlayerConstants.COMMANDID_VEHICLE)
2875 m_IsUnconscious =
false;
2884 m_IsUnconscious =
false;
2892 int quickBarSlot =
hic.IsQuickBarSlot();
2893 if (quickBarSlot && IsAlive())
2895 if (
hic.IsQuickBarSingleUse())
2897 OnQuickBarSingleUse(quickBarSlot);
2900 if (
hic.IsQuickBarContinuousUseStart() && ((!
GetGame().IsDedicatedServer()) && !
GetGame().GetUIManager().GetMenu()))
2902 OnQuickBarContinuousUseStart(quickBarSlot);
2905 if (
hic.IsQuickBarContinuousUseEnd() && ((!
GetGame().IsDedicatedServer())))
2907 OnQuickBarContinuousUseEnd(quickBarSlot);
2921 hic.LimitsDisableSprint(
true);
2923 hic.LimitsDisableSprint(
false);
2929 if (!
GetGame().IsDedicatedServer())
2935 if (IsMapCallbackCancelInput())
2937 else if (IsMapCallbackEndInput())
2946 m_Bot.OnUpdate(
pDt);
2949 if (m_CheckMeleeItem && (!
GetGame().IsDedicatedServer()))
2951 CheckMeleeItemDamage(m_CheckMeleeItem);
2952 SetCheckMeleeItem();
2990 if (m_hac && !GetMapClosingSyncSent())
3004 GetGame().GetMission().RemoveActiveInputExcludes({
"map"});
3007 else if (!
GetGame().IsMultiplayer())
3014 SetMapClosingSyncSet(
true);
3018 if (!
GetGame().IsDedicatedServer())
3029 GetGame().GetMission().RemoveActiveInputExcludes({
"map"});
3047 m_MapClosingSyncSent =
state;
3052 return m_MapClosingSyncSent;
3073 return m_MapNavigationBehaviour;
3078 if (GetMapNavigationBehaviour())
3079 GetMapNavigationBehaviour().OnItemInPlayerPossession(
item);
3084 if (GetMapNavigationBehaviour())
3085 GetMapNavigationBehaviour().OnItemNotInPlayerPossession(
item);
3090 m_CheckMeleeItem =
item;
3120 m_ShakesForced =
value;
3126 if (m_ShakesForced > 0)
3127 level = m_ShakesForced;
3142 if (
level != m_Shakes)
3159 return wasFalling && !m_IsUnconsciousFalling;
3190 CloseInventoryMenu();
3194 SetInventorySoftLock(
true);
3201 GetGame().GetSoundScene().SetSoundVolume(0, 2);
3211 if (m_TransportCache)
3212 m_TransportCache.MarkCrewMemberUnconscious(m_TransportCache.CrewMemberIndex(
this));
3216 GetGame().EnableVoN(
this,
false);
3222 if (GetMeleeFightLogic())
3223 GetMeleeFightLogic().SetBlock(
false);
3226 SetMasterAttenuation(
"UnconsciousAttenuation");
3231 m_UnconRefillModifier = 1;
3233 m_UnconsciousTime = 0;
3234 m_UnconsciousVignetteTarget = 2;
3239 GetGame().GetSoundScene().SetSoundVolume(
g_Game.m_volume_sound, 1);
3241 GetGame().GetMission().GetHud().ShowHudUI(
true);
3242 GetGame().GetMission().GetHud().ShowQuickbarUI(
true);
3243 if (
GetGame().GetUIManager().IsDialogVisible())
3244 GetGame().GetUIManager().CloseDialog();
3248 SetInventorySoftLock(
false);
3255 GetGame().EnableVoN(
this,
true);
3261 SetMasterAttenuation(
"");
3266 m_UnconsciousTime +=
pDt;
3278 SetHealth(
"",
"", -100);
3282 GetGame().GetMission().GetHud().ShowHudUI(
false);
3283 GetGame().GetMission().GetHud().ShowQuickbarUI(
false);
3288 float sin =
Math.
Sin(m_UnconsciousTime * 0.3);
3302 int shock =
Math.
Lerp(0, SIMPLIFIED_SHOCK_CAP, GetHealth(
"",
"Shock") / GetMaxHealth(
"",
"Shock"));
3309 return (m_ShockSimplified / SIMPLIFIED_SHOCK_CAP);
3319#ifdef DIAG_DEVELOPER
3324 return super.CanBeTargetedByAI(
ai) && !IsUnconscious() && !IsInVehicle();
3329 AddHealth(
"",
"Shock",
shock);
3335 CloseInventoryMenu();
3336 GetGame().GetMission().RemoveActiveInputExcludes({
"inventory"},
true);
3361 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.BROKEN_LEGS;
3362 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.BROKEN_LEGS_SPLINT;
3385 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.PRONE_ANIM_OVERRIDE;
3386 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.BROKEN_LEGS;
3387 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask |
eInjuryOverrides.BROKEN_LEGS_SPLINT;
3389 m_InjuryHandler.CheckValue(
false);
3397 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.PRONE_ANIM_OVERRIDE;
3398 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.BROKEN_LEGS_SPLINT;
3399 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask |
eInjuryOverrides.BROKEN_LEGS;
3402 BrokenLegWalkShock();
3403 m_InjuryHandler.CheckValue(
false);
3409 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.BROKEN_LEGS;
3410 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.BROKEN_LEGS_SPLINT;
3417 PlaySoundSet(m_BrokenLegSound, SOUND_BREAK_LEG, 0.1, 0.1);
3431 m_ShockHandler.CheckValue(
true);
3434 if (m_ShockHandler.GetCurrentShock() >= 25)
3452 m_JumpClimb.CheckAndFinishJump();
3461 float avgLegHealth = GetHealth(
"RightLeg",
"") + GetHealth(
"LeftLeg",
"") + GetHealth(
"RightFoot",
"") + GetHealth(
"LeftFoot",
"");
3470 if (
v.LengthSq() > 0)
3475 if (IsClimbingLadder())
3494 m_ShockHandler.CheckValue(
true);
3528 if (
item.IsHeavyBehaviour() && (GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS || GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS_SPLINT))
3537 SetHealth(
"RightLeg",
"", 0);
3538 SetHealth(
"RightFoot",
"", 0);
3539 SetHealth(
"LeftLeg",
"", 0);
3540 SetHealth(
"LeftFoot",
"", 0);
3569 TryHideItemInHands(
false);
3573 TryHideItemInHands(
true);
3581 CloseInventoryMenu();
3585 GetWeaponManager().DelayedRefreshAnimationState(10);
3586 RequestHandAnimationStateRefresh();
3588 GetGame().GetMission().AddActiveInputExcludes({
"swimming"});
3593 TryHideItemInHands(
false,
true);
3600 GetWeaponManager().RefreshAnimationState();
3602 GetGame().GetMission().RemoveActiveInputExcludes({
"swimming"});
3608 TryHideItemInHands(
true);
3613 CloseInventoryMenu();
3615 GetGame().GetMission().AddActiveInputExcludes({
"ladderclimbing"});
3620 TryHideItemInHands(
false,
true);
3625 GetGame().GetMission().RemoveActiveInputExcludes({
"ladderclimbing"});
3635 CloseInventoryMenu();
3638 GetWeaponManager().DelayedRefreshAnimationState(10);
3639 RequestHandAnimationStateRefresh();
3647 GetWeaponManager().RefreshAnimationState();
3657 CloseInventoryMenu();
3660 GetWeaponManager().DelayedRefreshAnimationState(10);
3661 RequestHandAnimationStateRefresh();
3669 GetWeaponManager().RefreshAnimationState();
3679 CloseInventoryMenu();
3687 TryHideItemInHands(
true);
3694 OnVehicleSeatDriverEnter();
3696 GetGame().GetMission().AddActiveInputExcludes({
"vehicledriving"});
3704 TryHideItemInHands(
false,
true);
3706 if (m_IsVehicleSeatDriver)
3707 OnVehicleSeatDriverLeft();
3709 GetGame().GetMission().RemoveActiveInputExcludes({
"vehicledriving"});
3715 m_IsFighting =
true;
3718 GetWeaponManager().DelayedRefreshAnimationState(10);
3719 RequestHandAnimationStateRefresh();
3724 RunFightBlendTimer();
3726 GetWeaponManager().RefreshAnimationState();
3735 GetWeaponManager().DelayedRefreshAnimationState(10);
3736 RequestHandAnimationStateRefresh();
3741 m_ActionManager.OnJumpStart();
3744 GetWeaponManager().DelayedRefreshAnimationState(10);
3745 RequestHandAnimationStateRefresh();
3751 if (m_PresenceNotifier)
3766 GetWeaponManager().RefreshAnimationState();
3788 GetWeaponManager().RefreshAnimationState();
3795 if (GetThrowing().IsThrowingAnimationPlaying())
3828 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask &
~eInjuryOverrides.PRONE_ANIM_OVERRIDE;
3829 ForceUpdateInjuredState();
3839 if (IsInFBEmoteState() || m_EmoteManager.m_MenuEmote)
3867 OnVehicleSeatDriverEnter();
3869 OnVehicleSeatDriverLeft();
3874 m_IsVehicleSeatDriver =
true;
3881 m_IsVehicleSeatDriver =
false;
3890 PlacingCancelLocal();
3891 PlacingCancelServer();
3907 if (m_UndergroundHandler)
3915 m_LastPostFrameTickTime =
GetGame().GetTime();
3918 if (GetDamageDealtEffect())
3923 delete GetDamageDealtEffect();
3931 m_EffectRadial =
null;
3935 if (GetFlashbangEffect())
3941 GetFlashbangEffect().Stop();
3942 delete GetFlashbangEffect();
3946 if (GetShockEffect())
3951 delete GetShockEffect();
3954 m_InventoryActionHandler.OnUpdate();
3957#ifdef DIAG_DEVELOPER
3962#ifdef DIAG_DEVELOPER
3968 m_WeaponDebug.OnPostFrameUpdate();
3970 if (GetBleedingManagerRemote())
3971 GetBleedingManagerRemote().OnUpdate();
3977 m_MeleeDebug =
true;
3982 m_MeleeDebug =
false;
3997 if (m_PresenceNotifier)
4018 if (m_Environment && m_Environment.m_Debug)
4028 if (m_FallDamage && m_FallDamage.m_Debug)
4062 if (GetStaminaHandler())
4063 GetStaminaHandler().DepleteStamina(
modifier,
dT);
4068 if (!GetStaminaHandler())
return false;
4070 bool val = (GetStaminaHandler().HasEnoughStaminaFor(
consumer) && !IsRestrained() && !IsInFBEmoteState());
4073 StaminaHUDNotifier(
false);
4080 if (!GetStaminaHandler())
return false;
4082 bool val = (GetStaminaHandler().HasEnoughStaminaToStart(
consumer) && !IsRestrained() && !IsInFBEmoteState());
4085 StaminaHUDNotifier(
false);
4093 if (!GetStaminaHandler())
4096 return GetStaminaHandler().GetStamina() > 0;
4118 if (GetBrokenLegs() !=
eBrokenLegs.NO_BROKEN_LEGS)
4128 if (IsInFBEmoteState() || m_EmoteManager.m_MenuEmote)
4131 return super.CanJump();
4136 return m_JumpClimb.m_bIsJumpInProgress;
4142 temp =
GetGame().GetMission().GetActiveRefresherLocations();
4163 m_RefreshAnimStateIdx++;
4164 if (m_RefreshAnimStateIdx > 3)
4165 m_RefreshAnimStateIdx = 0;
4203 if (m_AreHandsLocked)
4209 if (GetThrowing().IsThrowingModeEnabled() || GetThrowing().IsThrowingAnimationPlaying())
4212 if (
IsRaised() ||
GetCommand_Melee() || IsSwimming() || IsClimbingLadder() || IsClimbing() || IsRestrained() || IsRestrainPrelocked())
4215 if (GetDayZPlayerInventory().
IsProcessing() || IsItemsToDelete())
4221 if (GetWeaponManager() && GetWeaponManager().
IsRunning())
4244 if (!GetDayZPlayerInventory().
IsIdle())
4254 if (GetHumanInventory().CanRemoveEntityInHands())
4257 PredictiveMoveItemFromHandsToInventory();
4308 if (GetInventory().IsInventoryLocked())
4311 if (IsSwimming() || IsClimbingLadder() ||
GetCommand_Melee() || IsClimbing() || IsRestrained() || IsRestrainPrelocked())
4332 m_QuickBarFT =
true;
4336 m_QuickBarHold =
true;
4347 if (m_ActionQBControl)
4349 ActionBase
action =
am.GetRunningAction();
4352 if (!
action.GetInput().IsActive())
4353 am.EndActionInput();
4360 am.ClearForceTarget();
4361 m_QuickBarFT =
false;
4365 m_QuickBarHold =
false;
4369 m_ActionQBControl = !
action.GetInput().IsActive();
4374 return m_ActionQBControl;
4378 m_ActionQBControl =
false;
4416 else if (GetHumanInventory().GetEntityInHands() !=
magazine)
4422 if (GetWeaponManager().CanUnjam(
wpn))
4423 GetWeaponManager().Unjam();
4424 else if (GetWeaponManager().CanAttachMagazine(
wpn,
mag))
4425 GetWeaponManager().AttachMagazine(
mag);
4426 else if (GetWeaponManager().CanSwapMagazine(
wpn,
mag))
4427 GetWeaponManager().SwapMagazine(
mag);
4428 else if (GetWeaponManager().CanLoadBullet(
wpn,
mag))
4456 for (
int att_i = 0;
att_i < GetInventory().AttachmentCount(); ++
att_i)
4532 GetGame().GetMission().AddDummyPlayerToScheduler(
this);
4541 return m_LiquidTendencyDrain;
4547 m_LiquidTendencyDrain =
state;
4554 return m_FlagRaisingTendency;
4560 m_FlagRaisingTendency =
state;
4570 return GetWeightEx();
4575 return GetWeightEx() >= OVERLOAD_LIMIT;
4597 return GetInventory().HasEntityInInventory(
entity);
4602 if (
GetGame().IsMultiplayer())
4618 bool i_owned = GetHumanInventory().HasEntityInInventory(
item);
4633 Error(
"[syncinv] unsupported instance type t=" +
t);
4663 int attcount = GetInventory().AttachmentCount();
4699 return m_VisibilityCoef;
4711 float health = GetHealth(
"",
"");
4717 float toxicity = GetStatToxicity().Get();
4723 float blood = GetHealth(
"",
"Blood");
4729 float energy = GetStatEnergy().Get();
4735 float water = GetStatWater().Get();
4778 if (m_ImmunityBoosted)
4794 float health = GetHealth(
"",
"");
4801 float toxicity = GetStatToxicity().Get();
4808 float blood = GetHealth(
"",
"Blood");
4809 float blood_max = GetMaxHealth(
"",
"Blood");
4815 float energy = GetStatEnergy().Get();
4822 float water = GetStatWater().Get();
4823 float water_max = GetStatWater().GetMax();
4865 if (GetPlayerStats())
4867 float max_health = GetMaxHealth(
"GlobalHealth",
"Health") + 0.01;
4868 float max_blood = GetMaxHealth(
"GlobalHealth",
"Blood") + 0.01;
4891 if (
item && GetThrowing() && GetThrowing().IsThrowingModeEnabled())
4894 if (GetBrokenLegs() !=
eBrokenLegs.NO_BROKEN_LEGS)
4940 return m_IsFighting;
4945 return m_EmoteManager && m_EmoteManager.IsEmotePlaying();
4959 return m_AnimCommandStarting &
mask;
4964 if (!m_FightEndBlendTimer)
4965 m_FightEndBlendTimer =
new Timer();
4966 if (!m_FightEndBlendTimer.IsRunning())
4972 m_IsFighting =
false;
4979 if (
item &&
item.GetHierarchyParent() &&
item.GetHierarchyParent().IsWeapon() &&
item.IsRuined())
4981 PlayAttachmentDropSound();
4982 return DropItem(
item);
4985 if (
item &&
item == GetItemInHands() &&
item.IsRuined())
4986 return PredictiveDropEntity(
item);
5010 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5015 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5016 if (GetSymptomManager())
5017 GetSymptomManager().OnRPC(
ERPCs.RPC_PLAYER_SYMPTOM_ON,
ctx);
5020 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5021 if (GetSymptomManager())
5022 GetSymptomManager().OnRPC(
ERPCs.RPC_PLAYER_SYMPTOM_OFF,
ctx);
5025 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5026 if (m_TrasferValues)
5027 m_TrasferValues.OnRPC(
ctx);
5030 case ERPCs.RPC_USER_ACTION_MESSAGE:
5033 if (
ctx.Read(m_UAParamMessage))
5040 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5047 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5048 ref Param5<float, float, float, float, bool> p_debug_synch =
new Param5<float, float, float, float, bool>(0, 0, 0, 0,
false);
5062 case ERPCs.RPC_WARNING_ITEMDROP:
5067 GetGame().GetMission().AddActiveInputExcludes({
"menu"});
5072 case ERPCs.RPC_WARNING_TELEPORT:
5077 GetGame().GetMission().AddActiveInputExcludes({
"menu"});
5081 case ERPCs.RPC_INIT_SET_QUICKBAR:
5085 for (
int i = 0;
i <
count.param1 ;
i++)
5086 m_QuickBarBase.OnSetEntityRPC(
ctx);
5090 case ERPCs.RPC_SYNC_THERMOMETER:
5099 case ERPCs.RPC_CHECK_PULSE:
5108 if (m_CheckPulseLastTarget)
5115 SoundHardTreeFallingPlay();
5119 SoundSoftTreeFallingPlay();
5123 SoundHardBushFallingPlay();
5127 SoundSoftBushFallingPlay();
5130 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5131 if (m_DebugMonitorValues)
5132 m_DebugMonitorValues.OnRPCFloat(
ctx);
5135 case ERPCs.RPC_DEBUG_MONITOR_STR:
5136 if (m_DebugMonitorValues)
5137 m_DebugMonitorValues.OnRPCString(
ctx);
5153#ifdef DIAG_DEVELOPER
5154 case ERPCs.DEV_RPC_AGENT_RESET:
5158 m_AgentPool.RemoveAllAgents();
5162 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5169 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5180 case ERPCs.DEV_AGENT_GROW:
5182 m_AgentPool.RemoteGrowRequestDebug(
ctx);
5186 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5189 mid.StopWatchRequest(
this);
5194 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5196 PluginUniversalTemperatureSourceServer
plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5201 case ERPCs.DEV_UTS_DEBUG_DATA:
5203 PluginUniversalTemperatureSourceClient
plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5211 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5220 bool success =
GetGame().ExecuteEnforceScript(
"void scConsMain() \n{\n" +
code +
"\n}\n",
"scConsMain");
5227 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5229 PluginDeveloper
dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5230 if (
dev.m_ScriptConsole)
5235 case ERPCs.DEV_SET_DEV_ITEM:
5241 mid2.RegisterDebugItem(
ent.param1,
this);
5247 case ERPCs.RPC_ITEM_DIAG:
5260#ifdef DIAG_DEVELOPER
5265 PluginDeveloperSync
module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
5282 super.OnGameplayDataHandlerSync();
5306 if (m_ContaminatedAreaEffectEnabled ==
enable)
5311 if (!m_ContaminatedAroundPlayer)
5318 if (!m_ContaminatedAroundPlayerTiny &&
tinyId != 0)
5329 if (!m_AmbientContamination &&
soundset !=
"")
5330 PlaySoundSetLoop(m_AmbientContamination,
soundset, 0.1, 0.1);
5335 if (m_ContaminatedAroundPlayer)
5337 m_ContaminatedAroundPlayer.
Stop();
5338 m_ContaminatedAroundPlayer =
null;
5341 if (m_ContaminatedAroundPlayerTiny)
5343 m_ContaminatedAroundPlayerTiny.
Stop();
5344 m_ContaminatedAroundPlayerTiny =
null;
5350 if (m_AmbientContamination)
5351 StopSoundSet(m_AmbientContamination);
5355 m_ContaminatedAreaEffectEnabled =
enable;
5366 UpdateCorpseStateVisual();
5367 if (m_CorpseState > 0)
5369 else if (m_CorpseState < 0)
5371 m_CorpseStateLocal = m_CorpseState;
5378 if (!
GetGame().IsDedicatedServer())
5381 ClearLastUAMessage();
5382 if (m_CorpseState != 0)
5391 super.OnVariablesSynchronized();
5392 if (m_ModuleLifespan)
5394 m_ModuleLifespan.SynchLifespanVisual(
this, m_LifeSpanState, m_HasBloodyHandsVisible, m_HasBloodTypeVisible,
m_BloodType);
5396 if (m_LifespanLevelLocal != m_LifeSpanState)
5398 m_LifespanLevelLocal = m_LifeSpanState;
5399 UpdateHairSelectionVisibility();
5404 if (GetBleedingManagerRemote() && IsPlayerLoaded())
5405 GetBleedingManagerRemote().OnVariablesSynchronized(GetBleedingBits());
5407 if (m_CorpseStateLocal != m_CorpseState && (IsPlayerLoaded() || IsControlledPlayer()))
5408 UpdateCorpseState();
5410 if (m_RefreshAnimStateIdx != m_LocalRefreshAnimStateIdx)
5412 RefreshHandAnimationState(396);
5413 m_LocalRefreshAnimStateIdx = m_RefreshAnimStateIdx;
5415 if (m_InsideEffectArea != m_InsideEffectAreaPrev)
5417 if (m_InsideEffectArea)
5418 OnPlayerIsNowInsideEffectAreaBeginClient();
5420 OnPlayerIsNowInsideEffectAreaEndClient();
5421 m_InsideEffectAreaPrev = m_InsideEffectArea;
5425 if (m_SyncedModifiers != m_SyncedModifiersPrev)
5427 int diff = (m_SyncedModifiers & ~m_SyncedModifiersPrev) | (~m_SyncedModifiers & m_SyncedModifiersPrev);
5438 m_SyncedModifiersPrev = m_SyncedModifiers;
5442 HandleBrokenLegsSync();
5450 raib.OnVariableSynchronized();
5457 return (m_SyncedModifiers & m_SyncedModifiersPrev);
5462 if (m_BrokenLegState != m_LocalBrokenState)
5464 m_LocalBrokenState = m_BrokenLegState;
5465 bool initial = (m_BrokenLegState < 0);
5466 int state = GetBrokenLegs();
5489 item.SetHealthMax(
"",
"");
5507 m_PlayerSelected =
true;
5509 m_QuickBarBase.updateSlotsCount();
5511 m_WeaponManager.SortMagazineAfterLoad();
5519 m_CachedPlayerID =
identity.GetId();
5520 m_CachedPlayerName =
identity.GetName();
5527 if (m_aQuickBarLoad)
5529 int count = m_aQuickBarLoad.Count();
5534 m_QuickBarBase.OnSetEntityNoSync(m_aQuickBarLoad.Get(
i).param1, m_aQuickBarLoad.Get(
i).param2);
5535 params.Insert(m_aQuickBarLoad.Get(
i));
5540 m_aQuickBarLoad =
NULL;
5543 GetSoftSkillsManager().InitSpecialty(GetStatSpecialty().
Get());
5544 GetModifiersManager().SetModifiers(
true);
5548 if (
GetGame().IsMultiplayer())
5551 if (m_ProcessUIWarning)
5554 m_ProcessUIWarning =
false;
5571 m_CraftingManager =
new CraftingManager(
this, m_ModuleRecipesManager);
5583 GetGame().GetMission().ResetGUI();
5588 m_DeathCheckTimer =
new Timer();
5589 m_DeathCheckTimer.Run(0.1,
this,
"CheckDeath",
null,
true);
5594 int idx =
GetGame().GetMenuData().GetLastPlayedCharacter();
5598 GetGame().GetMission().EnableAllInputs(
true);
5601 m_PresenceNotifier.Init(
this);
5606 m_Bot =
new Bot(
this);
5615 m_UndergroundHandler =
null;
5616 if (m_EffectWidgets)
5625 g_Game.GetMenuData().SaveCharacter(
false,
true);
5626 g_Game.GetMenuData().SetCharacterName(
g_Game.GetMenuData().GetLastPlayedCharacter(),
g_Game.GetMenuDefaultCharacterData(
false).GetCharacterName());
5627 g_Game.GetMenuData().SaveCharactersLocal();
5642 else if (
req.IsRequesterRunning())
5656 if (
item &&
item.IsObstructingVoice())
5657 item.MutePlayer(
this,
true);
5669 m_EffectWidgets.ResetMaskUpdateCount();
5671 if (
mask.HasIntegratedFilter() ||
mask.IsExternalFilterAttached())
5676 m_EffectWidgets.IncreaseMaskUpdateCount();
5684 if (m_EffectWidgets)
5689 UpdateMaskBreathWidget(
mask,
true);
5699 if (m_EffectWidgets)
5705 UpdateMaskBreathWidget(
mask);
5753 if (m_ActionManager)
5760 float blood = GetHealth(
"GlobalHealth",
"Blood");
5776 if (!
ctx.Read(type))
5784 if (
dst.ReadFromContext(
ctx))
5789 item1.SplitItemToInventoryLocation(
dst);
5791 item1.SplitIntoStackMaxToInventoryLocation(
dst);
5808 else if (type == 1 &&
item1)
5813 item1.SplitItem(
this);
5815 else if (type == 2 &&
item1)
5824 else if (type == 3 &&
item1)
5825 item1.SplitIntoStackMaxHands(
this);
5834 if (GetHumanInventory())
5835 return ItemBase.Cast(GetHumanInventory().GetEntityInHands());
5967 item.PlaceOnSurface();
6020 string t =
src.GetType();
6045 return CreateCopyOfItemInInventoryOrGroundEx(
src,
false);
6053 dst =
ItemBase.Cast(SpawnEntityOnGroundPos(
src.GetType(),
this.GetPosition()));
6054 dst.PlaceOnSurface();
6081 Message(
text,
"colorStatusChannel");
6087 Message(
text,
"colorAction");
6093 Message(
text,
"colorFriendly");
6099 Message(
text,
"colorImportant");
6110 GetGame().GetUIManager().CloseAll();
6111 GetGame().GetMission().RemoveActiveInputExcludes({
"inventory"},
false);
6129 if ((
GetGame().IsServer() || !
GetGame().IsMultiplayer()) && GetInventory())
6134 for (
int i = 0;
i <
items.Count();
i++)
6144 LocalDestroyEntityInHands();
6161 ServerDropEntity(
item);
6168 GetGame().ObjectGetType(
this, type);
6180 m_ModuleLifespan.UpdateLifespan(
this,
true);
6185 if (!HasCoveredFaceForShave() && GetLifeSpanState())
6196 if (!
GetGame().IsDedicatedServer())
6213 eff.SetAutodestroy(
true);
6225 if (!ToDelete() && IsAlive() && !IsSwimming() && !m_IsDrowning)
6233 if (m_AddModifier != -1)
6237 ad.StartModifier(m_AddModifier);
6250 switch (m_BreathVapour)
6279 else if (IsUnconscious())
6296 UpdateHairSelectionVisibility();
6302 return m_LifeSpanState;
6307 return m_LastShavedSeconds;
6317 return IsExclusionFlagPresent(GetFaceCoverageShaveValues());
6333 return m_HasBloodyHandsVisible;
6338 return m_HasBloodyHandsVisible;
6343 SetBloodyHandsBase(show);
6348 SetBloodyHandsBase(type);
6353 m_HasBloodyHandsVisible = type;
6356#ifdef DIAG_DEVELOPER
6358 if (IsControlledPlayer())
6374 return m_HasBloodTypeVisible;
6379 m_HasBloodTypeVisible = show;
6400 return m_SoftSkillsManager;
6405 if (IsPlayerSelected() && !IsAlive())
6407 SimulateDeath(
true);
6408 m_DeathCheckTimer.Stop();
6421 if (m_PresenceNotifier)
6422 return m_PresenceNotifier.GetNoisePresence();
6430 return (m_PersistentFlags &
bit);
6436 m_PersistentFlags = (m_PersistentFlags |
bit);
6438 m_PersistentFlags = ((
~bit) & m_PersistentFlags);
6447 return m_StoreLoadVersion;
6453 if (
GetGame().SaveVersion() < 102)
6455 ctx.Write(ACT_STORE_SAVE_VERSION);
6460 GetHumanInventory().OnStoreSave(
ctx);
6461 OnStoreSaveLifespan(
ctx);
6465 GetPlayerStats().SaveStats(
ctx);
6466 m_ModifiersManager.OnStoreSave(
ctx);
6467 m_AgentPool.OnStoreSave(
ctx);
6468 GetSymptomManager().OnStoreSave(
ctx);
6469 if (GetBleedingManagerServer())
6471 GetBleedingManagerServer().OnStoreSave(
ctx);
6473 m_PlayerStomach.OnStoreSave(
ctx);
6474 ctx.Write(GetBrokenLegs());
6476 SaveAreaPersistenceFlag(
ctx);
6495 if (GetModifiersManager())
6497 ctx.Write(m_PersistentFlags);
6509 if (!
ctx.Read(m_StoreLoadVersion))
6513 if (!
super.OnStoreLoad(
ctx, version))
6520 if (!OnStoreLoadLifespan(
ctx, version))
6525 if (!GetPlayerStats().LoadStats(
ctx, version))
6527 Print(
"---- failed to load PlayerStats ----");
6531 if (version < m_ModifiersManager.GetStorageVersion())
6533 Print(
"---- failed to load ModifiersManager, unsupported version ----");
6538 if (!m_ModifiersManager.OnStoreLoad(
ctx, version))
6540 Print(
"---- failed to load ModifiersManager, read fail ----");
6545 if (version < m_AgentPool.GetStorageVersion())
6547 Print(
"---- failed to load AgentPool, unsupported version ----");
6552 if (!m_AgentPool.OnStoreLoad(
ctx, version))
6554 Print(
"---- failed to load AgentPool, read fail ----");
6562 Print(
"---- failed to load SymptomManager, unsupported version ----");
6569 Print(
"---- failed to load SymptomManager, read fail ----");
6576 Print(
"---- failed to load BleedingManagerServer, unsupported version ----");
6583 Print(
"---- failed to load BleedingManagerServer, read fail ----");
6588 if (version < m_PlayerStomach.GetStorageVersion())
6590 Print(
"---- failed to load PlayerStomach, unsupported version ----");
6595 if (!m_PlayerStomach.OnStoreLoad(
ctx, version))
6597 Print(
"---- failed to load PlayerStomach, read fail ----");
6605 if (!
ctx.Read(m_BrokenLegState))
6609 if (!
ctx.Read(m_LocalBrokenState))
6614 if (version >= 125 && (!
ctx.Read(m_PersistentFlags)))
6616 Print(
"---- failed to load Persistent Flags, read fail ----");
6633 if (!
hive || !
hive.CharacterIsLoginPositionChanged(
this))
6645 Print(
"---- PlayerBase OnStoreLoad SUCCESS ----");
6651 GetHumanInventory().OnAfterStoreLoad();
6653 m_EmoteManager.AfterStoreLoad();
6658 ctx.Write(m_LifeSpanState);
6659 ctx.Write(m_LastShavedSeconds);
6660 ctx.Write(m_HasBloodyHandsVisible);
6661 ctx.Write(m_HasBloodTypeVisible);
6713 if (m_AnalyticsTimer)
6717 data.m_TimeInterval = m_AnalyticsTimer.GetRemaining();
6719 data.m_PositionStart = m_PlayerOldPos;
6733 GetGame().GetAnalyticsServer().OnPlayerConnect(
this);
6736 if (m_AnalyticsTimer)
6737 m_AnalyticsTimer.Run(60,
this,
"UpdatePlayerMeasures",
null,
true);
6740 ResetConstructionActionData();
6749 ResetConstructionActionData();
6759 GetGame().GetAnalyticsServer().OnPlayerDisconnect(
this);
6763 data.m_Reason =
"Disconnected";
6766 if (m_AnalyticsTimer)
6767 m_AnalyticsTimer.Stop();
6768 UpdatePlayerMeasures();
6770 SetPlayerDisconnected(
true);
6775 GetModifiersManager().SetModifiers(
enable);
6780 PluginTransmissionAgents
plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
6879 GetGame().GetUIManager().ScreenFadeOut(0);
6889 PlaySoundEventEx(
id,
false,
false,
param);
6892 SendSoundEventEx(
id,
param);
6902 SendSoundEventEx(
id);
6910 m_SoundEventParam =
param;
6913 if (!
GetGame().IsMultiplayer())
6921 if (m_SoundEvent != 0 && m_SoundEventSent)
6924 m_SoundEventParam = 0;
6925 m_SoundEventSent =
false;
6932 if (m_SoundEvent != 0 && !m_SoundEventSent)
6933 m_SoundEventSent =
true;
6943 if (!m_PlayerSoundEventHandler)
6951 return m_PlayerSoundEventHandler;
6959 m_BleedingSourceCount++;
6960 if (IsControlledPlayer())
6962 if (!
GetGame().IsDedicatedServer())
6966 dis_elm.SetValue(GetBleedingSourceCount());
6977 m_BleedingSourceCount--;
6981 if (GetBleedingSourceCount() > 0)
6987 if (IsControlledPlayer())
6989 if (!
GetGame().IsDedicatedServer())
6994 dis_elm.SetValue(GetBleedingSourceCount());
7002 OnBleedingSourceRemoved();
7007 return m_BleedingSourceCount;
7013#ifdef DIAG_DEVELOPER
7016 GetStomach().ClearContents();
7019 GetModifiersManager().ResetAll();
7022 if (m_BleedingManagerServer)
7023 m_BleedingManagerServer.RemoveAllSources();
7026 if (GetPlayerStats())
7028 int bloodType = GetStatBloodType().Get();
7029 GetPlayerStats().ResetAllStats();
7035 m_AgentPool.RemoveAllAgents();
7041 if (IsUnconscious())
7047 GetStatWater().Set(GetStatWater().
GetMax());
7048 GetStatEnergy().Set(GetStatEnergy().
GetMax());
7052 FixAllInventoryItems();
7076 if (m_SoundEvent != 0)
7078 PlaySoundEventEx(m_SoundEvent,
false,
true, m_SoundEventParam);
7080 m_SoundEventParam = 0;
7086 if (
GetGame().IsClient())
return;
7087 RequestSoundEvent(1234);
7093 if (
state != m_StaminaState)
7095 m_StaminaState =
state;
7103 return m_StaminaState;
7108 m_QuickBarBase.updateSlotsCount();
7114 if (GetPlayerState() ==
EPlayerStates.ALIVE && !IsRestrained())
7116 GetHive().CharacterSave(
this);
7136 GetGame().GetPlayers(m_ServerPlayers);
7138 PluginTransmissionAgents
plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7140 foreach (Man
target: m_ServerPlayers)
7149 SpreadAgentsEx(3, 1);
7155 return m_AgentPool.GetAgents();
7167 m_AgentPool.RemoveAllAgents();
7180 return m_AgentPool.GetSingleAgentCount(
agent_id);
7192 return m_AgentPool.GetTotalAgentCount();
7197 m_AgentPool.PrintAgents();
7207 m_AgentPool.AntibioticsAttack(
value);
7230 return (!
mask || (
mask &&
mask.AllowFoodConsumption()));
7236 return m_ModifiersManager;
7241 if (!m_StatWater && GetPlayerStats())
7248 if (!m_StatToxicity && GetPlayerStats())
7250 return m_StatToxicity;
7255 if (!m_StatEnergy && GetPlayerStats())
7257 return m_StatEnergy;
7262 if (!m_StatHeatComfort && GetPlayerStats())
7264 return m_StatHeatComfort;
7269 if (!m_StatTremor && GetPlayerStats())
7271 return m_StatTremor;
7318 m_HasHeatBuffer = show;
7325 return m_UALastMessage;
7330 m_UALastMessage =
pMsg;
7332 if (m_UALastMessageTimer.IsRunning())
7333 m_UALastMessageTimer.Stop();
7340 if (m_UALastMessageTimer.IsRunning())
7341 m_UALastMessageTimer.Stop();
7343 m_UALastMessage =
"";
7352 m_InjuryHandler.CheckValue(
true);
7389 m_InjuryHandler.SetInjuryCommandParams(
enable,
level);
7392 GetSymptomManager().SetAnimation(
pCtx);
7395 OnQuickbarSetEntityRequest(
pCtx);
7398 GetInventory().OnInventoryJunctureFromServer(
pCtx);
7401 GetInventory().OnInventoryJunctureRepairFromServer(
pCtx);
7404 GetInventory().OnInventoryJunctureFailureFromServer(
pCtx);
7420 GetSymptomManager().SetAnimation(
pCtx);
7426 if (GetAimingModel() && IsFireWeaponRaised())
7427 GetAimingModel().RequestKuruShake(amount);
7443 m_BrokenLegsJunctureReceived =
true;
7467 return m_ItemsToDelete.Count() > 0;
7474 AddItemToDelete(
item);
7481 item.SetPrepareToDelete();
7482 m_ItemsToDelete.Insert(
item);
7488 return !(GetThrowing().IsThrowingAnimationPlaying() || GetDayZPlayerInventory().IsProcessing() || (
GetActionManager() &&
GetActionManager().GetRunningAction()));
7498 int count = m_ItemsToDelete.Count();
7501 if (CanDeleteItems())
7508 for (
int i =
count - 1;
i >= 0 ;
i--)
7515 m_ItemsToDelete.Remove(
i);
7520 for (
int j =
count - 1;
j >= 0 ;
j--)
7524 m_ItemsToDelete.Remove(
j);
7528 m_ItemsToDelete.Remove(
j);
7547 m_fLastHeadingDiff = 0;
7557 return m_InventorySoftLockCount > 0;
7564 m_InventorySoftLockCount++;
7566 m_InventorySoftLockCount--;
7568 if (m_InventorySoftLockCount < 0)
7569 m_InventorySoftLockCount = 0;
7571 m_InventorySoftLocked = IsInventorySoftLocked();
7576 if (m_aQuickBarLoad)
7582 return m_LiftWeapon_player;
7604 m_ProcessLiftWeaponState =
state;
7605 m_ProcessLiftWeapon =
true;
7615 if (!
GetGame().IsMultiplayer())
7617 m_LiftWeapon_player =
state;
7623 GetWeaponManager().OnLiftWeapon();
7630 if (
GetGame().IsMultiplayer() &&
GetGame().IsClient() && !
ctx.CanStoreInputUserData())
7635 else if (
GetGame().IsMultiplayer() &&
GetGame().IsClient() &&
ctx.CanStoreInputUserData())
7654 if (
limited && !m_LiftWeapon_player)
7655 SendLiftWeaponSync(
true);
7656 else if (!
limited && m_LiftWeapon_player)
7657 SendLiftWeaponSync(
false);
7659 else if (m_LiftWeapon_player)
7660 SendLiftWeaponSync(
false);
7666 if (m_ProcessLiftWeapon)
7670 hcw.LiftWeapon(m_ProcessLiftWeaponState);
7672 GetWeaponManager().OnLiftWeapon();
7673 m_LiftWeapon_player = m_ProcessLiftWeaponState;
7674 m_ProcessLiftWeapon =
false;
7724 if (IsControlledPlayer())
7727 if (GetDamageDealtEffect())
7728 m_DamageDealtEffect =
null;
7730 if (GetFlashbangEffect())
7731 m_FlashbangEffect =
null;
7739 if (!IsAlive() && IsPlayerSelected())
7741 m_DeathDarkeningParam.param1 =
progress;
7745 if (m_DeathDarkeningCurrentTime >=
duration)
7746 StopDeathDarkeningEffect();
7749 StopDeathDarkeningEffect();
7756 if ((m_EmoteManager.m_Callback && m_EmoteManager.m_Callback.m_IsFullbody) || m_EmoteManager.m_IsSurrendered)
7765 m_EmoteManager.EndSurrenderRequest(
data);
7771 return m_EmoteManager.m_IsSurrendered;
7778 return m_PlayerLoaded;
7785 if (IsInFBEmoteState() && IsControlledPlayer() && IsPlayerSelected())
7786 OverrideSlidePoseAngle(
Math.
PI2);
7787 else if (!IsInFBEmoteState() && IsControlledPlayer() && IsPlayerSelected())
7788 OverrideSlidePoseAngle(m_OriginalSlidePoseAngle);
7804 if (GetWeaponManager().CanDetachMagazine(
wpn,
mag))
7826 return GetWeaponManager().DetachMagazine(
il);
7829 return super.PredictiveTakeEntityToTargetInventory(
target, flags,
item);
7839 return GetWeaponManager().DetachMagazine(
il);
7842 return super.PredictiveTakeEntityToInventory(flags,
item);
7851 if (GetWeaponManager().CanAttachMagazine(
parentWpn,
mag))
7852 return GetWeaponManager().AttachMagazine(
mag);
7866 return GetWeaponManager().AttachMagazine(
mag);
7870 return super.PredictiveTakeEntityToTargetAttachmentEx(
target,
item, slot);
7880 return GetWeaponManager().DetachMagazine(
il);
7896 return GetWeaponManager().DetachMagazine(
dst);
7917 return GetWeaponManager().DetachMagazine(
il);
7921 return super.PredictiveDropEntity(
item);
7940 return GetWeaponManager().SwapMagazine(
swapmag2);
7944 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
7954 return GetWeaponManager().SwapMagazine(
swapmag1);
7958 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
7988 if (
item1.IsHeavyBehaviour() &&
item1.GetInventory().GetCurrentInventoryLocation(
il) &&
il.GetType() ==
InventoryLocationType.GROUND && !m_ActionManager.GetRunningAction())
8005 if (
item.IsHeavyBehaviour() && !m_ActionManager.GetRunningAction() && !
item.GetHierarchyParent())
8020 super.PredictiveTakeEntityToHands(
item);
8033 return GetWeaponManager().DetachMagazine(
dst);
8062 if (!m_CharactersHead)
8064 ErrorEx(
"No valid head detected on character!");
8070 m_HideHairAnimated = !m_HideHairAnimated;
8071 for (
int i = 0;
i < m_CharactersHead.m_HeadHairSelectionArray.Count(); ++
i)
8075 stt.SetSelectionState(m_HideHairAnimated);
8076 m_CharactersHead.m_HeadHairHidingStateMap.Set(
i,
stt);
8077#ifdef DIAG_DEVELOPER
8080 diagmenu.m_HairHidingStateMap.Set(
i, m_HideHairAnimated);
8090#ifdef DIAG_DEVELOPER
8103 m_CharactersHead.m_HeadHairHidingStateMap.Set(
level,
stt);
8109 if (!
item || !
item.GetHeadHidingSelection() || !m_CharactersHead)
8120 if (
item.HidesSelectionBySlot())
8122 count =
item.GetInventory().GetSlotIdCount();
8127 str =
item.GetHeadHidingSelection().Get(
i);
8128 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(
str);
8133 Debug.
Log(
"No valid selection '" +
str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
8140 count =
item.GetHeadHidingSelection().Count();
8143 str =
item.GetHeadHidingSelection().Get(
i);
8144 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(
str);
8149 Debug.
Log(
"No valid selection '" +
str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
8153 UpdateHairSelectionVisibility();
8158 if (!m_CharactersHead)
8163 int count = m_CharactersHead.m_HeadHairHidingStateMap.Count();
8167 if (IsMale() && m_CharactersHead.GetBeardIndex() > -1 && !
was_debug)
8168 SetHairLevelToHide(m_CharactersHead.GetBeardIndex(), GetLifeSpanState() !=
LifeSpanState.BEARD_EXTRA);
8172 m_CharactersHead.SetSimpleHiddenSelectionState(
i,
true);
8176 stt = m_CharactersHead.m_HeadHairHidingStateMap.Get(
i);
8180 if (!m_CharactersHead.IsHandlingException())
8182 m_CharactersHead.SetSimpleHiddenSelectionState(
i,
shown);
8183 UpdateTranslatedSelections(
stt);
8194 m_CharactersHead.SetSimpleHiddenSelectionState(m_CharactersHead.GetHairIndex(),
false);
8196 m_CharactersHead.SetSimpleHiddenSelectionState(m_CharactersHead.GetBeardIndex(),
false);
8208 m_CharactersHead.SetSimpleHiddenSelectionState(
index,
false);
8218 HideHairSelections(
headgear,
true);
8219 HideHairSelections(
mask,
true);
8224 return m_ActiveNVTypes && m_ActiveNVTypes.Count() > 0;
8229 return m_LoweredNVGHeadset;
8234 if (!m_ActiveNVTypes || m_ActiveNVTypes.Count() == 0)
8237 return m_ActiveNVTypes[m_ActiveNVTypes.Count() - 1];
8242 return m_ActiveNVTypes;
8249 AddActiveNV(
NVTypes.NV_GOGGLES);
8254 m_LoweredNVGHeadset =
state;
8259 if (!m_ActiveNVTypes || (
GetGame().IsMultiplayer() &&
GetGame().IsServer()))
8262 Error(
"AddActiveNV | illegal server-side call!");
8268 if (m_ActiveNVTypes.Find(type) == -1)
8269 m_ActiveNVTypes.Insert(type);
8274 if (!m_ActiveNVTypes || (
GetGame().IsMultiplayer() &&
GetGame().IsServer()))
8277 Error(
"RemoveActiveNV | illegal server-side call!");
8283 if (m_ActiveNVTypes.Find(type) != -1)
8284 m_ActiveNVTypes.RemoveItem(type);
8289 m_ActiveNVTypes.Clear();
8315 if (FindAttachmentBySlotName(
"Eyewear"))
8316 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Eyewear").FindAttachmentBySlotName(
"NVG"));
8317 else if (FindAttachmentBySlotName(
"Headgear"))
8318 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Headgear").FindAttachmentBySlotName(
"NVG"));
8321 nvg.RotateGoggles(
nvg.m_IsLowered);
8331 item.SetSimpleHiddenSelectionState(0, 1);
8332 item.SetSimpleHiddenSelectionState(1, 0);
8336 item.SetSimpleHiddenSelectionState(0, 0);
8337 item.SetSimpleHiddenSelectionState(1, 1);
8367 idx =
bodypart.GetHiddenSelectionIndex(
"personality");
8373 path =
"cfgVehicles " +
item.GetType();
8374 idx =
item.GetHiddenSelectionIndex(
"personality");
8376 item.SetObjectTexture(
idx, m_DecayedTexture);
8380 SetFaceTexture(m_DecayedTexture);
8398 m_FliesEff.SetDecalOwner(
this);
8400 p = m_FliesEff.GetParticle();
8402 if (!m_SoundFliesEffect)
8404 PlaySoundSetLoop(m_SoundFliesEffect,
"Flies_SoundSet", 1.0, 1.0);
8416 m_FliesEff.SetDecalOwner(
this);
8418 p = m_FliesEff.GetParticle();
8420 if (!m_SoundFliesEffect)
8422 PlaySoundSetLoop(m_SoundFliesEffect,
"Flies_SoundSet", 1.0, 1.0);
8431 StopSoundSet(m_SoundFliesEffect);
8441 idx = GetHiddenSelectionIndex(
"decay_preload");
8444 SetObjectTexture(
idx, m_DecayedTexture);
8455 m_LastMapScale = scale;
8461 scale = m_LastMapScale;
8464 return m_LastMapScale != -1.0;
8472 if (GetItemInHands() ==
item)
8475 return PredictiveDropEntity(
item);
8478 return PredictiveDropEntity(
item);
8483 return GetHumanInventory().ThrowEntity(
item, dir, 0);
8508 m_ProcessUIWarning =
state;
8554 itemB.SplitIntoStackMaxToInventoryLocationClient(
il);
8570 itemB.SplitIntoStackMaxToInventoryLocationClient(
il);
8579 if (CheckAndExecuteStackSplit(flags,
item,
this))
8623 if (CheckAndExecuteStackSplit(flags,
item,
target))
8656 if (CheckAndExecuteStackSplitToInventoryLocation(
dst,
dst.GetItem()))
8674 if (
GetCommand_Move() && m_ContaminatedAroundPlayer && m_ContaminatedAroundPlayerTiny)
8707 m_ContaminatedAroundPlayer.SetTransform(
transform);
8708 m_ContaminatedAroundPlayerTiny.SetTransform(
transform);
8714 if (!IsControlledPlayer())
8718 if (m_ProcessRemoveGlassesEffects)
8720 for (
i = 0;
i < m_ProcessRemoveGlassesEffects.Count();
i++)
8722 m_ProcessRemoveGlassesEffects.Clear();
8725 if (m_ProcessAddGlassesEffects)
8727 for (
i = 0;
i < m_ProcessAddGlassesEffects.Count();
i++)
8729 m_ProcessAddGlassesEffects.Clear();
8794 return m_CachedPlayerName;
8799 return m_CachedPlayerID;
Param4< int, int, string, int > TSelectableActionInfoWithColor
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
eBleedingSourceType GetType()
void ActionGetOutTransport()
map< typename, ref array< ActionBase_Basic > > TInputActionMap
void ActionStartEngine()
DEPRECATED.
class ActionTargets ActionTarget
ActionUncoverHeadBase ActionContinuousBase ActionUncoverHeadSelf()
ActionWashHandsWaterCB ActionContinuousBaseCB ActionWashHandsWater()
WorldCraftActionReciveData m_RecipeID
void AddAction(typename actionName)
void RemoveAction(typename actionName)
TInputActionMap m_InputActionMap
ref ArrowManagerBase m_ArrowManager
override ArrowManagerBase GetArrowManager()
const int BREATH_VAPOUR_LEVEL_MAX
void EffectRadial(Param param1, Param param2)
class RecipeCacheData m_Recipes
const int ECE_EQUIP_ATTACHMENTS
const int ECE_PLACE_ON_SURFACE
const int ECE_IN_INVENTORY
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DamageType
exposed from C++ (do not change)
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
ref HumanMovementState m_MovementState
movement state
void DayZPlayerCameraOptics(DayZPlayer pPlayer, HumanInputController pInput)
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
void DayZPlayerUtils()
cannot be instantiated
DisplayElementBase GetElement(eDisplayElements element_id)
void VirtualHud(PlayerBase player)
int GetID()
Get the ID registered in SEffectManager.
void EmoteManager(PlayerBase player)
PluginAdminLog m_AdminLog
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
proto native Hive GetHive()
void InjuryAnimationHandler(PlayerBase player)
FindInventoryLocationType
flags for searching locations in inventory
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override void InsertAgent(int agent, float count=1)
class ItemBase extends InventoryItem SpawnItemOnLocation(string object_name, notnull InventoryLocation loc, bool full_quantity)
void MapNavigationBehaviour(PlayerBase pPlayer, EMapNavigationType pNavigationType=EMapNavigationType.BASIC)
PluginPlayerStatus m_ModulePlayerStatus
bool OnStoreLoad(ParamsReadContext ctx, int version)
void ModifiersManager(PlayerBase player)
void NotifiersManager(PlayerBase player)
ref VirtualHud m_VirtualHud
VirtualHud GetVirtualHud()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
void PlayerSoundEventHandler(PlayerBase player)
void PlayerSoundManagerClient(PlayerBase player)
array< ref PlayerStatBase > Get()
ref array< ref PlayerStatBase > m_PlayerStats
PlayerStatBase GetStatObject(int id)
void PlayerStomach(PlayerBase player)
PluginConfigDebugProfile m_ConfigDebugProfile
void PluginItemDiagnostic()
ref map< PlayerBase, int > m_BloodType
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
PluginBase GetPlugin(typename plugin_type)
void PluginPresenceNotifier()
EPresenceNotifierNoiseEventType
void QuickBarBase(PlayerBase player)
void RandomGeneratorSyncManager(DayZPlayer player)
class SoundObjectBuilder SoundObject(SoundParams soundParams)
void SoundObjectBuilder(SoundParams soundParams)
StaminaHandler m_StaminaHandler
class JsonUndergroundAreaTriggerData GetPosition
void UndergroundHandlerClient(PlayerBase player)
static string GetPulseMessage(EPulseType pulse_type, int blood_level)
const int TARGET_IRREGULAR_PULSE_BIT
static void PlayerDisconnected(StatsEventDisconnectedData data)
static void PlayerMeasures(StatsEventMeasuresData data)
const string STAT_PLAYTIME
const string STAT_DISTANCE
static SoundOnVehicle SaySound(Object source, string sound_name, float distance, bool looped)
static ref TStringArray ARRAY_STRING
static ref Param1< bool > PARAM1_BOOL
static ref Param1< int > PARAM1_INT
static ref Param1< string > PARAM1_STRING
static ref Param2< float, float > PARAM2_FLOAT_FLOAT
represents base for cargo storage for entities
static bool GetUse3DMap()
static int GetLightingConfig()
static bool GetAllowStaminaAffectInertia()
static bool GetHitIndicationPPEEnabled()
static TStringSet GetDisallowedTypesInUnderground()
static bool GetDisableRespawnDialog()
Super root of all classes in Enforce script.
static void RemovePlayerBase(Man player)
static void AddPlayerBase(Man player)
Client only - manage set up crafting on client.
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
this is main camera class
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static const int SJ_BROKEN_LEGS
static const int SJ_ACTION_INTERRUPT
static const int SJ_PLAYER_STATES
static const int SJ_ACTION_ACK_REJECT
static const int SJ_WEAPON_LIFT
static const int SJ_STAMINA
static const int SJ_INVENTORY_REPAIR
static bool ReadShockParams(ParamsReadContext pCtx, out float shockValue)
static const int SJ_KURU_REQUEST
static const int SJ_PLAYER_ADD_MODIFIER
static const int SJ_WEAPON_ACTION_ACK_REJECT
static const int SJ_SHOCK
static void SendDeleteItem(DayZPlayer pPlayer, EntityAI item)
static bool ReadKuruRequest(ParamsReadContext pCtx, out float amount)
static const int SJ_GESTURE_REQUEST
static const int SJ_QUICKBAR_SET_SHORTCUT
static bool ReadBrokenLegsParamsEx(ParamsReadContext pCtx, out int currentState)
static const int SJ_INVENTORY_FAILURE
static const int SJ_WEAPON_ACTION_ACK_ACCEPT
static const int SJ_UNCONSCIOUSNESS
static const int SJ_DELETE_ITEM
static const int SJ_ADS_RESET
static const int SJ_WEAPON_SET_JAMMING_CHANCE
static bool ReadInjuryParams(ParamsReadContext pCtx, out bool pEnable, out eInjuryHandlerLevels level)
static void SendPlayerUnconsciousness(DayZPlayer pPlayer, bool enable)
static const int SJ_ACTION_ACK_ACCEPT
static bool ReadPlayerUnconsciousnessParams(ParamsReadContext pCtx, out bool enable)
static void SendBrokenLegsEx(DayZPlayer pPlayer, int currentState)
static const int SJ_INJURY
static const int SJ_STAMINA_MISC
static const int SJ_INVENTORY
static Shape DrawBoxEx(vector pos1, vector pos2, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOZWRITE)
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Wrapper class for managing particles through SEffectManager.
Wrapper class for managing sound through SEffectManager.
script counterpart to engine's class Inventory
static proto native bool PrepareDropEntityPos(EntityAI owner, notnull EntityAI item, out vector mat[4], bool useValuesInMatrix=false, int conflictCheckDepth=-1)
Finds a transformation for the item to be dropped to If the initial transforation overlaps with anoth...
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
void ShowQuickbarPlayer(bool show)
void ShowHudUI(bool show)
void SetStaminaBarVisibility(bool show)
void Update(float timeslice)
void SetTemperature(string temp)
void ShowQuickbarUI(bool show)
void ShowHudPlayer(bool show)
void UpdateQuickbarGlobalVisibility()
void ToggleHeatBufferPlusSign(bool show)
Client only - manage set up crafting on client.
static string DumpToStringNullSafe(InventoryLocation loc)
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
static const string NAME_FIRE
static string GetLiquidClassname(int liquid_type)
static bool IsSyncLogEnable()
ref MapNavigationBehaviour m_MapNavigationBehaviour
bool AnimCommandCheck(HumanMoveCommandID mask)
bool IsTargetInActiveRefresherRange(EntityAI target)
override void PredictiveTakeEntityToHands(EntityAI item)
float GetSimplifiedShockNormalized()
string m_UALastMessage
user actions last message
ref PlayerSoundManagerServer m_PlayerSoundManagerServer
SymptomManager GetSymptomManager()
void UpdateHairSelectionVisibility(bool was_debug=false)
PlayerStat< float > GetStatSpecialty()
DayZPlayerCameraBase m_CurrentCamera
void SetNVGWorking(bool state)
Deprecated.
bool GetLiquidTendencyDrain()
bool IsAntibioticsActive()
PlayerStat< float > GetStatToxicity()
PlayerBase m_CheckPulseLastTarget
float GetSingleAgentCountNormalized(int agent_id)
ref array< ref Param2< EntityAI, int > > m_aQuickBarLoad
override bool IsRefresherSignalingViable()
ref BleedingSourcesManagerRemote m_BleedingManagerRemote
ref array< int > m_ProcessAddGlassesEffects
override bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
void SetPlayerLoad(float load)
void AddToEnvironmentTemperature(float pTemperature)
DEPRECATED.
override void ProcessLiftWeapon()
ref CraftingManager m_CraftingManager
void FixAllInventoryItems()
override bool IsLanded(int pCurrentCommandID)
void ReloadWeapon(EntityAI weapon, EntityAI magazine)
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
void AddPossibleCoverFaceForShave()
DEPRECATED!
void RefreshHandAnimationState(int delay=0)
void ImmuneSystemTick(float value, float deltaT)
override void OnReceivedHit(ImpactEffectsData hitData)
override void OnVariablesSynchronized()
ref array< int > m_ProcessRemoveEffectWidgets
void OnUnconsciousStart()
void SetCraftingRecipeID(int recipeID)
PlayerSoundManagerServer GetPlayerSoundManagerServer()
void UpdateQuickBarEntityVisibility(EntityAI entity)
override bool CanStartConsumingStamina(EStaminaConsumers consumer)
override bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
ItemBase GetItemOnSlot(string slot_type)
Returns item that's on this player's attachment slot. Parameter slot_type should be a string from con...
override void OnThrowingModeChange(bool change_to_enabled)
override bool CanSwapItemInCargo(EntityAI child_entity, EntityAI new_entity)
override void OnStoreSave(ParamsWriteContext ctx)
bool TakeEntityToInventoryImpl(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
void MessageAction(string text)
void ClearLastUAMessage()
void OnCommandHandlerTick(float delta_time, int pCurrentCommandID)
ref SymptomManager m_SymptomManager
void SetImmunityBoosted(bool boosted)
bool CheckAndExecuteStackSplit(FindInventoryLocationType flags, notnull EntityAI item, notnull EntityAI target)
override SoundOnVehicle PlaySound(string sound_name, float range, bool create_local=false)
override void OnCommandClimbStart()
void SwitchItemTypeDetach(EntityAI item, string slot)
void RadialQuickBarCombine(int slotClicked)
void SetBloodType(int blood_type)
void Message(string text, string style)
void RemoveCurrentEffectTrigger()
void MapNavigationItemInPossession(EntityAI item)
void SetBloodTypeVisible(bool show)
void SetMixedSoundState(eMixedSoundStates state)
PlayerStat< float > m_StatEnergy
void PlacingCancelServer()
bool m_MeleeDebug
melee stats
void IncreaseContaminatedAreaCount()
float GetImmunity()
returns player's immunity strength between 0..1
override bool IsLiftWeapon()
ItemBase CreateCopyOfItemInInventoryOrGroundEx(ItemBase src, bool markItemAsSplitResult=false)
void SendLiftWeaponSync(bool state)
Client-side only.
static ref array< string > m_BleedingSourcesLow
vector m_DirectionToCursor
void OnBleedingSourceAdded()
DamageDealtEffect GetDamageDealtEffect()
ref TInputActionMap m_InputActionMap
ref PlayerStats m_PlayerStats
void SendSoundEventEx(EPlayerSoundEventID id, int param=0)
void ResetPlayer(bool set_max)
override void OnCommandDeathStart()
EntityAI SpawnAI(string object_name, vector pos)
override void OnPlayerRecievedHit()
PluginPlayerStatus m_ModulePlayerStatus
void EndSurrenderRequest(SurrenderData data=null)
ends surrender, originally intended for surrender->restrained transitioning
ItemBase GetItemOnHead()
Returns item on player's head. For an example, a headtorch.
override bool CanReleaseFromHands(EntityAI handheld)
void OnInventoryMenuClose()
bool CanSpawnBreathVaporEffect()
void CloseMapEx(bool cancelled)
TransferValues GetTransferValues()
int m_SyncedModifiersPrev
override bool OnStoreLoad(ParamsReadContext ctx, int version)
ref array< int > m_Recipes
void UpdateBrokenLegs(int stateId)
override bool IsUnconscious()
override void SpawnDamageDealtEffect()
DebugMonitorValues GetDebugMonitorValues()
bool m_MapCloseRequestProcessed
ref EffectParticle m_FliesEff
ref array< int > m_ProcessRemoveGlassesEffects
ref Param3< float, float, bool > m_StaminaParam
ref ArrowManagerPlayer m_ArrowManager
PlayerStat< float > m_StatHeatComfort
ref PlayerAgentPool m_AgentPool
void QueueRemoveEffectWidget(array< int > effects)
bool m_LiquidTendencyDrain
EPulseType GetPulseType()
override bool PredictiveDropEntity(notnull EntityAI item)
void SetPersistentFlag(PersistentFlag bit, bool enable)
void SetStaminaState(eStaminaState state)
override void OnRollFinish()
int GetBreathVapourLevel()
bool IsSwapBetweenHandsAndGroundLargeItem(notnull EntityAI item1, notnull EntityAI item2, out EntityAI item_hands, out EntityAI item_ground)
ref UndergroundHandlerClient m_UndergroundHandler
vector GetLocalProjectionOrientation()
void SetStamina(int value, int range)
void SetActionEndInput(ActionBase action)
float GetStatBordersWater()
bool TakeEntityToTargetAttachmentImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
void dmgDebugPrint(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
override void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
override bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void OnPlayerReceiveFlashbangHitStart(bool visual)
override array< string > GetSuitableFinisherHitComponents()
returns list of suitable finisher hit components (defined on base entity/entity type)
string GetLastUAMessage()
UA Last Message.
eMixedSoundStates GetMixedSoundStates()
void SpawnShockEffect(float intensity_max)
void MessageFriendly(string text)
bool IsMapCallbackCancelInput()
override int GetQuickBarBonus()
ref Hologram m_HologramServer
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
BleedingSourcesManagerServer GetBleedingManagerServer()
override bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
void OnPlayerIsNowInsideEffectAreaEndServer()
void OnBleedingSourceRemovedEx(ItemBase item)
static Particle m_ContaminatedAroundPlayerTiny
override void EEKilled(Object killer)
void SetBloodyHands(bool show)
float GetStatBordersEnergy()
override bool CanReleaseAttachment(EntityAI attachment)
void RadialQuickBarSingleUse(int slotClicked)
override void EEItemOutOfHands(EntityAI item)
float GetBordersImmunity()
void QuickReloadWeapon(EntityAI weapon)
void PreloadDecayTexture()
void DecreaseHealingsCount()
VirtualHud GetVirtualHud()
EffectSound m_AmbientContamination
override void EEItemIntoHands(EntityAI item)
void MapNavigationItemNotInPossession(EntityAI item)
void UpdateShoulderProxyVisibility(EntityAI item, string slot_name)
int GetCraftingRecipeID()
override bool IsRestrained()
void OnSpawnedFromConsole()
void ShowUnconsciousScreen(bool show)
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
ref array< int > m_ProcessAddEffectWidgets
override void SwitchItemSelectionTexture(EntityAI item, string slot_name)
bool m_InsideEffectAreaPrev
bool ReadLiftWeaponRequest(int userDataType, ParamsReadContext ctx)
EStatLevels GetStatLevelEnergy()
bool m_AllowQuickRestrain
override bool IsFighting()
ref EffectRadial m_EffectRadial
ref Environment m_Environment
void SetNVGLowered(bool state)
void SetLocalProjectionOrientation(vector local_orientation)
bool IsPersistentFlag(PersistentFlag bit)
override void EOnFrame(IEntity other, float timeSlice)
int m_ContaminatedAreaCount
PlayerStat< float > GetStatEnergy()
void OnUnconsciousUpdate(float pDt, int last_command)
override void OnCommandLadderStart()
GameplayEffectWidgets_base m_EffectWidgets
effect widgets
void DecreaseEffectAreaCount()
override void RemoveAgent(int agent_id)
override vector GetDefaultHitPosition()
float m_OriginalSlidePoseAngle
override EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
PlayerStomach GetStomach()
ref PlayerStomach m_PlayerStomach
void OnQuickbarSetEntityRequest(ParamsReadContext ctx)
void IncreaseDiseaseCount()
void SetMapOpen(bool state)
CraftingManager GetCraftingManager()
void AdjustBandana(EntityAI item, string slot_name)
void SetLastMapInfo(float scale, vector pos)
override string GetDefaultHitComponent()
returns default hit component (fallback)
void SwitchItemTypeAttach(EntityAI item, string slot)
bool m_BrokenLegsJunctureReceived
override void CommandHandler(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
override WeaponManager GetWeaponManager()
ModifiersManager GetModifiersManager()
void IncreaseAntibioticsCount()
float GetStatLevelBorders(float stat_value, float critical, float low, float normal, float high, float max)
void RequestUnconsciousness(bool enable)
UndergroundHandlerClient GetUndergroundHandler()
string m_CachedPlayerName
override void EEItemDetached(EntityAI item, string slot_name)
void RemoveAction(typename actionName, out TInputActionMap InputActionMap)
bool ResetADSPlayerSync(int userDataType, ParamsReadContext ctx)
server only
void SetHairLevelToHide(int level, bool state, bool was_debug=false)
Dynamic hair hiding.
void SpawnDrowningBubbles()
void IncreaseHealingsCount()
void SetActionsRemoteTarget(out TInputActionMap InputActionMap)
override bool CanChangeStance(int previousStance, int newStance)
void SetSoundCategoryHash(int hash)
override bool CanDropEntity(notnull EntityAI item)
ref SoundObject m_SaySoundObject
EffectTrigger m_CurrentEffectTrigger
ItemBase m_CheckMeleeItem
void HandleBrokenLegsSync()
void OnVoiceEventPlayback(PlayerSoundEventBase voice_event, AbstractWave callback, float playback_time)
called every cmd handler tick during a playback of PlayerSoundEvent, m_ProcessPlaybackEvent needs to ...
void TogglePlacingLocal(ItemBase item=null)
ref ShockDealtEffect m_ShockDealtEffect
void OnJumpOutVehicleFinish(float carSpeed)
void SetUnderground(EUndergroundPresence presence)
void QueueRemoveGlassesEffect(int id)
void RequestTriggerEffect(EffectTrigger trigger, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, string soundset="", bool partDynaUpdate=false, int newBirthRate=0, bool forceUpdate=false)
bool m_MapClosingSyncSent
bool m_CanPlayBrokenLegSound
override void OnStanceChange(int previousStance, int newStance)
void PlacingCancelLocal()
void SetInWater(bool pState)
water contact (driven by Environment)
void SetLastFirePointRot(float last_fire_point_rot)
void OnVoiceEvent(PlayerSoundEventBase voice_event)
void SetEnableQuickBarEntityShortcut(EntityAI entity, bool value)
EntityAI CreateInInventory(string item_name, string cargo_type="", bool full_quantity=false)
void AntibioticsAttack(float value)
ActionManagerBase GetActionManager()
bool IsItemInInventory(EntityAI entity)
void AddActiveNV(int type)
int m_RefreshAnimStateIdx
void SetLoadedQuickBarItemBind(EntityAI entity, int index)
void CheckSendSoundEvent()
void SetLifeSpanStateVisible(int show_state)
override void OnJumpStart()
void RemoveQuickBarEntityShortcut(EntityAI entity)
vector SetDefaultHitPosition(string pSelection)
override bool IsHoldingBreath()
void UpdateTranslatedSelections(SelectionTranslation stt)
ref DebugMonitorValues m_DebugMonitorValues
bool m_InventorySoftLocked
void MessageImportant(string text)
void SetHitPPEEnabled(bool enabled)
bool m_CanDisplayHitEffectPPE
int GetStoreLoadVersion()
SoftSkillsManager GetSoftSkillsManager()
bool Consume(ItemBase source, float amount, EConsumeType consume_type)
Hologram GetHologramLocal()
ref Param2< int, int > m_UAParam
override void OnGameplayDataHandlerSync()
void OnQuickBarContinuousUseStart(int slotClicked)
float GetHealthRegenSpeed()
void SaveAreaPersistenceFlag(ParamsWriteContext ctx)
override bool PredictiveTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
void RemovePossibleCoverFaceForShave()
DEPRECATED!
void SetBloodyHandsEx(eBloodyHandsTypes type)
void UnsetMixedSoundState(eMixedSoundStates state)
void OnVehicleSeatDriverLeft()
void IncreaseEffectAreaCount()
void UpdateMaskBreathWidget(notnull MaskBase mask, bool is_start=false)
override void OnCommandMoveStart()
override void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
ref Hologram m_HologramLocal
int GetSingleAgentCount(int agent_id)
override bool PredictiveTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
void QueueAddEffectWidget(array< int > effects)
void SetQuickFishing(bool enable)
override bool CanPickupHeavyItem(notnull EntityAI item)
PluginPresenceNotifier m_PresenceNotifier
void DecreaseContaminatedAreaCount()
void OnPlayerReceiveFlashbangHitEnd()
EmoteManager GetEmoteManager()
void RunFightBlendTimer()
void SetFlagTendencyRaise(bool state)
DEPRECATED.
void CheckZeroSoundEvent()
ref EffectSound m_SoundFliesEffect
void HandleGlassesEffect()
void SendSoundEvent(EPlayerSoundEventID id)
float GetVisibilityCoef()
DayZPlayerCamera GetCurrentPlayerCamera()
EStatLevels GetStatLevelBlood()
override bool IsManagingArrows()
void OnPlayerIsNowInsideEffectAreaEndClient()
PlayerStat< float > m_StatTremor
EntityAI FindCargoByBaseType(string searched_item)
static set< int > GetFaceCoverageShaveValues()
returns a set of face covering values
vector m_DefaultHitPosition
override void OnCommandLadderFinish()
ref BleedingSourcesManagerServer m_BleedingManagerServer
override void JunctureDeleteItem(EntityAI item)
int GetBleedingSourceCount()
override void OnCommandMelee2Finish()
override void OnCommandSwimStart()
bool m_IsVehicleSeatDriver
void CloseInventoryMenu()
int m_BleedingSourceCount
bool CheckMeleeItemDamage(ItemBase item)
int FindQuickBarEntityIndex(EntityAI entity)
void SetToDelete(ParamsReadContext pCtx)
override bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
bool m_FlagRaisingTendency
bool IsStance(int stance, int stanceMask)
void SetModifiers(bool enable)
bool IsCurrentCameraAimedAtGround()
ref Timer m_UALastMessageTimer
override bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
void OnVehicleSwitchSeat(int seatIndex)
ref InventoryActionHandler m_InventoryActionHandler
EStatLevels GetImmunityLevel()
returns player's immunity level
ref TransferValues m_TrasferValues
EStatLevels GetStatLevelToxicity()
void ProcessHoldBreath(float dT)
void KillUndergroundHandler()
PlayerStat< float > GetStatTremor()
bool m_HasBloodTypeVisible
void AddAction(typename actionName)
void SpawnBreathVaporEffect()
ref Param1< float > m_DeathDarkeningParam
void SetMapClosingSyncSet(bool state)
void OnPlayerIsNowInsideEffectAreaBeginClient()
bool TogglePlacingServer(int userDataType, ParamsReadContext ctx)
override bool PredictiveTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
ref VirtualHud m_VirtualHud
ref Timer m_AnalyticsTimer
void OnVehicleSeatDriverEnter()
void UpdateCorpseStateVisual()
bool IsRestrainPrelocked()
override bool IsAlreadyInFallingCommand(int pCurrentCommandID)
ref TInputActionMap m_InputActionMapControled
override void OnCommandClimbFinish()
ref HiddenSelectionsData m_EmptyGloves
NotifiersManager GetNotifiersManager()
bool HasStaminaRemaining()
DEPRECATED.
void SetLastFirePoint(vector last_fire_point)
eBloodyHandsTypes HasBloodyHandsEx()
float m_LastPostFrameTickTime
float GetStatBordersToxicity()
void DecreaseDiseaseCount()
void SetActions(out TInputActionMap InputActionMap)
void SetActionsRemoteTarget()
bool GetLastMapInfo(out float scale, out vector pos)
void ProcessADDModifier()
void SetRestrained(bool is_restrained)
void SetLocalProjectionPosition(vector local_position)
ref Param2< float, float > m_UAProgressParam
ref SoftSkillsManager m_SoftSkillsManager
override string GetHitComponentForAI()
Melee helpers.
override vector GetCenter()
float GetWeightSpecialized(bool forceRecalc=false)
override void EEItemAttached(EntityAI item, string slot_name)
bool CheckAndExecuteStackSplitToInventoryLocation(InventoryLocation il, notnull EntityAI item)
BleedingSourcesManagerRemote GetBleedingManagerRemote()
PlayerStat< float > GetStatHeatComfort()
bool TakeEntityToTargetInventoryImpl(InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
override void OnCommandSwimFinish()
override void OnCommandVehicleStart()
bool IsSyncedModifierActive(eModifierSyncIDs modifier)
Checks whether modifier (which has syncing enabled) is currently active, works on both Client and Ser...
FlashbangEffect GetFlashbangEffect()
override bool PhysicalPredictiveDropItem(EntityAI entity, bool heavy_item_only=true)
ref ModifiersManager m_ModifiersManager
void CloseMap()
DEPRECATED; terminates map animation callback and re-enables controls.
ShockDealtEffect GetShockEffect()
void PlacingStartServer(ItemBase item)
ref array< EntityAI > m_ItemsToDelete
override void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
override void ProcessFeetDamageServer(int pUserInt)
override void InsertAgent(int agent, float count=1)
void SetQuickBarEntityShortcut(EntityAI entity, int index, bool force=false)
PlayerStat< float > m_StatToxicity
bool m_PlayerDisconnectProcessed
bool GetDrowningWaterLevelCheck()
int m_AnimCommandStarting
bool m_IsRestrainPrelocked
int m_ForceInjuryAnimMask
ref EffectSound m_BrokenLegSound
void SetPlayerDisconnected(bool state)
PlayerStat< float > GetStatWater()
override void OnCommandVehicleFinish()
PlayerStat< int > GetStatBloodType()
void SetLastUAMessage(string pMsg)
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
void SetShakesForced(int value)
bool CanManipulateInventory()
float GetLastFirePointRot()
void SpawnDamageDealtEffect2(Param param1=null, Param param2=null)
int m_DebugMonitorEnabled
EntityAI GetQuickBarEntity(int index)
StaminaHandler GetStaminaHandler()
override bool CanReceiveItemIntoCargo(EntityAI item)
ref SoundObjectBuilder m_SaySoundBuilder
ref NotifiersManager m_NotifiersManager
override bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
override void EOnPostFrame(IEntity other, int extra)
ref StanceIndicator m_StanceIndicator
float ConvertNonlethalDamage(float damage, DamageType damageType)
ItemBase GetItemInHands()
void OnUnconsciousStop(int pCurrentCommandID)
int GetLastFirePointIndex()
void SetCheckMeleeItem(ItemBase item=null)
void OnStoreSaveLifespan(ParamsWriteContext ctx)
void SetDecayEffects(int effect=-1)
PluginAdminLog m_AdminLog
bool CanRedirectToWeaponManager(notnull EntityAI item, out bool isActionPossible)
bool HasCoveredFaceForShave()
void DealShock(float dmg)
void SetPulseType(EPulseType pulse_type)
void SetDrowning(bool enable)
void SetRestrainPrelocked(bool restrain_prelock)
PlayerStats GetPlayerStats()
void OnCameraChanged(DayZPlayerCameraBase new_camera)
override void OnCommandFallStart()
ref SoundParams m_SaySoundParams
PlayerSoundEventHandler GetPlayerSoundEventHandler()
EntityAI GetMagazineToReload(EntityAI weapon)
void QueueAddGlassesEffect(int id)
override bool IsInventoryVisible()
void CalculateVisibilityForAI()
void SetBloodyHandsPenalty()
RandomGeneratorSyncManager GetRandomGeneratorSyncManager()
void OnScheduledTick(float deltaTime)
void AddAction(typename actionName, out TInputActionMap InputActionMap)
void SetLastFirePointIndex(int last_fire_point_index)
PluginRecipesManager m_ModuleRecipesManager
vector m_CraftingInitialPos
PlayerStat< int > GetStatWet()
override void HideClothing(ItemOptics optic, bool state)
state 'true' == hide
vector GetLocalProjectionPosition()
ItemBase CreateCopyOfItemInInventoryOrGround(ItemBase src)
ref array< int > m_ActiveNVTypes
Head_Default m_CharactersHead
override bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
EStatLevels GetStatLevelWater()
PluginLifespan m_ModuleLifespan
PlayerStat< float > GetStatStamina()
override void AfterStoreLoad()
void OnQuickBarContinuousUseEnd(int slotClicked)
bool DropItem(ItemBase item)
Spawn item on server side.
void ProcessHandDamage(float delta_time, HumanMovementState pState)
float GetStatBordersHealth()
float GetTotalAgentCount()
override bool IsInventorySoftLocked()
void PlacingStartLocal(ItemBase item)
void ForceUpdateInjuredState()
update injured state immediately
void OnPlayerIsNowInsideEffectAreaBeginServer()
bool IsPlayerDisconnected()
ref WeaponManager m_WeaponManager
bool GetFlagTendencyRaise()
DEPRECATED.
override void RequestSoundEventEx(EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
void OnQuickBarSingleUse(int slotClicked)
void MovingShock(float legHealth, float highShock, float midShock, float lowShock)
void BrokenLegWalkShock()
void OnBleedingSourceRemoved()
void OnInventoryMenuOpen()
ref StaminaHandler m_StaminaHandler
override void OnCommandMelee2Start()
ref DamageDealtEffect m_DamageDealtEffect
override void ClearInventory()
PlayerStat< float > m_StatWater
bool m_ContaminatedAreaEffectEnabled
override void RPC(int rpc_type, array< ref Param > params, bool guaranteed, PlayerIdentity recipient=NULL)
void ResetConstructionActionData()
ref ConstructionActionData m_ConstructionActionData
MapNavigationBehaviour GetMapNavigationBehaviour()
ItemBase CreateCopyOfItemInInventory(ItemBase src)
RandomGeneratorSyncManager m_RGSManager
override bool IsIgnoredByConstruction()
int m_HasBloodyHandsVisible
void DecreaseAntibioticsCount()
static Particle m_ContaminatedAroundPlayer
ref Timer m_DeathCheckTimer
ref Param1< float > m_UnconParam
override void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
array< int > GetNVTypesArray()
string m_SaySoundLastSetName
ConstructionActionData GetConstructionActionData()
EntityAI SpawnEntityOnGroundOnCursorDir(string object_name, float distance)
override void TakeEntityToHandsImpl(InventoryMode mode, EntityAI item)
static ref TStringArray m_QBarItems
override bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
ref HeatComfortAnimHandler m_HCAnimHandler
override void RemoveAllAgents()
override bool CanSaveItemInHands(EntityAI item_in_hands)
int GetLastShavedSeconds()
void SpreadAgentsEx(float distance=3, float chance=0.25)
chance between [0..1] , distance in meters
void SetLiftWeapon(int pJunctureID, ParamsReadContext ctx)
bool HandleRemoteItemManipulation(int userDataType, ParamsReadContext ctx)
void DamageAllLegs(float inputDmg)
void RequestResetADSSync()
void RemoveActiveNV(int type)
bool GetMapClosingSyncSent()
void BrokenLegForceProne(bool forceOverride=false)
void UpdateQuickBarExtraSlots()
override bool CanBeTargetedByAI(EntityAI ai)
override bool CanPlaceItem(EntityAI item)
void DropAllItems()
Drops all clothes/wearables this character is carrying on themselves.
override bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
void SpawnFlashbangEffect(PlayerBase player, bool visual)
PluginConfigEmotesProfile m_ConfigEmotesProfile
void HideHairSelections(ItemBase item, bool state)
ref FlashbangEffect m_FlashbangEffect
override void CheckAnimationOverrides()
bool OnStoreLoadLifespan(ParamsReadContext ctx, int version)
void SetVisibilityCoef(float pVisibility)
EStatLevels GetStatLevelHealth()
float GetStatBordersBlood()
bool TakeEntityAsAttachmentImpl(InventoryMode mode, notnull EntityAI item)
override void OnParticleEvent(string pEventType, string pUserString, int pUserInt)
void OnContaminatedAreaExitServer()
void PlacingCompleteLocal()
EUndergroundPresence m_UndergroundPresence
override void SetInventorySoftLock(bool status)
'soft lock' meaning inventory screen cannot be displayed, but mechanically, inventory operations are ...
bool TakeEntityToTargetCargoImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
AbstractWave SaySoundSet(string name)
void PlacingCompleteServer()
override bool IsInFBEmoteState()
void SetRestrainStarted(bool restrain_started)
QuickBarBase m_QuickBarBase
void ProcessDrowning(float dT)
override void OnRollStart(bool isToTheRight)
eBrokenLegs GetBrokenLegs()
void ShockRefill(float pDt)
functionality moved to ShockMdfr::OnTick
void TryHideItemInHands(bool hide, bool force=false)
tries to hide item in player's hands, some exceptions for various movement states
ref Param1< string > m_UAParamMessage
bool TakeEntityToCargoImpl(InventoryMode mode, notnull EntityAI item)
override void CheckLiftWeapon()
void SetQuickRestrain(bool enable)
void AddPlayerLoad(float addedload)
void RequestHandAnimationStateRefresh()
ActionManagerBase m_ActionManager
override void OnJumpEnd(int pLandType=0)
override void OnCommandFallFinish()
ref ShockHandler m_ShockHandler
int m_LocalRefreshAnimStateIdx
bool IsMapCallbackEndInput()
float GetFeetDamageMoveModifier()
bool HasBloodTypeVisible()
void OnHoldBreathExhausted()
ref TInputActionMap m_InputActionMapAsTarget
override bool PredictiveForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
PlayerStat< float > GetStatHeatBuffer()
void SetBleedingBits(int bits)
void ContaminatedParticleAdjustment()
void LockHandsUntilItemHeld()
void ResetActionEndInput()
void SetLiquidTendencyDrain(bool state)
void UpdateMovementInertia()
Update movement inertia based on stamina available.
override bool CanReceiveItemIntoHands(EntityAI item_to_hands)
override bool CanConsumeStamina(EStaminaConsumers consumer)
ref InjuryAnimationHandler m_InjuryHandler
void UpdatePlayerMeasures()
void OnContaminatedAreaEnterServer()
void ToggleHeatBufferVisibility(bool show)
void SetLastShavedSeconds(int last_shaved_seconds)
override void AddItemToDelete(EntityAI item)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override bool CanClimb(int climbType, SHumanCommandClimbResult climbRes)
ref PlayerSoundManagerClient m_PlayerSoundManagerClient
override void EEHitByRemote(int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
ref EmoteManager m_EmoteManager
void SetContaminatedEffect(bool enable, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, bool partDynaUpdate=false, int newBirthRate=0)
override ArrowManagerBase GetArrowManager()
void GiveShock(float shock)
override void SetProcessUIWarning(bool state)
bool TakeToDstImpl(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
void SetBrokenLegs(int stateId)
override void SimulateDeath(bool state)
int GetNoisePresenceInAI()
Return actual noise presence of player.
void CheckHairClippingOnCharacterLoad()
helper method for re-checking hairhiding on character load
void SetBloodyHandsBase(int type)
void SetContaminatedEffectEx(bool enable, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, string soundset="", bool partDynaUpdate=false, int newBirthRate=0)
override void EEDelete(EntityAI parent)
bool IsFacingTarget(Object target)
override void SetDeathDarknessLevel(float duration, float tick_time)
void StaminaHUDNotifier(bool show)
vector GetLastFirePoint()
static ref array< string > m_BleedingSourcesUp
Hologram GetHologramServer()
override void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
void RemoveAction(typename actionName)
override bool CanReleaseCargo(EntityAI cargo)
EStatLevels GetStatLevel(float stat_value, float critical, float low, float normal, float high)
void MessageStatus(string text)
void PlayAttachmentDropSound()
PlayerStat< float > GetStatDiet()
WorldLighting GetWorldLighting()
Static component of PPE manager, used to hold the instance.
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Legacy way of using particles in the game.
void SetParameter(int emitter, int parameter, float value)
Set the value of a parameter of an emitor in the particle.
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
static const int BREATH_VAPOUR_MEDIUM
static const int BREATH_VAPOUR_LIGHT
static const int DROWNING_BUBBLES
static const int CONTAMINATED_AREA_GAS_AROUND
static const int CONTAMINATED_AREA_GAS_TINY
static const int BREATH_VAPOUR_HEAVY
override void OnGameplayDataHandlerSync()
static const float HEALTH_REGEN_MAX
static const float SL_HEALTH_CRITICAL
static const int LAST_UA_MSG_LIFETIME
static const float BROKEN_LEGS_HIGH_HEALTH_THRESHOLD
static const float SL_WATER_HIGH
static const float SHOES_MOVEMENT_DAMAGE_PER_STEP
static const float IMMUNITY_THRESHOLD_LEVEL_CRITICAL
static const int CORPSE_STATE_MEDIUM
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
static const float SL_ENERGY_HIGH
static const float BROKEN_LEGS_SHOCK_SWIM
static const float BROKEN_LEGS_INITIAL_SHOCK
static const float FULL_SPRINT_DELAY_FROM_CROUCH
[seconds]
static const float SL_ENERGY_LOW
static const float THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL
static const float SL_BLOOD_LOW
static const float BROKEN_LEGS_ROLL_SHOCK
static const int CORPSE_STATE_DECAYED
static const float BROKEN_LEGS_LOW_SHOCK_WALK
static const float SL_WATER_NORMAL
static const float SL_BLOOD_CRITICAL
static const float FULL_SPRINT_DELAY_FROM_PRONE
[seconds]
static const float SL_ENERGY_MAX
static const float SL_HEALTH_LOW
static const float GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC
static const float UNCONSCIOUS_IN_WATER_TIME_LIMIT_TO_DEATH
static const float SL_HEALTH_NORMAL
static const float BROKEN_LEGS_STAND_SHOCK
static const float SL_WATER_LOW
static const float BROKEN_LEGS_MID_SHOCK_WALK
static const float BROKEN_CROUCH_MODIFIER
static const float SL_ENERGY_CRITICAL
static const float HEALTH_REGEN_MIN
static const int CHECK_EVERY_N_STEP
static const int DROWNING_BUBBLE_FREQUENCY_MIN
static const float IMMUNITY_THRESHOLD_LEVEL_LOW
static const float CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC
static const float IMMUNITY_THRESHOLD_LEVEL_HIGH
static const float DROWNING_DEFAULT_THRESHOLD
static const int DROWNING_BUBBLE_FREQUENCY_MAX
static const float BAREFOOT_MOVEMENT_BLEED_MODIFIER
[seconds]
static const float SL_BLOOD_NORMAL
static const float MELEE2_MOVEMENT_BLEND_DELAY
static const float SL_BLOOD_HIGH
static const float DROWNING_UNCONSCIOUS_THRESHOLD
static const int BLOOD_THRESHOLD_FATAL
static const float SL_ENERGY_NORMAL
static const float SL_WATER_CRITICAL
static const float IMMUNITY_THRESHOLD_LEVEL_NORMAL
static const float BROKEN_LEGS_LOW_HEALTH_THRESHOLD
static const float DROWNING_SWIMMING_THRESHOLD
static const float CAMERA_THRESHOLD_PITCH
static const float SL_WATER_MAX
static const float SL_HEALTH_HIGH
static const float BROKEN_LEGS_HIGH_SHOCK_WALK
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
static int PlayInWorld(notnull Effect eff, vector pos)
Play an Effect.
static int PlayOnObject(notnull Effect eff, Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_relative_to_world=false)
Play an Effect.
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static bool IsEffectExist(int effect_id)
Checks whether an Effect ID is registered in SEffectManager.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
called from PlayerBase - syncs stamina values on server with client AND sets the value to match on se...
void SetStamina(float stamina_value)
void Update(float deltaT, int pCurrentCommandID)
static float GetParamFloat(string surface_name, string param_name)
static void SendEntityKilled(EntityAI victim, EntityAI killer, EntityAI source, bool is_headshot)
Base native class for all motorized wheeled vehicles.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
const int SIMPLE_SELECTION_SHOULDER_RIFLE
const int SIMPLE_SELECTION_SHOULDER_MELEE
override string GetDebugName()
void SDayZPlayerHeadingModel()
cannot be created from script
void ForceStandUpForHeavyItemsSwap(notnull EntityAI item1, notnull EntityAI item2)
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
proto native DayZPlayerCamera GetCurrentCamera()
-------------— camera additional functions ----------------------—
proto native DayZPlayerInstanceType GetInstanceType()
DayZPlayerConstants
defined in C++
proto native void SendSyncJuncture(int pJunctureID, ParamsWriteContext ctx)
-------------— sync stuff ----------------------—
class SDayZPlayerAimingModel SIMPLE_SELECTION_MELEE_RIFLE
float GetCurrentWaterLevel()
const int SIMPLE_SELECTION_MELEE_MELEE
string GetDefaultHitPositionComponent()
bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
proto native float GetMax()
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
proto native CGame GetGame()
const int AGT_UACTION_CONSUME
const int AGT_AIRBOURNE_BIOLOGICAL
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
proto native void SetPosition(vector position)
Set the world position of the Effect.
const int INVENTORY_ENTITY_DROP_OVERLAP_DEPTH
const float DZPLAYER_CAMERA_FOV_IRONSIGHTS
const float REFRESHER_RADIUS
const int DEFAULT_CHARACTER_MENU_ID
const float NL_DAMAGE_FIREARM_CONVERSION_PLAYERS
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
EntityEvent
Entity events for event-mask, or throwing event from code.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto int AbsInt(int i)
Returns absolute value.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Sin(float angle)
Returns sinus of angle in radians.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static const float RAD2DEG
static proto float AbsFloat(float f)
Returns absolute value.
const int SAT_DEBUG_ACTION
proto void GetHourMinuteSecond(out int hour, out int minute, out int second)
Returns world time.
proto native bool IsModifierActive()
is modifier active
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native HumanCommandVehicle StartCommand_Vehicle(Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious=false)
--— VEHICLE --—
proto native void PhysicsGetVelocity(out vector pVelocity)
outs pVelocity - linear velocity of PHYSICS CONTROLLER
HumanMoveCommandID
do not process rotations !
proto native HumanCommandMove GetCommand_Move()
proto native HumanCommandActionCallback GetCommand_Action()
is human is in command action - returns its callback, if current command is action
proto native HumanCommandMelee GetCommand_Melee()
proto native HumanCommandMove StartCommand_Move()
--— MOVE --—
proto native bool PhysicsIsFalling(bool pValidate)
returns true if physics controller is falling
proto native HumanCommandWeapons GetCommandModifier_Weapons()
returns interface for handling weapons
proto native HumanCommandVehicle GetCommand_Vehicle()
proto native bool IsInWater()
proto native HumanCommandUnconscious GetCommand_Unconscious()
proto native HumanCommandLadder GetCommand_Ladder()
enum HumanMoveCommandID GetTransformWS(out vector pTm[4])
gets human transform in World Space
proto native HumanCommandUnconscious StartCommand_Unconscious(float pType)
starts command - unconscious
class HumanCommandMelee2 HumanCommandFall()
proto native HumanInputController GetInputController()
returns human input controller
proto native HumanItemAccessor GetItemAccessor()
proto native HumanCommandAdditives GetCommandModifier_Additives()
default (always-on modifiers)
class HumanCommandWeapons HumanCommandAdditives()
class HumanItemBehaviorCfg OnItemInHandsChanged(bool pInstant=false)
signalization from script to engine that item in hands changed