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;
110 float m_UnconsciousVignetteTarget = 2;
111 float m_CameraSwayModifier = 0.2;
128 float m_UnconsciousEndTime = 0;
142 const string SOUND_BREAK_LEG =
"broken_leg_SoundSet";
144 static bool DEBUG_INVENTORY_ACCESS =
false;
147 float m_UnconRefillModifier = 1;
153 const string CONTAMINATED_AREA_AMBIENT =
"ContaminatedArea_SoundSet";
159 #ifdef DIAG_DEVELOPER
160 int m_IsInsideTrigger;
161 bool m_CanBeTargetedDebug;
163 bool m_PresetSpawned;
164 ref CameraToolsMenuClient m_CameraToolsMenuClient;
185 vector m_LocalProjectionPosition =
"0 0 0 ";
186 vector m_LocalProjectionOrientation =
"0 0 0 ";
190 int m_AddModifier = -1;
215 bool m_IsFighting =
false;
226 protected float m_LastMapScale = -1.0;
264 protected PlayerStat<int> m_StatWet
265 protected PlayerStat<int> m_StatBloodType
266 protected PlayerStat<float> m_StatDiet
267 protected PlayerStat<float> m_StatStamina
268 protected PlayerStat<float> m_StatSpecialty
269 protected PlayerStat<float> m_StatHeatBuffer
288 m_StoreLoadVersion = 0;
289 m_IsCraftingReady =
false;
291 m_LastShavedSeconds = 0;
293 m_HasBloodTypeVisible =
false;
295 m_LifespanLevelLocal = -1;
297 m_CorpseStateLocal = 0;
298 m_HasBloodyHandsVisible = 0;
299 m_PlayerLoaded =
false;
300 m_PlayerSelected =
false;
301 m_ProcessUIWarning =
false;
302 m_FlagRaisingTendency =
true;
303 m_LiquidTendencyDrain =
false;
304 m_UAParamMessage =
new Param1<string>(
"");
305 m_UnconParam =
new Param1<float>(0);
306 m_DeathDarkeningParam =
new Param1<float>(0);
312 m_VisibilityCoef = 1.0;
315 m_ActionQBControl =
false;
316 m_QuickBarHold =
false;
317 m_HideHairAnimated =
true;
318 m_WorkingNVGHeadset =
false;
319 m_LoweredNVGHeadset =
false;
320 m_AreHandsLocked =
false;
324 m_CanDisplayHitEffectPPE =
true;
326 #ifdef DIAG_DEVELOPER
327 m_CanBeTargetedDebug =
true;
345 m_BleedingManagerServer =
new BleedingSourcesManagerServer(
this);
348 m_PlayerSoundManagerServer =
new PlayerSoundManagerServer(
this);
355 m_ModuleRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
357 m_TrasferValues =
new TransferValues(
this);
365 if (!
GetGame().IsDedicatedServer())
367 m_MeleeDebug =
false;
368 m_UALastMessage =
"";
369 m_UALastMessageTimer =
new Timer;
371 m_BleedingManagerRemote =
new BleedingSourcesManagerRemote(
this);
378 m_ProcessRemoveEffectWidgets =
new array<int>;
381 m_ProcessRemoveGlassesEffects =
new array<int>;
384 m_ActionManager = NULL;
387 m_ConfigEmotesProfile = PluginConfigEmotesProfile.Cast(
GetPlugin(PluginConfigEmotesProfile));
391 PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(
GetPlugin(PluginConfigDebugProfileFixed));
393 PluginDeveloper m_Developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
400 if (player && default_preset !=
"")
403 m_ConfigDebugProfileFixed.GetPresetItems(default_preset, preset_array);
405 bool is_preset_fixed =
true;
406 if (preset_array.Count() == 0)
409 is_preset_fixed =
false;
412 if (preset_array.Count() > 0)
414 m_Developer.ClearInventory(player);
416 for (
int i = 0; i < preset_array.Count(); i++)
422 health = m_ConfigDebugProfileFixed.GetItemHealth(default_preset, i);
423 quantity = m_ConfigDebugProfileFixed.GetItemQuantity(default_preset, i);
430 m_Developer.SpawnEntityInInventory(player, preset_array.Get(i), health, quantity);
443 m_BleedingSourcesLow.Insert(
"RightToeBase");
444 m_BleedingSourcesLow.Insert(
"RightFoot");
445 m_BleedingSourcesLow.Insert(
"LeftToeBase");
446 m_BleedingSourcesLow.Insert(
"LeftFoot");
447 m_BleedingSourcesLow.Insert(
"RightUpLegRoll");
448 m_BleedingSourcesLow.Insert(
"RightUpLeg");
449 m_BleedingSourcesLow.Insert(
"RightLegRoll");
450 m_BleedingSourcesLow.Insert(
"RightLeg");
451 m_BleedingSourcesLow.Insert(
"LeftUpLegRoll");
452 m_BleedingSourcesLow.Insert(
"LeftUpLeg");
453 m_BleedingSourcesLow.Insert(
"LeftLegRoll");
454 m_BleedingSourcesLow.Insert(
"LeftLeg");
457 m_BleedingSourcesUp.Insert(
"RightForeArmRoll");
458 m_BleedingSourcesUp.Insert(
"LeftForeArmRoll");
459 m_BleedingSourcesUp.Insert(
"RightForeArm");
460 m_BleedingSourcesUp.Insert(
"RightArmRoll");
461 m_BleedingSourcesUp.Insert(
"RightArm");
462 m_BleedingSourcesUp.Insert(
"RightShoulder");
463 m_BleedingSourcesUp.Insert(
"LeftForeArm");
464 m_BleedingSourcesUp.Insert(
"LeftArmRoll");
465 m_BleedingSourcesUp.Insert(
"LeftArm");
466 m_BleedingSourcesUp.Insert(
"LeftShoulder");
467 m_BleedingSourcesUp.Insert(
"Spine3");
468 m_BleedingSourcesUp.Insert(
"Spine2");
469 m_BleedingSourcesUp.Insert(
"Spine1");
470 m_BleedingSourcesUp.Insert(
"Spine");
471 m_BleedingSourcesUp.Insert(
"Pelvis");
472 m_BleedingSourcesUp.Insert(
"Neck");
474 RegisterNetSyncVariableInt(
"m_LifeSpanState", LifeSpanState.BEARD_NONE, LifeSpanState.COUNT);
475 RegisterNetSyncVariableInt(
"m_BloodType", 0, 128);
476 RegisterNetSyncVariableInt(
"m_ShockSimplified",0, SIMPLIFIED_SHOCK_CAP);
478 RegisterNetSyncVariableInt(
"m_SoundEventParam", 0, ((EPlayerSoundEventParam.ENUM_COUNT - 1) * 2) - 1);
479 RegisterNetSyncVariableInt(
"m_StaminaState",0, eStaminaState.COUNT - 1);
480 RegisterNetSyncVariableInt(
"m_BleedingBits");
481 RegisterNetSyncVariableInt(
"m_Shakes", 0, SHAKE_LEVEL_MAX);
484 RegisterNetSyncVariableInt(
"m_MixedSoundStates", 0,
eMixedSoundStates.COUNT - 1);
486 RegisterNetSyncVariableInt(
"m_RefreshAnimStateIdx",0,3);
487 RegisterNetSyncVariableInt(
"m_BrokenLegState", -
eBrokenLegs.BROKEN_LEGS_SPLINT,
eBrokenLegs.BROKEN_LEGS_SPLINT);
488 RegisterNetSyncVariableInt(
"m_SyncedModifiers", 0, ((
eModifierSyncIDs.LAST_INDEX - 1) * 2) - 1);
489 RegisterNetSyncVariableInt(
"m_HasBloodyHandsVisible", 0,
eBloodyHandsTypes.LAST_INDEX - 1);
490 RegisterNetSyncVariableInt(
"m_ActionSoundCategoryHash");
492 RegisterNetSyncVariableBool(
"m_IsUnconscious");
493 RegisterNetSyncVariableBool(
"m_IsRestrained");
494 RegisterNetSyncVariableBool(
"m_IsInWater");
496 RegisterNetSyncVariableBool(
"m_HasBloodTypeVisible");
498 RegisterNetSyncVariableBool(
"m_IsRestrainStarted");
499 RegisterNetSyncVariableBool(
"m_IsRestrainPrelocked");
500 RegisterNetSyncVariableBool(
"m_HasHeatBuffer");
502 RegisterNetSyncVariableFloat(
"m_CurrentShock");
504 m_OriginalSlidePoseAngle = GetSlidePoseAngle();
509 m_DecayedTexture = ConfigGetString(
"decayedTexture");
516 m_AntibioticsActive++;
521 m_AntibioticsActive--;
522 if (m_AntibioticsActive < 0)
524 m_AntibioticsActive = 0;
525 Error(
"DecreaseAntibioticsCount called more times than IncreaseAntibioticsCount (should be equal) - check your code, forcing clamp to 0");
531 return (m_AntibioticsActive > 0);
536 m_ActionSoundCategoryHash = hash;
546 EntityAI item_EAI = this.GetInventory().FindAttachment(slot_id);
549 if (item_EAI && !item_IB)
551 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() +
"!";
562 return GetItemOnSlot(
"Headgear");
575 if (GetInventory().HasInventoryReservation(item, null))
582 if (GetHumanInventory().GetEntityInHands() == item)
595 return m_BreathVapour;
601 int bit_mask_remove = ~state;
605 if (new_states != m_MixedSoundStates)
607 m_MixedSoundStates = new_states;
617 if (new_states != m_MixedSoundStates)
619 m_MixedSoundStates = new_states;
631 return (m_BleedingBits != 0);
636 if (m_BleedingBits != bits)
638 if (m_BleedingBits == 0)
647 m_BleedingBits = bits;
653 return m_BleedingBits;
679 return m_HealingsCount;
684 return m_DiseaseCount;
695 m_PulseType = pulse_type;
700 m_ProcessAddEffectWidgets.InsertArray(effects);
705 m_ProcessRemoveEffectWidgets.InsertArray(effects);
710 m_ProcessAddGlassesEffects.Insert(
id);
715 m_ProcessRemoveGlassesEffects.Insert(
id);
720 return m_DamageDealtEffect;
725 if (m_DamageDealtEffect)
727 delete m_DamageDealtEffect;
730 if (m_CanDisplayHitEffectPPE)
740 delete m_EffectRadial;
748 return m_FlashbangEffect;
753 if (m_FlashbangEffect)
755 m_FlashbangEffect.Stop();
756 delete m_FlashbangEffect;
764 return m_ShockDealtEffect;
769 if (m_ShockDealtEffect)
771 delete m_ShockDealtEffect;
786 if (GetBleedingManagerServer())
787 delete GetBleedingManagerServer();
789 if (GetModifiersManager())
790 GetModifiersManager().DeactivateAllModifiers();
800 if (!
GetGame().IsDedicatedServer())
802 GetSymptomManager().OnPlayerKilled();
804 if (GetEconomyProfile() && !m_CorpseProcessing && m_CorpseState == 0 &&
GetGame().GetMission().InsertCorpse(
this))
806 m_CorpseProcessing =
true;
818 super.EEKilled(killer);
823 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
830 if (damageResult != null && damageResult.
GetDamage(dmgZone,
"Shock") > 0)
834 if (!IsUnconscious())
836 if (
GetGame().ConfigIsExisting(
"cfgAmmo " + ammo +
" unconRefillModifier"))
838 m_UnconRefillModifier =
GetGame().
ConfigGetInt(
"cfgAmmo " + ammo +
" unconRefillModifier");
842 m_UnconRefillModifier = 1;
848 if (damageType == DT_EXPLOSION && ammo ==
"FlashGrenade_Ammo")
855 if (damageResult != null && GetBleedingManagerServer())
857 float dmg = damageResult.
GetDamage(dmgZone,
"Blood");
858 GetBleedingManagerServer().ProcessHit(dmg, source,
component, dmgZone, ammo, modelPos);
862 #ifdef DIAG_DEVELOPER
864 Print(
"EEHitBy() | " + GetDisplayName() +
" hit by " + source.GetDisplayName() +
" to " + dmgZone);
866 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
867 if (plugin_remote_server)
869 plugin_remote_server.OnDamageEvent(
this, damageResult);
873 if (
GetGame().IsDebugMonitor())
874 m_DebugMonitorValues.SetLastDamage(source.GetDisplayName());
877 m_ActionManager.Interrupt();
882 AddHealth(
"",
"Health",-ConvertNonlethalDamage(damageResult.
GetDamage(dmgZone,
"Shock")));
883 if (dmgZone !=
"Head")
884 AddHealth(dmgZone,
"Health",-damageResult.
GetDamage(dmgZone,
"Shock"));
889 if (GetHealth(
"RightLeg",
"Health") <= 1 || GetHealth(
"LeftLeg",
"Health") <= 1 || GetHealth(
"RightFoot",
"Health") <= 1 || GetHealth(
"LeftFoot",
"Health") <= 1)
893 GetModifiersManager().DeactivateModifier(
eModifiers.MDF_BROKEN_LEGS);
895 GetModifiersManager().ActivateModifier(
eModifiers.MDF_BROKEN_LEGS);
900 m_ShockHandler.CheckValue(
true);
908 super.EEHitByRemote(damageType, source,
component, dmgZone, ammo, modelPos);
910 if (m_MeleeFightLogic.IsInBlock())
920 StopSoundSet(m_SoundFliesEffect);
929 return converted_dmg;
938 if (m_MeleeFightLogic.IsInBlock())
945 SpawnDamageDealtEffect();
956 SpawnFlashbangEffect(
this, visual);
979 return m_DefaultHitPosition;
990 return GetSelectionPositionMS(pSelection);
996 m_FaceCoveredForShaveLayers++;
1001 m_FaceCoveredForShaveLayers--;
1006 super.EEItemAttached(item, slot_name);
1009 SwitchItemSelectionTexture(item, slot_name);
1010 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1011 item.SwitchItemSelectionTextureEx(EItemManipulationContext.ATTACHING, p);
1012 m_QuickBarBase.updateSlotsCount();
1013 CalculateVisibilityForAI();
1014 UpdateShoulderProxyVisibility(item, slot_name);
1016 if (itemIB.IsCoverFaceForShave(slot_name))
1018 AddPossibleCoverFaceForShave();
1020 HideHairSelections(itemIB,
true);
1026 if (!
GetGame().IsDedicatedServer())
1028 if (clothing.GetEffectWidgetTypes())
1030 QueueAddEffectWidget(clothing.GetEffectWidgetTypes());
1033 if (clothing.GetGlassesEffectID() > -1)
1035 QueueAddGlassesEffect(clothing.GetGlassesEffectID());
1039 UpdateCorpseStateVisual();
1041 else if (
GetGame().IsServer())
1043 if (clothing.IsGasMask())
1045 GetModifiersManager().ActivateModifier(
eModifiers.MDF_MASK);
1049 clothing.UpdateNVGStatus(
this,
true);
1052 AdjustBandana(item,slot_name);
1057 super.EEItemDetached(item, slot_name);
1059 SwitchItemSelectionTexture(item, slot_name);
1060 item.SwitchItemSelectionTextureEx(EItemManipulationContext.DETACHING);
1061 m_QuickBarBase.updateSlotsCount();
1062 CalculateVisibilityForAI();
1064 if (item_base.IsCoverFaceForShave(slot_name))
1066 RemovePossibleCoverFaceForShave();
1068 HideHairSelections(item_base,
false);
1074 if (!
GetGame().IsDedicatedServer())
1076 if (clothing.GetEffectWidgetTypes())
1078 QueueRemoveEffectWidget(clothing.GetEffectWidgetTypes());
1081 if (clothing.GetGlassesEffectID() > -1)
1083 QueueRemoveGlassesEffect(clothing.GetGlassesEffectID());
1089 if (clothing.IsGasMask())
1091 GetModifiersManager().DeactivateModifier(
eModifiers.MDF_MASK);
1095 clothing.UpdateNVGStatus(
this);
1097 UpdateCorpseStateVisual();
1129 string slot = slot_name;
1131 boo = item.IsWeapon();
1133 if (slot ==
"Melee")
1138 else if (slot ==
"Shoulder")
1147 super.SwitchItemSelectionTexture(item,slot_name);
1150 EntityAI armband = FindAttachmentBySlotName(
"Armband");
1151 if (slot_name ==
"Body" && armband)
1153 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1154 armband.SwitchItemSelectionTextureEx(EItemManipulationContext.UPDATE,p);
1164 for (
int i = 0; i < itemsArray.Count(); i++)
1167 if (item && !item.IsInherited(SurvivorBase)) GetInventory().LocalDestroyEntity(item);
1173 return m_CanDisplayHitEffectPPE;
1178 m_CanDisplayHitEffectPPE = enabled;
1183 if (ConfigGetBool(
"woman") != 1)
1192 int voice_type = ConfigGetInt(
"voiceType");
1194 if (voice_type == 0)
1204 return m_PlayerSoundManagerServer;
1210 if (!m_UndergroundHandler && IsAlive())
1215 return m_UndergroundHandler;
1220 m_UndergroundHandler = null;
1229 AddAction(ActionLockedDoors, InputActionMap);
1298 if (IsControlledPlayer())
1306 SetActionsRemoteTarget();
1314 SetActionsRemoteTarget(m_InputActionMapAsTarget);
1329 if (IsControlledPlayer())
1330 actions = m_InputActionMapControled.Get(action_input_type);
1332 actions = m_InputActionMapAsTarget.Get(action_input_type);
1339 if (IsControlledPlayer())
1340 actions.InsertAll(m_InputActionMapControled.Get(action_input_type));
1342 actions.InsertAll(m_InputActionMapAsTarget.Get(action_input_type));
1344 actions.InsertAll(bcActions);
1352 typename ai = action.GetInputType();
1364 InputActionMap.Insert(ai, action_array);
1366 action_array.Insert(action);
1377 typename ai = action.GetInputType();
1382 for (
int i = 0; i < action_array.Count(); i++)
1384 if (action == action_array.Get(i))
1386 action_array.Remove(i);
1390 InputActionMap.Insert(ai, action_array);
1392 action_array.Insert(action);
1402 return m_RecipePick;
1420 return m_ActionManager;
1425 return m_EmoteManager;
1430 return m_RGSManager;
1436 ProcessHandDamage(delta_time, pState);
1448 if (gloves && gloves.GetHealthLevel() < 4)
1458 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"LeftForeArmRoll"))
1465 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"RightForeArmRoll"))
1481 string surface;
int liquid;
1485 if (shoes && shoes.GetHealthLevel() < 4)
1498 float modifier_movement = GetFeetDamageMoveModifier();
1512 if (pUserInt % 2 == 0)
1514 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"RightFoot"))
1525 if (GetBleedingManagerServer().AttemptAddBleedingSourceBySelection(
"LeftFoot"))
1560 #ifdef DIAG_DEVELOPER
1561 void SetStaminaEnabled(
bool value)
1572 m_AllowQuickRestrain = enable;
1577 m_AllowQuickFishing = enable;
1582 return m_AllowQuickRestrain;
1587 return m_AllowQuickFishing;
1597 return m_CraftingManager;
1607 return m_WeaponManager;
1621 if (GetThrowing() && GetThrowing().IsThrowingModeEnabled())
1630 m_IsRestrainStarted = restrain_started;
1636 return m_IsRestrainStarted;
1641 m_IsRestrainPrelocked = restrain_prelock;
1647 return m_IsRestrainPrelocked;
1652 m_IsRestrained = is_restrained;
1658 return m_IsRestrained;
1668 if (IsControlledPlayer())
1670 return !IsRestrained() && !IsRestrainPrelocked();
1677 return super.CanReleaseAttachment(attachment);
1682 return super.CanReleaseCargo(cargo);
1687 return super.CanReceiveItemIntoCargo(item);
1692 return super.CanSwapItemInCargo(child_entity, new_entity);
1700 if (!CanPickupHeavyItem(item_to_hands))
1703 return super.CanReceiveItemIntoHands(item_to_hands);
1708 return super.CanSaveItemInHands(item_in_hands);
1713 return super.CanReleaseFromHands(handheld);
1720 return GetCraftingManager().GetRecipeID();
1732 GetCraftingManager().SetRecipeID(recipeID);
1745 return m_ConstructionActionData;
1750 if (m_ConstructionActionData)
1752 m_ConstructionActionData.ResetActionIndexes();
1761 return m_LastFirePoint;
1765 return m_LastFirePointRot;
1769 return m_LastFirePointIndex;
1774 m_LastFirePoint = last_fire_point;
1778 m_LastFirePointRot = last_fire_point_rot;
1782 m_LastFirePointIndex = last_fire_point_index;
1791 int index = m_QuickBarBase.FindEntityIndex(entity);
1793 m_QuickBarBase.SetEntityShortcut(entity,-1);
1798 int index = m_QuickBarBase.FindEntityIndex(entity);
1800 m_QuickBarBase.SetShotcutEnable(index,value);
1807 index = m_QuickBarBase.FindEntityIndex(entity);
1809 if (m_QuickBarBase.GetEntity(index) == NULL)
1818 return m_QuickBarBase.GetSize();
1823 return m_QuickBarBase.GetEntity(index);
1828 int i = FindQuickBarEntityIndex(entity);
1830 m_QuickBarBase.UpdateShotcutVisibility(i);
1835 m_QuickBarBase.SetEntityShortcut(entity, index, force);
1840 m_QuickBarBase.OnSetEntityRequest(ctx);
1847 float add_health_coef = 0.33;
1851 AddHealth(
"LeftLeg",
"Health", (GetMaxHealth(
"LeftLeg",
"Health") - GetHealth(
"LeftLeg",
"Health") ) * add_health_coef );
1852 AddHealth(
"RightLeg",
"Health", (GetMaxHealth(
"RightLeg",
"Health") - GetHealth(
"RightLeg",
"Health")) * add_health_coef );
1853 AddHealth(
"RightFoot",
"Health", (GetMaxHealth(
"RightFoot",
"Health") - GetHealth(
"RightFoot",
"Health")) * add_health_coef );
1854 AddHealth(
"LeftFoot",
"Health", (GetMaxHealth(
"LeftFoot",
"Health") - GetHealth(
"LeftFoot",
"Health")) * add_health_coef );
1864 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
1871 if (!GetDrowningWaterLevelCheck())
1887 if (IsTryingHoldBreath() && CanStartConsumingStamina(
EStaminaConsumers.HOLD_BREATH))
1890 if (!m_IsHoldingBreath)
1892 OnHoldBreathStart();
1893 m_IsHoldingBreath =
true;
1896 else if (IsTryingHoldBreath() && m_IsHoldingBreath && CanConsumeStamina(
EStaminaConsumers.HOLD_BREATH))
1902 if (m_IsHoldingBreath) OnHoldBreathEnd();
1903 m_IsHoldingBreath =
false;
1910 RequestSoundEventEx(
EPlayerSoundEventID.HOLD_BREATH,
true, EPlayerSoundEventParam.SKIP_CONTROLLED_PLAYER);
1915 RequestSoundEventEx(
EPlayerSoundEventID.EXHAUSTED_BREATH,
true, EPlayerSoundEventParam.SKIP_CONTROLLED_PLAYER);
1921 RequestSoundEventEx(
EPlayerSoundEventID.RELEASE_BREATH,
true, EPlayerSoundEventParam.SKIP_CONTROLLED_PLAYER);
1926 return m_IsHoldingBreath;
1936 return m_MixedSoundStates;
1941 if (m_SaySoundLastSetName !=
name)
1946 m_SaySoundLastSetName =
name;
1949 m_SaySoundObject = m_SaySoundBuilder.BuildSoundObject();
1958 int attcount = this.GetInventory().AttachmentCount();
1960 for (
int att = 0; att < attcount; att++)
1962 attachment = GetInventory().GetAttachmentFromIndex(att);
1963 if (attachment.IsItemBase())
1965 item_name = attachment.GetType();
1966 if (
GetGame().IsKindOf(item_name, searched_item))
1981 PluginSceneManager scene_editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager));
1982 scene_editor.InitLoad();
1994 m_ModuleLifespan.SynchLifespanVisual(
this, m_LifeSpanState, m_HasBloodyHandsVisible, m_HasBloodTypeVisible,
m_BloodType);
1997 if (IsControlledPlayer())
2004 PPERequesterBank.GetRequester(PPERequester_DeathDarkening).Stop();
2005 PPERequesterBank.GetRequester(PPERequester_ShockHitReaction).Stop();
2006 PPERequesterBank.GetRequester(PPERequester_UnconEffects).Stop();
2013 #ifdef PLATFORM_CONSOLE
2021 if (!
GetGame().IsDedicatedServer())
2027 m_CharactersHead = Head_Default.Cast(GetInventory().FindPlaceholderForSlot(slot_id));
2028 CheckHairClippingOnCharacterLoad();
2029 UpdateHairSelectionVisibility();
2030 PreloadDecayTexture();
2034 wpn.ValidateAndRepair();
2039 m_PlayerLoaded =
true;
2047 m_PlayerDisconnectProcessed = state;
2052 return m_PlayerDisconnectProcessed;
2062 return m_HologramServer;
2067 return m_HologramLocal;
2074 m_HologramServer =
new Hologram(
this, GetLocalProjectionPosition(), item);
2075 GetHologramServer().SetProjectionPosition(GetLocalProjectionPosition());
2076 GetHologramServer().SetProjectionOrientation(GetLocalProjectionOrientation());
2077 GetHologramServer().GetProjectionEntity().OnPlacementStarted(
this);
2078 GetHologramServer().CheckPowerSource();
2079 GetHologramServer().RefreshVisual();
2090 m_HologramLocal =
new Hologram(
this, GetLocalProjectionPosition(), item);
2091 GetHologramLocal().GetProjectionEntity().OnPlacementStarted(
this);
2097 EntityAI entity_in_hands = GetHumanInventory().GetEntityInHands();
2099 if (IsPlacingServer())
2101 GetHologramServer().GetParentEntity().OnPlacementCancelled(
this);
2103 delete m_HologramServer;
2106 else if (entity_in_hands && entity_in_hands.HasEnergyManager())
2108 if (entity_in_hands.GetCompEM().IsPlugged())
2110 entity_in_hands.OnPlacementCancelled(
this);
2118 m_AreHandsLocked =
true;
2123 EntityAI entity_in_hands = GetHumanInventory().GetEntityInHands();
2124 if (entity_in_hands && entity_in_hands.HasEnergyManager())
2126 if (entity_in_hands.GetCompEM().IsPlugged())
2128 entity_in_hands.OnPlacementCancelled(
this);
2131 delete m_HologramLocal;
2136 delete m_HologramServer;
2141 delete m_HologramLocal;
2146 if (m_HologramServer)
2158 if (m_HologramLocal)
2168 if (enable != m_IsDrowning)
2179 m_IsDrowning = enable;
2186 if (IsControlledPlayer())
2188 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2192 SpawnDrowningBubbles();
2199 if (IsControlledPlayer())
2201 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2212 PlacingCancelServer();
2230 else if (!
GetGame().IsMultiplayer())
2251 m_UndergroundPresence = presence;
2256 if (IsPlacingLocal())
2267 PlacingCancelLocal();
2271 PlacingStartLocal(GetItemInHands());
2275 PlacingStartLocal(item);
2281 m_LocalProjectionPosition = local_position;
2286 m_LocalProjectionOrientation = local_orientation;
2291 return m_LocalProjectionPosition;
2296 return m_LocalProjectionOrientation;
2307 m_IsInWater = pState;
2322 SetContaminatedEffectEx(
false);
2327 StopSoundSet(m_SoundFliesEffect);
2336 m_CameraSwayModifier = new_camera.GetWeaponSwayModifier();
2337 m_CurrentCamera = new_camera;
2342 return m_CurrentCamera;
2347 if (!m_CurrentCamera)
2355 return m_BleedingManagerServer;
2360 return m_BleedingManagerRemote;
2365 return m_SymptomManager;
2378 return m_TrasferValues;
2383 return m_DebugMonitorValues;
2529 if (!IsPlayerSelected() || !IsAlive())
2531 if (m_ModifiersManager)
2532 m_ModifiersManager.OnScheduledTick(deltaTime);
2533 if (m_NotifiersManager)
2534 m_NotifiersManager.OnScheduledTick();
2535 if (m_TrasferValues)
2536 m_TrasferValues.OnScheduledTick(deltaTime);
2539 if (GetBleedingManagerServer())
2540 GetBleedingManagerServer().OnTick(deltaTime);
2542 m_Environment.Update(deltaTime);
2545 ItemBase heldItem = GetItemInHands();
2546 if (heldItem && heldItem.HasEnergyManager() && heldItem.GetCompEM().IsPlugged())
2552 placed_entity.GetCompEM().UpdatePlugState();
2560 if (!m_DeathSyncSent && m_KillerData)
2565 m_DeathSyncSent =
true;
2569 if (m_DebugMonitorValues)
2570 m_DebugMonitorValues.OnScheduledTick(delta_time);
2571 if (GetSymptomManager())
2572 GetSymptomManager().OnTick(delta_time, pCurrentCommandID,
m_MovementState);
2578 if (m_PlayerSoundEventHandler)
2579 m_PlayerSoundEventHandler.OnTick(delta_time);
2581 if (m_ProcessRemoveEffectWidgets && m_ProcessRemoveEffectWidgets.Count() > 0)
2586 if (m_ProcessAddEffectWidgets && m_ProcessAddEffectWidgets.Count() > 0)
2591 HandleGlassesEffect();
2593 if (m_ContaminatedAreaEffectEnabled)
2594 ContaminatedParticleAdjustment();
2596 #ifdef DIAG_DEVELOPER
2599 m_WeaponDebug.OnCommandHandlerUpdate();
2603 m_ProcessAddEffectWidgets.Clear();
2604 m_ProcessRemoveEffectWidgets.Clear();
2610 UpdateMovementInertia();
2619 float staminaPercentage = GetStaminaHandler().GetSyncedStaminaNormalized();
2627 int m_DbgListSelection = 0;
2628 float m_DbgSliderValue = 0.0;
2633 return m_NotifiersManager;
2651 super.EEItemIntoHands(item);
2655 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(item, {
Bolt_Base});
2660 w.ResetWeaponAnimState();
2666 GetMeleeFightLogic().SetBlock(
false);
2671 if (item.IsHeavyBehaviour() &&
IsRaised())
2686 super.EEItemOutOfHands(item);
2688 if (IsPlacingLocal())
2698 return m_PlayerStomach;
2701 override void CommandHandler(
float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished)
2704 super.CommandHandler(pDt,pCurrentCommandID,pCurrentCommandFinished);
2709 CheckZeroSoundEvent();
2710 CheckSendSoundEvent();
2712 ProcessADDModifier();
2714 if (m_BrokenLegsJunctureReceived)
2716 m_BrokenLegsJunctureReceived =
false;
2717 bool initial = m_BrokenLegState < 0;
2724 BrokenLegForceProne();
2732 GetDayZPlayerInventory().HandleInventory(pDt);
2734 if (IsFireWeaponRaised() || m_IsHoldingBreath)
2736 ProcessHoldBreath(pDt);
2741 if (m_AreHandsLocked && GetHumanInventory().GetEntityInHands())
2743 m_AreHandsLocked =
false;
2756 if (m_WeaponManager)
2758 m_WeaponManager.Update(pDt);
2760 if (m_EmoteManager && IsPlayerSelected())
2762 m_EmoteManager.Update(pDt);
2766 m_RGSManager.Update();
2768 if (m_StanceIndicator)
2770 m_StanceIndicator.Update();
2776 if (m_InjuryHandler)
2778 m_InjuryHandler.Update(pDt);
2780 if (m_HCAnimHandler)
2786 m_ShockHandler.Update(pDt);
2791 GetPlayerSoundManagerServer().Update();
2796 GetHumanInventory().Update(pDt);
2799 ProcessDrowning(pDt);
2806 HandleDamageHit(pCurrentCommandID);
2810 mngr.Update(pCurrentCommandID);
2815 if (!m_UnconsciousDebug)
2817 OnUnconsciousUpdate(pDt, m_LastCommandBeforeUnconscious);
2818 if (!m_IsUnconscious)
2820 m_IsUnconscious =
true;
2821 OnUnconsciousStart();
2823 if (!m_ShouldBeUnconscious && m_UnconsciousTime > 2)
2841 m_LastCommandBeforeUnconscious = pCurrentCommandID;
2847 m_TransportCache = null;
2849 int damageHitAnim = 1;
2850 float damageHitDir = 0;
2852 TryHideItemInHands(
false,
true);
2861 if (m_IsUnconscious )
2863 m_IsUnconscious =
false;
2864 OnUnconsciousStop(pCurrentCommandID);
2870 if (quickBarSlot && IsAlive())
2874 OnQuickBarSingleUse(quickBarSlot);
2879 OnQuickBarContinuousUseStart(quickBarSlot);
2884 OnQuickBarContinuousUseEnd(quickBarSlot);
2910 if (!
GetGame().IsDedicatedServer())
2918 if (IsMapCallbackCancelInput())
2922 else if (IsMapCallbackEndInput())
2933 m_Bot.OnUpdate(pDt);
2936 if (m_CheckMeleeItem && (!
GetGame().IsDedicatedServer()))
2938 CheckMeleeItemDamage(m_CheckMeleeItem);
2939 SetCheckMeleeItem();
2943 TryGetInVehicleDebug();
2946 OnCommandHandlerTick(pDt, pCurrentCommandID);
2951 void SetGetInVehicleDebug(
EntityAI ent)
2953 m_GetInVehicleTransportDebug =
Transport.Cast(ent);
2956 void TryGetInVehicleDebug()
2958 if (m_GetInVehicleTransportDebug)
2963 vehCommand.
SetVehicleType(m_GetInVehicleTransportDebug.GetAnimInstance());
2965 m_GetInVehicleTransportDebug = null;
2979 if (m_hac && !m_MapClosingSyncSent)
3006 else if (!
GetGame().IsMultiplayer())
3008 m_hac.InternalCommand(command_ID);
3010 SetMapClosingSyncSet(
true);
3014 if (!
GetGame().IsDedicatedServer())
3043 m_MapClosingSyncSent = state;
3048 return m_MapClosingSyncSent;
3053 if (
IsRaised() || (
GetUApi().GetInputByID(UAUIMenu).LocalPress() ||
GetUApi().GetInputByID(UAGear).LocalPress()))
3063 if (
GetUApi().GetInputByID(UADefaultAction).LocalPress())
3073 return m_MapNavigationBehaviour;
3078 if (GetMapNavigationBehaviour())
3080 GetMapNavigationBehaviour().OnItemInPlayerPossession(item);
3086 if (GetMapNavigationBehaviour())
3088 GetMapNavigationBehaviour().OnItemNotInPlayerPossession(item);
3094 m_CheckMeleeItem = item;
3124 m_ShakesForced = value;
3130 if (m_ShakesForced > 0)
3132 level = m_ShakesForced;
3136 float heat_comfort = GetStatHeatComfort().Get();
3148 if (level != m_Shakes)
3157 CloseInventoryMenu();
3162 SetInventorySoftLock(
true);
3165 EntityAI entity_in_hands = GetHumanInventory().GetEntityInHands();
3166 if (entity_in_hands && CanDropEntity(entity_in_hands) && !IsRestrained())
3168 DropItem(
ItemBase.Cast(entity_in_hands));
3188 if (GetMeleeFightLogic())
3190 GetMeleeFightLogic().SetBlock(
false);
3194 SetMasterAttenuation(
"UnconsciousAttenuation");
3201 m_UnconRefillModifier =1;
3204 m_UnconsciousTime = 0;
3205 m_UnconsciousVignetteTarget = 2;
3211 PPERequesterBank.GetRequester(PPERequester_UnconEffects).Stop();
3214 if (
GetGame().GetUIManager().IsDialogVisible())
3223 SetInventorySoftLock(
false);
3238 SetMasterAttenuation(
"");
3245 m_UnconsciousTime += pDt;
3248 int shock_simplified = SimplifyShock();
3250 if (m_ShockSimplified != shock_simplified)
3252 m_ShockSimplified = shock_simplified;
3261 SetHealth(
"",
"",-100);
3264 if (!
GetGame().IsDedicatedServer())
3270 float shock_simple_normalized = GetSimplifiedShockNormalized();
3272 float sin =
Math.
Sin(m_UnconsciousTime * 0.3);
3273 float sin_normalized = (sin + 1) / 2;
3274 if (sin_normalized < 0.05)
3276 m_UnconsciousVignetteTarget = (1 - shock_simple_normalized / 3) * 2;
3278 float vignette =
Math.
Lerp(2,m_UnconsciousVignetteTarget, sin_normalized);
3280 m_UnconParam.param1 = vignette;
3281 PPERequesterBank.GetRequester(PPERequester_UnconEffects).Start(m_UnconParam);
3288 int shock =
Math.
Lerp(0, SIMPLIFIED_SHOCK_CAP, GetHealth(
"",
"Shock") / GetMaxHealth(
"",
"Shock"));
3289 shock =
Math.
Clamp(shock, 0, SIMPLIFIED_SHOCK_CAP);
3295 return (m_ShockSimplified / SIMPLIFIED_SHOCK_CAP);
3300 return m_IsUnconscious;
3305 #ifdef DIAG_DEVELOPER
3306 if (!m_CanBeTargetedDebug)
3312 return super.CanBeTargetedByAI(ai) && !IsUnconscious() && !IsInVehicle();
3317 AddHealth(
"",
"Shock",shock);
3323 CloseInventoryMenu();
3344 m_BrokenLegState = stateId;
3351 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.BROKEN_LEGS;
3352 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.BROKEN_LEGS_SPLINT;
3376 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.PRONE_ANIM_OVERRIDE;
3377 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.BROKEN_LEGS;
3378 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask | eInjuryOverrides.BROKEN_LEGS_SPLINT;
3380 m_InjuryHandler.CheckValue(
false);
3388 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.PRONE_ANIM_OVERRIDE;
3389 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.BROKEN_LEGS_SPLINT;
3390 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask | eInjuryOverrides.BROKEN_LEGS;
3393 BrokenLegWalkShock();
3394 m_InjuryHandler.CheckValue(
false);
3400 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.BROKEN_LEGS;
3401 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.BROKEN_LEGS_SPLINT;
3408 PlaySoundSet(m_BrokenLegSound, SOUND_BREAK_LEG, 0.1, 0.1);
3417 Class.
CastTo(attachment, GetItemOnSlot(
"Splint_Right"));
3418 if (attachment && attachment.GetType() ==
"Splint_Applied")
3420 attachment.Delete();
3424 m_ShockHandler.CheckValue(
true);
3427 if (m_ShockHandler.GetCurrentShock() >= 25)
3456 float avgLegHealth = GetHealth(
"RightLeg",
"") + GetHealth(
"LeftLeg",
"") + GetHealth(
"RightFoot",
"") + GetHealth(
"LeftFoot",
"");
3457 avgLegHealth *= 0.25;
3472 if (IsClimbingLadder())
3495 m_ShockHandler.CheckValue(
true);
3500 void MovingShock(
float legHealth,
float highShock,
float midShock,
float lowShock)
3505 m_ShockHandler.SetShock(highShock);
3510 m_ShockHandler.SetShock(lowShock);
3515 m_ShockHandler.SetShock(midShock);
3521 Param1<float> damage =
new Param1<float>(0);
3522 damage.param1 = dmg;
3529 if (item.IsHeavyBehaviour() && (GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS || GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS_SPLINT))
3532 return super.CanPickupHeavyItem(item);
3538 SetHealth(
"RightLeg",
"", 0);
3539 SetHealth(
"RightFoot",
"", 0);
3540 SetHealth(
"LeftLeg",
"", 0);
3541 SetHealth(
"LeftFoot",
"", 0);
3546 ItemBase itemInHands = GetItemInHands();
3547 if (itemInHands && itemInHands.IsHeavyBehaviour())
3548 DropItem(itemInHands);
3554 Class.
CastTo(attachment, GetItemOnSlot(
"Splint_Right"));
3555 if (attachment && attachment.GetType() ==
"Splint_Applied")
3567 ItemBase itemInHands = GetItemInHands();
3570 if (itemInHands.IsHeavyBehaviour())
3572 TryHideItemInHands(
false);
3577 TryHideItemInHands(
true);
3579 itemInHands.OnItemInHandsPlayerSwimStart(
this);
3584 GetInventory().LockInventory(LOCK_FROM_SCRIPT);
3586 CloseInventoryMenu();
3590 GetWeaponManager().DelayedRefreshAnimationState(10);
3591 RequestHandAnimationStateRefresh();
3598 TryHideItemInHands(
false,
true);
3601 GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
3605 GetWeaponManager().RefreshAnimationState();
3613 TryHideItemInHands(
true);
3616 GetInventory().LockInventory(LOCK_FROM_SCRIPT);
3618 CloseInventoryMenu();
3625 TryHideItemInHands(
false,
true);
3628 GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
3638 GetInventory().LockInventory(LOCK_FROM_SCRIPT);
3640 CloseInventoryMenu();
3643 GetWeaponManager().DelayedRefreshAnimationState(10);
3644 RequestHandAnimationStateRefresh();
3650 GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
3652 GetWeaponManager().RefreshAnimationState();
3660 GetInventory().LockInventory(LOCK_FROM_SCRIPT);
3662 CloseInventoryMenu();
3665 GetWeaponManager().DelayedRefreshAnimationState(10);
3666 RequestHandAnimationStateRefresh();
3672 GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
3674 GetWeaponManager().RefreshAnimationState();
3682 GetInventory().LockInventory(LOCK_FROM_SCRIPT);
3684 CloseInventoryMenu();
3686 ItemBase itemInHand = GetItemInHands();
3687 EntityAI itemOnHead = FindAttachmentBySlotName(
"Headgear");
3689 if (itemInHand && itemInHand.GetCompEM())
3690 itemInHand.GetCompEM().SwitchOff();
3692 TryHideItemInHands(
true);
3694 if (itemOnHead && itemOnHead.GetCompEM())
3695 itemOnHead.GetCompEM().SwitchOff();
3699 OnVehicleSeatDriverEnter();
3707 GetInventory().UnlockInventory(LOCK_FROM_SCRIPT);
3709 TryHideItemInHands(
false,
true);
3711 if (m_IsVehicleSeatDriver)
3712 OnVehicleSeatDriverLeft();
3720 m_IsFighting =
true;
3723 GetWeaponManager().DelayedRefreshAnimationState(10);
3724 RequestHandAnimationStateRefresh();
3729 RunFightBlendTimer();
3731 GetWeaponManager().RefreshAnimationState();
3739 GetWeaponManager().DelayedRefreshAnimationState(10);
3740 RequestHandAnimationStateRefresh();
3745 m_ActionManager.OnJumpStart();
3748 GetWeaponManager().DelayedRefreshAnimationState(10);
3749 RequestHandAnimationStateRefresh();
3755 if (m_PresenceNotifier)
3770 GetWeaponManager().RefreshAnimationState();
3775 return ((1 << stance) & stanceMask) != 0;
3784 if ((IsStance(previousStance, prone) && IsStance(newStance, notProne)) || (IsStance(previousStance, notProne) && IsStance(newStance, prone)))
3787 GetWeaponManager().RefreshAnimationState();
3793 return !IsRolling() && !GetThrowing().IsThrowingAnimationPlaying();
3804 m_InjuryHandler.m_ForceInjuryAnimMask = m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.PRONE_ANIM_OVERRIDE;
3805 ForceUpdateInjuredState();
3815 if (IsInFBEmoteState() || m_EmoteManager.m_MenuEmote)
3846 OnVehicleSeatDriverEnter();
3850 OnVehicleSeatDriverLeft();
3856 m_IsVehicleSeatDriver =
true;
3863 m_IsVehicleSeatDriver =
false;
3870 if (change_to_enabled)
3872 PlacingCancelLocal();
3873 PlacingCancelServer();
3887 m_EffectWidgets.
Update(timeSlice);
3891 if (m_UndergroundHandler)
3892 m_UndergroundHandler.Tick(timeSlice);
3898 float delta_time = (
GetGame().
GetTime() - m_LastPostFrameTickTime) / 1000;
3902 if (GetDamageDealtEffect())
3905 GetDamageDealtEffect().Update(delta_time);
3907 delete GetDamageDealtEffect();
3914 m_EffectRadial.Update(delta_time);
3917 m_EffectRadial = null;
3921 if (GetFlashbangEffect())
3925 GetFlashbangEffect().Update(delta_time);
3929 delete GetFlashbangEffect();
3933 if (GetShockEffect())
3936 GetShockEffect().Update(delta_time);
3938 delete GetShockEffect();
3941 m_InventoryActionHandler.OnUpdate();
3944 #ifdef DIAG_DEVELOPER
3945 DiagOnPostFrame(other, extra);
3949#ifdef DIAG_DEVELOPER
3950 protected void DiagOnPostFrame(
IEntity other,
int extra)
3956 m_WeaponDebug.OnPostFrameUpdate();
3959 if (GetBleedingManagerRemote())
3961 GetBleedingManagerRemote().OnUpdate();
3968 m_MeleeDebug =
true;
3973 m_MeleeDebug =
false;
3983 PluginDrawCheckerboard drawCheckerboard = PluginDrawCheckerboard.Cast(
GetPluginManager().GetPluginByType(PluginDrawCheckerboard));
3984 if (drawCheckerboard && !drawCheckerboard.IsActive())
3990 if (m_PresenceNotifier)
3998 GetCollisionBox(minmax);
4001 if (m_IsInsideTrigger)
4008 dbgShape.CreateMatrix(mat);
4009 dbgShape.SetMatrix(mat);
4013 if (m_Environment && m_Environment.m_Debug)
4016 EnvDebugData envDebugData = m_Environment.GetEnvDebugData();
4023 if (m_FallDamage && m_FallDamage.m_Debug)
4026 FallDamageDebugData fallDamageDebugData = m_FallDamage.GetFallDamageDebugData();
4036 super.OnEnterTrigger(trigger);
4038 ++m_IsInsideTrigger;
4043 super.OnLeaveTrigger(trigger);
4045 --m_IsInsideTrigger;
4057 if (GetStaminaHandler())
4058 GetStaminaHandler().DepleteStamina(modifier,dT);
4063 if (!GetStaminaHandler())
return false;
4065 bool val = (GetStaminaHandler().HasEnoughStaminaFor(consumer) && !IsRestrained() && !IsInFBEmoteState());
4068 StaminaHUDNotifier(
false);
4075 if (!GetStaminaHandler())
return false;
4077 bool val = (GetStaminaHandler().HasEnoughStaminaToStart(consumer) && !IsRestrained() && !IsInFBEmoteState());
4080 StaminaHUDNotifier(
false);
4088 if (!GetStaminaHandler())
4091 return GetStaminaHandler().GetStamina() > 0;
4094 override bool CanClimb(
int climbType, SHumanCommandClimbResult climbRes)
4107 if (climbType > 0 && m_InjuryHandler && m_InjuryHandler.GetInjuryAnimValue() >=
InjuryAnimValues.
LVL3)
4110 return super.CanClimb(climbType,climbRes);
4115 if (GetBrokenLegs() !=
eBrokenLegs.NO_BROKEN_LEGS)
4127 if (IsInFBEmoteState() || m_EmoteManager.m_MenuEmote)
4132 return super.CanJump();
4137 return m_JumpClimb.m_bIsJumpInProgress;
4144 int count = temp.Count();
4147 vector pos = target.GetPosition();
4148 for (
int i = 0; i < count; i++)
4166 m_RefreshAnimStateIdx++;
4167 if (m_RefreshAnimStateIdx > 3)
4168 m_RefreshAnimStateIdx = 0;
4192 vector pdir = GetDirection();
4210 if (m_AreHandsLocked)
4216 if (GetThrowing().IsThrowingModeEnabled() || GetThrowing().IsThrowingAnimationPlaying())
4219 if (
IsRaised() ||
GetCommand_Melee() || IsSwimming() || IsClimbingLadder() || IsClimbing() || IsRestrained() || IsRestrainPrelocked())
4222 if (GetDayZPlayerInventory().
IsProcessing() || IsItemsToDelete())
4228 if (GetWeaponManager() && GetWeaponManager().
IsRunning())
4238 EntityAI quickBarEntity = GetQuickBarEntity(slotClicked - 1);
4240 if (!quickBarEntity)
4249 EntityAI inHandEntity = GetHumanInventory().GetEntityInHands();
4251 if (!GetDayZPlayerInventory().
IsIdle())
4255 handInventoryLocation.
SetHands(
this,quickBarEntity);
4256 if (this.GetInventory().HasInventoryReservation(quickBarEntity, handInventoryLocation))
4259 if (inHandEntity == quickBarEntity)
4261 if (GetHumanInventory().CanRemoveEntityInHands())
4263 syncDebugPrint(
"[QB] Stash - PredictiveMoveItemFromHandsToInventory HND=" +
Object.GetDebugName(inHandEntity));
4264 PredictiveMoveItemFromHandsToInventory();
4270 quickBarEntity.GetInventory().GetCurrentInventoryLocation(invLocQBItem);
4271 if (GetInventory().HasInventoryReservation(quickBarEntity,invLocQBItem))
4279 inHandEntity.GetInventory().GetCurrentInventoryLocation(inHandEntityFSwapDst);
4281 int index = GetHumanInventory().FindUserReservedLocationIndex(inHandEntity);
4283 GetHumanInventory().GetUserReservedLocation(index, Reserved_Item_il);
4285 if (Reserved_Item_il)
4290 syncDebugPrint(
"[QB] PredictiveSwapEntities QB=" +
Object.GetDebugName(quickBarEntity) +
" HND=" +
Object.GetDebugName(inHandEntity));
4291 PredictiveSwapEntities(quickBarEntity, inHandEntity);
4296 PredictiveForceSwapEntities(quickBarEntity, inHandEntity, inHandEntityFSwapDst);
4301 if (GetInventory().HasInventoryReservation(quickBarEntity,handInventoryLocation))
4304 if (GetInventory().CanAddEntityIntoHands(quickBarEntity))
4306 syncDebugPrint(
"[QB] Stash - PredictiveTakeEntityToHands QB=" +
Object.GetDebugName(quickBarEntity));
4307 PredictiveTakeEntityToHands(quickBarEntity);
4315 if (GetInventory().IsInventoryLocked())
4318 if (IsSwimming() || IsClimbingLadder() ||
GetCommand_Melee() || IsClimbing() || IsRestrained() || IsRestrainPrelocked())
4325 ItemBase itemInHands =
ItemBase.Cast(GetHumanInventory().GetEntityInHands());
4327 if (itemInHands != quickBarItem)
4341 m_QuickBarFT =
true;
4345 m_QuickBarHold =
true;
4356 if (m_ActionQBControl)
4361 if (!action.GetInput().IsActive())
4372 m_QuickBarFT =
false;
4376 m_QuickBarHold =
false;
4380 m_ActionQBControl = !action.GetInput().IsActive();
4385 return m_ActionQBControl;
4389 m_ActionQBControl =
false;
4398 OnQuickBarSingleUse(slotClicked);
4404 EntityAI quickBarEntity = GetQuickBarEntity(slotClicked - 1);
4405 EntityAI entity_in_hands = GetHumanInventory().GetEntityInHands();
4407 ReloadWeapon(entity_in_hands, quickBarEntity);
4413 EntityAI magazine = GetMagazineToReload(weapon);
4414 ReloadWeapon(weapon, magazine);
4429 else if (GetHumanInventory().GetEntityInHands()!= magazine)
4435 if (GetWeaponManager().CanUnjam(wpn))
4437 GetWeaponManager().Unjam();
4439 else if (GetWeaponManager().CanAttachMagazine(wpn, mag))
4441 GetWeaponManager().AttachMagazine(mag);
4443 else if (GetWeaponManager().CanSwapMagazine(wpn, mag))
4445 GetWeaponManager().SwapMagazine(mag);
4447 else if (GetWeaponManager().CanLoadBullet(wpn, mag))
4467 int last_ammo_magazine_count;
4468 int ammo_magazine_count;
4471 int last_ammo_pile_count;
4472 int ammo_pile_count;
4475 for (
int att_i = 0; att_i < GetInventory().AttachmentCount(); ++att_i)
4477 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att_i);
4478 ref
CargoBase attachment_cargo = attachment.GetInventory().GetCargo();
4480 if (attachment_cargo)
4482 for (
int cgo_i = 0; cgo_i < attachment_cargo.GetItemCount(); ++cgo_i)
4484 EntityAI cargo_item = attachment_cargo.GetItem(cgo_i);
4487 if (cargo_item.IsMagazine())
4489 Magazine magazine = Magazine.Cast(cargo_item);
4490 ammo_pile_count = magazine.GetAmmoCount();
4495 if (ammo_pile_count > 0)
4497 if (last_ammo_magazine_count == 0)
4499 ammo_magazine = magazine;
4500 last_ammo_magazine_count = ammo_pile_count;
4504 if (last_ammo_magazine_count < ammo_pile_count)
4506 ammo_magazine = magazine;
4507 last_ammo_magazine_count = ammo_pile_count;
4513 else if (weapon_manager.
CanLoadBullet(weapon_base, magazine))
4515 if (ammo_pile_count > 0)
4517 if (last_ammo_pile_count == 0)
4519 ammo_pile = magazine;
4520 last_ammo_pile_count = ammo_pile_count;
4524 if (last_ammo_pile_count > ammo_pile_count)
4526 ammo_pile = magazine;
4527 last_ammo_pile_count = ammo_pile_count;
4540 return ammo_magazine;
4561 return m_LiquidTendencyDrain;
4567 m_LiquidTendencyDrain = state;
4574 return m_FlagRaisingTendency;
4580 m_FlagRaisingTendency = state;
4583 override SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
false)
4590 return GetWeightEx();
4595 return GetWeightEx() >= OVERLOAD_LIMIT;
4608 float newload = GetPlayerLoad() + addedload;
4609 SetPlayerLoad(newload);
4617 return GetInventory().HasEntityInInventory(entity);
4622 if (
GetGame().IsMultiplayer())
4636 syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer item=" +
Object.GetDebugName(item) +
" currPar=" + currParent +
" newPar=" + newParent);
4638 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
4640 bool cp_owned =
false;
4642 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
4644 bool np_owned =
false;
4646 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
4648 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
4649 syncDebugPrint(
"[syncinv] " +
GetDebugName(
this) +
" STS=" + GetSimulationTimeStamp() +
" NeedInventoryJunctureFromServer=" + !all_owned +
" i_pwn=" + i_owned +
" cp_pwn=" + cp_owned +
" np_pwn=" + np_owned);
4653 Error(
"[syncinv] unsupported instance type t=" + t);
4663 float totalWeight = super.GetWeightSpecialized(forceRecalc);
4665 ItemBase itemHands = GetItemInHands();
4668 totalWeight += itemHands.GetWeightEx(forceRecalc);
4671 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
4673 float itemInHandsWeight = totalWeight - super.GetWeightSpecialized(forceRecalc);
4675 dta.
SetCalcDetails(
"TMan: " + (super.GetWeightSpecialized(forceRecalc)+ itemInHandsWeight) +
"(contents weight[includes item in hands])");
4683 const int VISIBILITY_SLOTS_COUNT = 10;
4685 int attcount = GetInventory().AttachmentCount();
4686 float sumVisibility = 0;
4687 float countVisibility = 0;
4688 float visibilityMean = 0;
4692 for (
int att = 0; att < attcount; att++)
4694 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
4695 if (attachment.IsClothing())
4699 sumVisibility += clothing.GetItemVisibility();
4704 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
4705 SetVisibilityCoef(visibilityMean);
4710 SetVisibilityCoef(visibilityMean);
4716 m_VisibilityCoef = pVisibility;
4721 return m_VisibilityCoef;
4733 float health = GetHealth(
"",
"");
4739 float toxicity = GetStatToxicity().Get();
4745 float blood = GetHealth(
"",
"Blood");
4751 float energy = GetStatEnergy().Get();
4757 float water = GetStatWater().Get();
4799 float immunity = GetImmunity();
4800 if (m_ImmunityBoosted)
4808 float immunity = GetImmunity();
4809 float immmunity_max = 1;
4816 float health = GetHealth(
"",
"");
4817 float health_max = GetMaxHealth(
"",
"");
4823 float toxicity = GetStatToxicity().Get();
4824 float toxicity_max = GetStatToxicity().GetMax();
4830 float blood = GetHealth(
"",
"Blood");
4831 float blood_max = GetMaxHealth(
"",
"Blood");
4837 float energy = GetStatEnergy().Get();
4838 float energy_max = GetStatEnergy().GetMax();
4844 float water = GetStatWater().Get();
4845 float water_max = GetStatWater().GetMax();
4853 if (stat_value <= critical)
4857 if (stat_value <= low)
4861 if (stat_value <= normal)
4865 if (stat_value <= high)
4874 if (stat_value <= critical)
4878 if (stat_value <= low)
4882 if (stat_value <= normal)
4886 if (stat_value <= high)
4895 m_ImmunityBoosted = boosted;
4904 if ( GetPlayerStats())
4906 float max_health = GetMaxHealth(
"GlobalHealth",
"Health") + 0.01;
4907 float max_blood = GetMaxHealth(
"GlobalHealth",
"Blood") + 0.01;
4910 float health_normalized = GetHealth(
"GlobalHealth",
"Health") / max_health;
4911 float blood_normalized = GetHealth(
"GlobalHealth",
"Blood") / max_blood;
4912 immunity = energy_normalized + water_normalized + health_normalized + blood_normalized;
4913 immunity = immunity / 4;
4927 if (
IsRaised() || (item && item.IsHeavyBehaviour()))
4932 if (GetBrokenLegs() !=
eBrokenLegs.NO_BROKEN_LEGS)
4981 return m_IsFighting;
4988 return m_EmoteManager.IsEmotePlaying();
5007 return m_AnimCommandStarting & mask;
5012 if (!m_FightEndBlendTimer)
5013 m_FightEndBlendTimer =
new Timer();
5014 if (!m_FightEndBlendTimer.IsRunning())
5022 m_IsFighting =
false;
5029 if (item && item.GetHierarchyParent() && item.GetHierarchyParent().IsWeapon() && item.IsRuined())
5031 PlayAttachmentDropSound();
5032 return DropItem(item);
5035 if (item && item == GetItemInHands() && item.IsRuined())
5037 return PredictiveDropEntity(item);
5050 super.RPC(rpc_type, params, guaranteed, recipient);
5056 super.OnRPC(sender, rpc_type, ctx);
5062 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5069 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5070 if (GetSymptomManager())
5072 GetSymptomManager().OnRPC(
ERPCs.RPC_PLAYER_SYMPTOM_ON, ctx);
5076 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5077 if (GetSymptomManager())
5079 GetSymptomManager().OnRPC(
ERPCs.RPC_PLAYER_SYMPTOM_OFF, ctx);
5083 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5084 if (m_TrasferValues)
5085 m_TrasferValues.OnRPC(ctx);
5088 case ERPCs.RPC_USER_ACTION_MESSAGE:
5093 if (ctx.
Read(m_UAParamMessage))
5095 string actiontext = m_UAParamMessage.param1;
5096 MessageAction(actiontext);
5100 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5101 ref Param1<float> p_synch =
new Param1<float>(0);
5103 float specialty_level = p_synch.param1;
5104 GetSoftSkillsManager().SetSpecialtyLevel(specialty_level);
5107 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5108 ref Param5<float, float, float, float, bool> p_debug_synch =
new Param5<float, float ,float, float, bool>(0, 0, 0, 0,
false);
5109 ctx.
Read(p_debug_synch);
5110 float general_bonus_before = p_debug_synch.param1;
5111 float general_bonus_after = p_debug_synch.param2;
5112 float last_UA_value = p_debug_synch.param3;
5113 float cooldown_value = p_debug_synch.param4;
5114 float cooldown_active = p_debug_synch.param5;
5115 GetSoftSkillsManager().SetGeneralBonusBefore(general_bonus_before);
5116 GetSoftSkillsManager().SetGeneralBonusAfter(general_bonus_after);
5117 GetSoftSkillsManager().SetLastUAValue(last_UA_value);
5118 GetSoftSkillsManager().SetCoolDownValue(cooldown_value);
5119 GetSoftSkillsManager().SetCoolDown(cooldown_active);
5122 case ERPCs.RPC_WARNING_ITEMDROP:
5132 case ERPCs.RPC_WARNING_TELEPORT:
5141 case ERPCs.RPC_INIT_SET_QUICKBAR:
5142 ref Param1<int> count =
new Param1<int>(0);
5143 if (ctx.
Read(count));
5145 for (
int i = 0; i < count.param1 ; i++)
5147 m_QuickBarBase.OnSetEntityRPC(ctx);
5152 case ERPCs.RPC_SYNC_THERMOMETER:
5155 if (ctx.
Read(value))
5161 case ERPCs.RPC_CHECK_PULSE:
5174 if (m_CheckPulseLastTarget)
5182 case PlantType.TREE_HARD:
5183 SoundHardTreeFallingPlay();
5186 case PlantType.TREE_SOFT:
5187 SoundSoftTreeFallingPlay();
5190 case PlantType.BUSH_HARD:
5191 SoundHardBushFallingPlay();
5194 case PlantType.BUSH_SOFT:
5195 SoundSoftBushFallingPlay();
5198 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5199 if (m_DebugMonitorValues)
5201 m_DebugMonitorValues.OnRPCFloat(ctx);
5205 case ERPCs.RPC_DEBUG_MONITOR_STR:
5206 if (m_DebugMonitorValues)
5208 m_DebugMonitorValues.OnRPCString(ctx);
5226 #ifdef DIAG_DEVELOPER
5227 case ERPCs.DEV_RPC_AGENT_RESET:
5231 m_AgentPool.RemoveAllAgents();
5235 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5237 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
5238 plugin_remote_server.OnRPC(ctx,
this);
5242 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5244 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
5245 PluginDeveloper plugin_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5246 if (plugin_dev.m_ScriptConsole)
5247 plugin_dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5249 plugin_remote_client.OnRPC(ctx);
5253 case ERPCs.DEV_AGENT_GROW:
5255 m_AgentPool.RemoteGrowRequestDebug(ctx);
5259 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5262 mid.StopWatchRequest(
this);
5267 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5269 PluginUniversalTemperatureSourceServer plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5270 plugin_uts_server.OnRPC(ctx,
this);
5274 case ERPCs.DEV_UTS_DEBUG_DATA:
5276 PluginUniversalTemperatureSourceClient plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5277 plugin_uts_client.OnRPC(ctx);
5284 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5300 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5302 PluginDeveloper dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5303 if (dev.m_ScriptConsole)
5304 dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5308 case ERPCs.DEV_SET_DEV_ITEM:
5310 Param1<EntityAI> ent =
new Param1<EntityAI>(null);
5311 if (ctx.
Read(ent) && ent.param1)
5314 mid2.RegisterDebugItem(ent.param1,
this);
5320 case ERPCs.RPC_ITEM_DIAG:
5322 Param1<EntityAI> p1 =
new Param1<EntityAI>(null);
5326 plgn.OnRPC(p1.param1, ctx);
5333 #ifdef DIAG_DEVELOPER
5334 PluginDeveloper module_rc = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5336 module_rc.OnRPC(
this, rpc_type, ctx);
5338 PluginDeveloperSync module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
5340 module_rcs.OnRPC(
this, rpc_type, ctx);
5348 if (plugin_diag_menu)
5349 plugin_diag_menu.
OnRPC(
this, rpc_type, ctx);
5355 super.OnGameplayDataHandlerSync();
5379 if (m_ContaminatedAreaEffectEnabled == enable)
5384 if (!m_ContaminatedAroundPlayer)
5395 if (!m_ContaminatedAroundPlayerTiny && tinyId !=0)
5403 if (
Class.
CastTo(ppeRequester, PPERequesterBank.GetRequester(ppeIdx)))
5404 ppeRequester.
Start();
5408 if (!m_AmbientContamination && soundset !=
"")
5409 PlaySoundSetLoop(m_AmbientContamination, soundset, 0.1, 0.1);
5411 m_ContaminatedAreaEffectEnabled = enable;
5415 if (m_ContaminatedAroundPlayer)
5417 m_ContaminatedAroundPlayer.
Stop();
5418 m_ContaminatedAroundPlayer = null;
5421 if (m_ContaminatedAroundPlayerTiny)
5423 m_ContaminatedAroundPlayerTiny.
Stop();
5424 m_ContaminatedAroundPlayerTiny = null;
5427 PPERequesterBank.GetRequester(ppeIdx).
Stop(
new Param1<bool>(
true));
5430 if (m_AmbientContamination)
5431 StopSoundSet(m_AmbientContamination);
5434 m_ContaminatedAreaEffectEnabled = enable;
5440 SetContaminatedEffectEx(enable, ppeIdx, aroundId, tinyId,
"", partDynaUpdate, newBirthRate);
5446 UpdateCorpseStateVisual();
5447 if (m_CorpseState > 0)
5449 else if (m_CorpseState < 0)
5451 m_CorpseStateLocal = m_CorpseState;
5457 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
5458 if (!
GetGame().IsDedicatedServer())
5462 ClearLastUAMessage();
5464 if (m_CorpseState != 0)
5475 super.OnVariablesSynchronized();
5476 if (m_ModuleLifespan)
5478 m_ModuleLifespan.SynchLifespanVisual(
this, m_LifeSpanState, m_HasBloodyHandsVisible, m_HasBloodTypeVisible,
m_BloodType);
5480 if (m_LifespanLevelLocal != m_LifeSpanState)
5482 m_LifespanLevelLocal = m_LifeSpanState;
5483 UpdateHairSelectionVisibility();
5488 if (GetBleedingManagerRemote() && IsPlayerLoaded())
5490 GetBleedingManagerRemote().OnVariablesSynchronized(GetBleedingBits());
5493 if (m_CorpseStateLocal != m_CorpseState && (IsPlayerLoaded() || IsControlledPlayer()))
5495 UpdateCorpseState();
5498 if (m_RefreshAnimStateIdx != m_LocalRefreshAnimStateIdx)
5500 RefreshHandAnimationState(396);
5501 m_LocalRefreshAnimStateIdx = m_RefreshAnimStateIdx;
5504 if (m_SyncedModifiers != m_SyncedModifiersPrev)
5506 int diff = (m_SyncedModifiers & ~m_SyncedModifiersPrev) | (~m_SyncedModifiers & m_SyncedModifiersPrev);
5521 m_SyncedModifiersPrev = m_SyncedModifiers;
5525 HandleBrokenLegsSync();
5528 ItemBase itemHands = GetItemInHands();
5542 return (m_SyncedModifiers & m_SyncedModifiersPrev);
5547 if (m_BrokenLegState != m_LocalBrokenState)
5549 m_LocalBrokenState = m_BrokenLegState;
5550 bool initial = (m_BrokenLegState < 0);
5551 int state = GetBrokenLegs();
5575 item.SetHealthMax(
"",
"");
5594 m_QuickBarBase.updateSlotsCount();
5596 m_PlayerSelected =
true;
5598 m_WeaponManager.SortMagazineAfterLoad();
5606 if (m_aQuickBarLoad)
5608 int count = m_aQuickBarLoad.Count();
5609 Param1<int> paramCount =
new Param1<int>(count);
5610 params.Insert(paramCount);
5611 for (
int i = 0; i < count; i++)
5613 m_QuickBarBase.OnSetEntityNoSync(m_aQuickBarLoad.Get(i).param1,m_aQuickBarLoad.Get(i).param2);
5614 params.Insert(m_aQuickBarLoad.Get(i));
5617 if (count > 0 &&
GetGame().IsMultiplayer())
5619 GetGame().
RPC(
this,
ERPCs.RPC_INIT_SET_QUICKBAR, params,
true, GetIdentity());
5621 m_aQuickBarLoad = NULL;
5624 GetSoftSkillsManager().InitSpecialty(GetStatSpecialty().
Get());
5625 GetModifiersManager().SetModifiers(
true);
5629 if (
GetGame().IsMultiplayer())
5632 if (m_ProcessUIWarning)
5635 m_ProcessUIWarning =
false;
5668 m_DeathCheckTimer =
new Timer();
5669 m_DeathCheckTimer.Run(0.1,
this,
"CheckDeath", null,
true);
5683 m_PresenceNotifier.Init(
this);
5688 m_Bot =
new Bot(
this);
5695 super.SimulateDeath(state);
5697 m_UndergroundHandler = null;
5698 if (m_EffectWidgets)
5708 g_Game.GetMenuData().SaveCharacter(
false,
true);
5709 g_Game.GetMenuData().SetCharacterName(
g_Game.GetMenuData().GetLastPlayedCharacter(),
g_Game.GetMenuDefaultCharacterData(
false).GetCharacterName());
5711 g_Game.GetMenuData().SaveCharactersLocal();
5718 BurlapSackCover attachment;
5721 PPERequester_BurlapSackEffects req;
5722 if (
Class.
CastTo(req,PPERequesterBank.GetRequester(PPERequesterBank.REQ_BURLAPSACK)))
5728 else if (req.IsRequesterRunning())
5730 PPERequesterBank.GetRequester(PPERequester_BurlapSackEffects).Stop();
5745 if (item && item.IsObstructingVoice())
5747 item.MutePlayer(
this,
true);
5762 m_EffectWidgets.ResetMaskUpdateCount();
5763 float resistance = 0;
5764 if (mask.HasIntegratedFilter() || mask.IsExternalFilterAttached())
5765 resistance = 1 - mask.GetFilterQuantity01();
5769 m_EffectWidgets.IncreaseMaskUpdateCount();
5777 if (m_EffectWidgets)
5782 UpdateMaskBreathWidget(mask,
true);
5792 if (m_EffectWidgets)
5797 if (m_EffectWidgets.m_MaskWidgetUpdateCount < 2 && callback.
GetLength() > 2 && playback_time > 0.5 )
5798 UpdateMaskBreathWidget(mask);
5807 if (super.OnInputUserDataProcess(userDataType, ctx))
5810 if (m_QuickBarBase.OnInputUserDataProcess(userDataType, ctx))
5813 if (m_WeaponManager.OnInputUserDataProcess(userDataType, ctx))
5816 if (HandleRemoteItemManipulation(userDataType, ctx))
5822 if (TogglePlacingServer(userDataType, ctx))
5825 if (ResetADSPlayerSync(userDataType, ctx))
5832 if (ctx.
Read(uid) && ctx.
Read(mute))
5841 return m_EmoteManager.OnInputUserDataProcess(userDataType, ctx);
5844 return ReadLiftWeaponRequest(userDataType, ctx);
5846 if (m_ActionManager)
5847 return m_ActionManager.OnInputUserDataProcess(userDataType, ctx);
5853 float blood = GetHealth(
"GlobalHealth",
"Blood");
5855 blood_scale_normalized =
Math.
Clamp(blood_scale_normalized,0,1);
5866 bool use_stack_max =
false;
5869 if (!ctx.
Read(type))
5874 if (!ctx.
Read(item1))
5881 if (ctx.
Read(dummy))
5882 item1.SplitItemToInventoryLocation(dst);
5884 item1.SplitIntoStackMaxToInventoryLocation(dst);
5890 if (!ctx.
Read(item1))
5892 if (!ctx.
Read(item2))
5894 if (!ctx.
Read(use_stack_max))
5896 if (!ctx.
Read(slot_id))
5899 if (type == -1 && item1 && item2)
5901 item1.CombineItems(item2, use_stack_max);
5903 else if (type == 1 && item1)
5906 item1.SplitIntoStackMax(item2, slot_id,
this);
5908 item1.SplitItem(
this);
5910 else if (type == 2 && item1)
5917 item1.SplitIntoStackMaxCargo(item2, slot_id, row, col);
5919 else if (type == 3 && item1)
5921 item1.SplitIntoStackMaxHands(
this);
5931 if (GetHumanInventory())
5933 return ItemBase.Cast(GetHumanInventory().GetEntityInHands());
5949 return SpawnAI(object_name, pos);
5968 return SpawnEntityOnGroundPos(object_name, position);
6076 bool can_be_dropped = CanDropEntity(item);
6079 can_be_dropped = PredictiveDropEntity(item);
6086 item.SetPosition(pos_spawn);
6087 item.PlaceOnSurface();
6088 return can_be_dropped;
6180 string t = src.GetType();
6192 MiscGameplayFunctions.TransferItemProperties(src, dst);
6205 return CreateCopyOfItemInInventoryOrGroundEx(src,
false);
6210 ItemBase dst = CreateCopyOfItemInInventory(src);
6213 dst =
ItemBase.Cast(SpawnEntityOnGroundPos(src.GetType(),
this.GetPosition()));
6214 dst.PlaceOnSurface();
6215 dst.SetResultOfSplit(markItemAsSplitResult);
6216 MiscGameplayFunctions.TransferItemProperties(src, dst);
6246 Message(text,
"colorStatusChannel");
6252 Message(text,
"colorAction");
6258 Message(text,
"colorFriendly");
6264 Message(text,
"colorImportant");
6269 if (!
GetGame().IsDedicatedServer())
6299 for (
int i = 0; i < items.Count(); i++)
6302 if (item && !item.IsPlayer())
6308 ItemBase item_in_hands =
ItemBase.Cast(GetHumanInventory().GetEntityInHands());
6312 LocalDestroyEntityInHands();
6323 int count = itemsArray.Count();
6325 for (
int i = 0; i < itemsArray.Count(); i++)
6329 if (item && !item.IsInherited(SurvivorBase))
6331 ServerDropEntity(item);
6349 SetLastShavedSeconds(StatGet(
"playtime"));
6351 m_ModuleLifespan.UpdateLifespan(
this,
true);
6356 if (!HasCoveredFaceForShave() && GetLifeSpanState())
6369 super.OnParticleEvent(pEventType ,pUserString, pUserInt);
6371 if (!
GetGame().IsDedicatedServer())
6373 if (pUserInt == 123456)
6376 int boneIdx = player.GetBoneIndexByName(
"Head");
6392 eff.SetAutodestroy(
true);
6395 player.AddChild(p, boneIdx);
6404 if (!ToDelete() && IsAlive() && !IsSwimming() && !m_IsDrowning)
6414 if (m_AddModifier != -1)
6418 ad.StartModifier(m_AddModifier);
6431 switch (m_BreathVapour)
6455 vector pos = GetBonePositionWS(index);
6456 float depth =
g_Game.GetWaterDepth(pos);
6462 else if (IsUnconscious())
6472 if (show_state != m_LifeSpanState)
6473 state_changed =
true;
6474 m_LifeSpanState = show_state;
6481 UpdateHairSelectionVisibility();
6487 return m_LifeSpanState;
6492 return m_LastShavedSeconds;
6497 m_LastShavedSeconds = last_shaved_seconds;
6502 return m_FaceCoveredForShaveLayers > 0 || IsExclusionFlagPresent(GetFaceCoverageShaveValues());
6508 set<int> ret =
new set<int>;
6509 ret.Insert(EAttExclusions.SHAVING_MASK_ATT_0);
6510 ret.Insert(EAttExclusions.SHAVING_HEADGEAR_ATT_0);
6517 return m_HasBloodyHandsVisible;
6522 return m_HasBloodyHandsVisible;
6527 SetBloodyHandsBase(show);
6532 SetBloodyHandsBase(type);
6537 m_HasBloodyHandsVisible = type;
6540 #ifdef DIAG_DEVELOPER
6542 if (IsControlledPlayer())
6558 return m_HasBloodTypeVisible;
6563 m_HasBloodTypeVisible = show;
6584 return m_SoftSkillsManager;
6589 if (IsPlayerSelected() && !IsAlive())
6591 SimulateDeath(
true);
6592 m_DeathCheckTimer.Stop();
6605 if (m_PresenceNotifier)
6607 return m_PresenceNotifier.GetNoisePresence();
6616 return (m_PersistentFlags & bit);
6622 m_PersistentFlags = (m_PersistentFlags | bit);
6624 m_PersistentFlags = ((~bit) & m_PersistentFlags);
6633 return m_StoreLoadVersion;
6639 if (
GetGame().SaveVersion() < 102)
6641 ctx.
Write(ACT_STORE_SAVE_VERSION);
6644 super.OnStoreSave(ctx);
6646 GetHumanInventory().OnStoreSave(ctx);
6647 OnStoreSaveLifespan(ctx);
6651 GetPlayerStats().SaveStats(ctx);
6652 m_ModifiersManager.OnStoreSave(ctx);
6653 m_AgentPool.OnStoreSave(ctx);
6654 GetSymptomManager().OnStoreSave(ctx);
6655 if (GetBleedingManagerServer())
6657 GetBleedingManagerServer().OnStoreSave(ctx);
6659 m_PlayerStomach.OnStoreSave(ctx);
6660 ctx.
Write(GetBrokenLegs());
6662 SaveAreaPersistenceFlag(ctx);
6676 arrowManager.
Save(ctx);
6683 if (GetModifiersManager())
6685 ctx.
Write(m_PersistentFlags);
6697 if (!ctx.
Read(m_StoreLoadVersion))
6701 if (!super.OnStoreLoad(ctx, version))
6705 if (!GetHumanInventory().
OnStoreLoad(ctx, version))
6708 if (!OnStoreLoadLifespan(ctx, version))
6713 if (!GetPlayerStats().LoadStats(ctx, version))
6715 Print(
"---- failed to load PlayerStats ----");
6719 if (version < m_ModifiersManager.GetStorageVersion())
6721 Print(
"---- failed to load ModifiersManager, unsupported version ----");
6726 if (!m_ModifiersManager.OnStoreLoad(ctx, version))
6728 Print(
"---- failed to load ModifiersManager, read fail ----");
6733 if (version < m_AgentPool.GetStorageVersion())
6735 Print(
"---- failed to load AgentPool, unsupported version ----");
6740 if (!m_AgentPool.OnStoreLoad(ctx, version))
6742 Print(
"---- failed to load AgentPool, read fail ----");
6750 Print(
"---- failed to load SymptomManager, unsupported version ----");
6755 if (!GetSymptomManager().
OnStoreLoad(ctx, version))
6757 Print(
"---- failed to load SymptomManager, read fail ----");
6764 Print(
"---- failed to load BleedingManagerServer, unsupported version ----");
6769 if (!GetBleedingManagerServer().
OnStoreLoad(ctx, version))
6771 Print(
"---- failed to load BleedingManagerServer, read fail ----");
6776 if (version < m_PlayerStomach.GetStorageVersion())
6778 Print(
"---- failed to load PlayerStomach, unsupported version ----");
6783 if (!m_PlayerStomach.OnStoreLoad(ctx, version))
6785 Print(
"---- failed to load PlayerStomach, read fail ----");
6793 if (!ctx.
Read(m_BrokenLegState))
6799 if (!ctx.
Read(m_LocalBrokenState))
6806 if (version >= 125 && (!ctx.
Read(m_PersistentFlags)))
6808 Print(
"---- failed to load Persistent Flags, read fail ----");
6815 if (!ctx.
Read(onLadder))
6823 if (!ctx.
Read(position))
6835 arrowManager.
Load(ctx);
6839 Print(
"---- PlayerBase OnStoreLoad SUCCESS ----");
6845 GetHumanInventory().OnAfterStoreLoad();
6848 m_EmoteManager.AfterStoreLoad();
6854 ctx.
Write(m_LifeSpanState);
6855 ctx.
Write(m_LastShavedSeconds);
6856 ctx.
Write(m_HasBloodyHandsVisible);
6857 ctx.
Write(m_HasBloodTypeVisible);
6863 int lifespan_state = 0;
6864 if (!ctx.
Read(lifespan_state))
6866 m_LifeSpanState = lifespan_state;
6868 int last_shaved = 0;
6869 if (!ctx.
Read(last_shaved))
6871 m_LastShavedSeconds = last_shaved;
6875 bool bloody_hands_old;
6876 if (!ctx.
Read(bloody_hands_old))
6878 m_HasBloodyHandsVisible = bloody_hands_old;
6882 int bloody_hands = 0;
6883 if (!ctx.
Read(bloody_hands))
6885 m_HasBloodyHandsVisible = bloody_hands;
6889 bool blood_visible =
false;
6890 if (!ctx.
Read(blood_visible))
6892 m_HasBloodTypeVisible = blood_visible;
6895 if (!ctx.
Read(blood_type))
6905 int hour, minute, second;
6908 distance = StatGet(
"playtime");
6909 if (m_AnalyticsTimer)
6932 if (m_AnalyticsTimer)
6933 m_AnalyticsTimer.Run(60,
this,
"UpdatePlayerMeasures", null,
true);
6936 ResetConstructionActionData();
6945 ResetConstructionActionData();
6962 if (m_AnalyticsTimer)
6963 m_AnalyticsTimer.Stop();
6964 UpdatePlayerMeasures();
6966 SetPlayerDisconnected(
true);
6971 GetModifiersManager().SetModifiers(enable);
6976 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
6982 agents = agents |
eAgents.CHOLERA;
6996 agents = edible_item.GetAgents();
7009 if (edible_item.IsLiquidContainer())
7011 int liquid_type = edible_item.GetLiquidType();
7013 if (liquidClassName.
Length() == 0)
7014 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edible_item) +
" consume_type=" + consume_type +
" liquid_type=" + liquid_type);
7015 m_PlayerStomach.AddToStomach(liquidClassName, amount, 0, agents);
7019 int food_stage_type;
7020 if (edible_item.GetFoodStage())
7022 food_stage_type = edible_item.GetFoodStage().GetFoodStageType();
7024 m_PlayerStomach.AddToStomach(source.GetType(), amount, food_stage_type, agents);
7026 edible_item.Consume(amount,
this);
7091 PlaySoundEventEx(
id,
false,
false, param);
7094 SendSoundEventEx(
id, param);
7099 RequestSoundEventEx(
id, from_server_and_client);
7104 SendSoundEventEx(
id);
7114 m_SoundEventParam = param;
7117 if (!
GetGame().IsMultiplayer())
7127 if (m_SoundEvent != 0 && m_SoundEventSent)
7130 m_SoundEventParam = 0;
7131 m_SoundEventSent =
false;
7138 if (m_SoundEvent!= 0 && !m_SoundEventSent)
7140 m_SoundEventSent =
true;
7146 return PlaySoundEventEx(
id, from_anim_system, is_from_server);
7151 if (!m_PlayerSoundEventHandler)
7154 return m_PlayerSoundEventHandler.PlayRequestEx(
id, is_from_server, param);
7159 return m_PlayerSoundEventHandler;
7167 m_BleedingSourceCount++;
7168 if (IsControlledPlayer())
7170 if (!
GetGame().IsDedicatedServer())
7175 dis_elm.SetValue(GetBleedingSourceCount());
7187 m_BleedingSourceCount--;
7191 if (GetBleedingSourceCount() > 0)
7201 if (IsControlledPlayer())
7203 if (!
GetGame().IsDedicatedServer())
7209 dis_elm.SetValue(GetBleedingSourceCount());
7220 OnBleedingSourceRemoved();
7226 if (!
GetGame().IsMultiplayer())
7227 return m_BleedingSourceCount / 2;
7228 return m_BleedingSourceCount;
7234 #ifdef DIAG_DEVELOPER
7240 GetStomach().ClearContents();
7243 if (m_BleedingManagerServer)
7244 m_BleedingManagerServer.RemoveAllSources();
7247 bool hasAreaExposureModifier, hasMaksModifier;
7248 if (GetModifiersManager())
7250 hasAreaExposureModifier = GetModifiersManager().IsModifierActive(
eModifiers.MDF_AREAEXPOSURE);
7251 hasMaksModifier = GetModifiersManager().IsModifierActive(
eModifiers.MDF_MASK);
7252 GetModifiersManager().DeactivateAllModifiers();
7254 if (hasAreaExposureModifier)
7255 GetModifiersManager().ActivateModifier(
eModifiers.MDF_AREAEXPOSURE);
7257 if (hasMaksModifier)
7258 GetModifiersManager().ActivateModifier(
eModifiers.MDF_MASK);
7262 if (GetPlayerStats())
7264 int bloodType = GetStatBloodType().Get();
7265 GetPlayerStats().ResetAllStats();
7266 GetStatBloodType().Set(bloodType);
7274 m_AgentPool.RemoveAllAgents();
7278 DamageSystem.GetDamageZoneMap(
this, zones);
7279 SetHealth(
"",
"Health", GetMaxHealth(
"",
"Health"));
7280 SetHealth(
"",
"Shock", GetMaxHealth(
"",
"Shock"));
7281 SetHealth(
"",
"Blood", GetMaxHealth(
"",
"Blood"));
7283 for (
int i = 0; i < zones.Count(); i++)
7285 string zone = zones.GetKey(i);
7286 SetHealth(zone,
"Health", GetMaxHealth(zone,
"Health"));
7287 SetHealth(zone,
"Shock", GetMaxHealth(zone,
"Shock"));
7288 SetHealth(zone,
"Blood", GetMaxHealth(zone,
"Blood"));
7292 if (IsUnconscious())
7298 GetStatWater().Set(GetStatWater().
GetMax());
7299 GetStatEnergy().Set(GetStatEnergy().
GetMax());
7304 FixAllInventoryItems();
7333 if (m_SoundEvent != 0)
7335 PlaySoundEventEx(m_SoundEvent,
false,
true,m_SoundEventParam);
7337 m_SoundEventParam = 0;
7343 if (
GetGame().IsClient())
return;
7344 RequestSoundEvent(1234);
7350 if (state != m_StaminaState)
7352 m_StaminaState = state;
7360 return m_StaminaState;
7365 m_QuickBarBase.updateSlotsCount();
7371 if (GetPlayerState() ==
EPlayerStates.ALIVE && !IsRestrained())
7394 float dist_check = distance * distance;
7395 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7397 foreach (Man target: m_ServerPlayers)
7399 if (
vector.
DistanceSq(GetWorldPosition(), target.GetWorldPosition()) < dist_check && target !=
this)
7408 SpreadAgentsEx(3,1);
7414 return m_AgentPool.GetAgents();
7420 m_AgentPool.RemoveAgent(agent_id);
7426 m_AgentPool.RemoveAllAgents();
7433 m_AgentPool.AddAgent(agent,count);
7439 return m_AgentPool.GetSingleAgentCount(agent_id);
7445 int max_count = PluginTransmissionAgents.GetAgentMaxCount(agent_id);
7446 return m_AgentPool.GetSingleAgentCount(agent_id) / max_count;
7451 return m_AgentPool.GetTotalAgentCount();
7456 m_AgentPool.PrintAgents();
7461 m_AgentPool.ImmuneSystemTick(value, deltaT);
7466 m_AgentPool.AntibioticsAttack(value);
7472 float min_distance = 0.5;
7478 int contactComponent;
7480 DayZPhysics.
RaycastRV(from, to, contactPos, contactDir, contactComponent, NULL, NULL, NULL,
false,
true);
7489 return (!mask || (mask && mask.AllowFoodConsumption()));
7495 return m_ModifiersManager;
7500 if (!m_StatWater && GetPlayerStats())
7509 if (!m_StatToxicity && GetPlayerStats())
7513 return m_StatToxicity;
7518 if (!m_StatEnergy && GetPlayerStats())
7522 return m_StatEnergy;
7527 if (!m_StatHeatComfort && GetPlayerStats())
7531 return m_StatHeatComfort;
7536 if (!m_StatTremor && GetPlayerStats())
7540 return m_StatTremor;
7545 if (!m_StatWet && GetPlayerStats())
7554 if (!m_StatDiet && GetPlayerStats())
7563 if (!m_StatStamina && GetPlayerStats())
7567 return m_StatStamina;
7572 if (!m_StatSpecialty && GetPlayerStats())
7576 return m_StatSpecialty;
7581 if (!m_StatBloodType && GetPlayerStats())
7585 return m_StatBloodType;
7590 if (!m_StatHeatBuffer && GetPlayerStats())
7594 return m_StatHeatBuffer;
7599 m_HasHeatBuffer = show;
7606 return m_UALastMessage;
7611 m_UALastMessage = pMsg;
7613 if (m_UALastMessageTimer.IsRunning())
7615 m_UALastMessageTimer.Stop();
7623 if (m_UALastMessageTimer.IsRunning())
7625 m_UALastMessageTimer.Stop();
7628 m_UALastMessage =
"";
7637 m_InjuryHandler.CheckValue(
true);
7643 PluginTransmissionAgents pluginTransmissionAgents = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7647 map<int,string> agentList = pluginTransmissionAgents.GetSimpleAgentList();
7649 for (
int i = 0; i < agentList.Count(); i++)
7651 name = agentList.GetElement(i);
7652 id = agentList.GetKey(i);
7666 super.OnSyncJuncture(pJunctureID, pCtx);
7674 m_InjuryHandler.SetInjuryCommandParams(enable, level);
7677 GetSymptomManager().SetAnimation(pCtx);
7680 OnQuickbarSetEntityRequest(pCtx);
7683 GetInventory().OnInventoryJunctureFromServer(pCtx);
7686 GetInventory().OnInventoryJunctureRepairFromServer(pCtx);
7689 GetInventory().OnInventoryJunctureFailureFromServer(pCtx);
7694 m_ActionManager.OnSyncJuncture(pJunctureID,pCtx);
7699 m_WeaponManager.OnSyncJuncture(pJunctureID,pCtx);
7705 GetSymptomManager().SetAnimation(pCtx);
7711 if (GetAimingModel() && IsFireWeaponRaised())
7713 GetAimingModel().RequestKuruShake(amount);
7718 m_EmoteManager.OnSyncJuncture(pJunctureID, pCtx);
7721 SetLiftWeapon(pJunctureID, pCtx);
7730 m_BrokenLegsJunctureReceived =
true;
7746 SetGetInVehicleDebug(car);
7754 return m_ItemsToDelete.Count() > 0;
7761 AddItemToDelete(item);
7768 item.SetPrepareToDelete();
7769 m_ItemsToDelete.Insert(item);
7785 int count = m_ItemsToDelete.Count();
7788 if (CanDeleteItems())
7795 for (
int i = count - 1; i >= 0 ; i--)
7797 itemToDelete = m_ItemsToDelete.Get(i);
7798 if (itemToDelete != null)
7800 itemToDelete.GetInventory().GetCurrentInventoryLocation(il);
7805 m_ItemsToDelete.Remove(i);
7811 for (
int j = count - 1; j >= 0 ; j--)
7813 itemToDelete = m_ItemsToDelete.Get(j);
7814 if (itemToDelete == null)
7816 m_ItemsToDelete.Remove(j);
7820 itemToDelete.Delete();
7821 m_ItemsToDelete.Remove(j);
7842 m_fLastHeadingDiff = 0;
7847 return super.HeadingModel(pDt, pModel);
7852 return m_InventorySoftLocked;
7857 m_InventorySoftLocked = status;
7862 if (m_aQuickBarLoad)
7868 return m_LiftWeapon_player;
7890 m_ProcessLiftWeaponState = state;
7891 m_ProcessLiftWeapon =
true;
7901 if (!
GetGame().IsMultiplayer())
7903 m_LiftWeapon_player = state;
7909 GetWeaponManager().OnLiftWeapon();
7938 bool limited = weap.LiftWeaponCheck(
this);
7940 if (limited && !m_LiftWeapon_player)
7941 SendLiftWeaponSync(
true);
7942 else if (!limited && m_LiftWeapon_player)
7943 SendLiftWeaponSync(
false);
7945 else if (m_LiftWeapon_player)
7947 SendLiftWeaponSync(
false);
7954 if (m_ProcessLiftWeapon)
7960 GetWeaponManager().OnLiftWeapon();
7961 m_LiftWeapon_player = m_ProcessLiftWeaponState;
7962 m_ProcessLiftWeapon =
false;
7971 super.HideClothing(optic, state);
7988 SetInvisibleRecursive(
true,
this,clothingArray);
7998 SetInvisibleRecursive(
false,
this,clothingArray);
8010 super.SetDeathDarknessLevel(duration, tick_time);
8012 if (IsControlledPlayer())
8014 float actual_tick = tick_time;
8015 if (GetDamageDealtEffect())
8016 m_DamageDealtEffect = null;
8018 if (GetFlashbangEffect())
8019 m_FlashbangEffect = null;
8023 progress = 1 - ((duration - m_DeathDarkeningCurrentTime) / duration);
8025 m_DeathDarkeningCurrentTime += actual_tick;
8027 if (!IsAlive() && IsPlayerSelected())
8029 m_DeathDarkeningParam.param1 = progress;
8030 PPERequesterBank.GetRequester(PPERequester_DeathDarkening).Start(m_DeathDarkeningParam);
8033 if (m_DeathDarkeningCurrentTime >= duration)
8035 StopDeathDarkeningEffect();
8040 StopDeathDarkeningEffect();
8048 if ((m_EmoteManager.m_Callback && m_EmoteManager.m_Callback.m_IsFullbody) || m_EmoteManager.m_IsSurrendered)
8059 m_EmoteManager.EndSurrenderRequest(data);
8065 return m_EmoteManager.m_IsSurrendered;
8072 return m_PlayerLoaded;
8079 if (IsInFBEmoteState() && IsControlledPlayer() && IsPlayerSelected())
8081 OverrideSlidePoseAngle(
Math.
PI2);
8083 else if (!IsInFBEmoteState() && IsControlledPlayer() && IsPlayerSelected())
8085 OverrideSlidePoseAngle(m_OriginalSlidePoseAngle);
8097 isActionPossible =
false;
8098 Magazine mag = Magazine.Cast(item);
8102 if (GetWeaponManager().CanDetachMagazine(wpn, mag))
8105 isActionPossible =
true;
8120 if (CanRedirectToWeaponManager(item,can_detach))
8123 if (can_detach && target.GetInventory().FindFreeLocationFor(item, flags, il))
8125 return GetWeaponManager().DetachMagazine(il);
8129 return super.PredictiveTakeEntityToTargetInventory(target, flags, item);
8135 if (CanRedirectToWeaponManager(item,can_detach))
8138 if (can_detach && GetInventory().FindFreeLocationFor(item, flags, il))
8140 return GetWeaponManager().DetachMagazine(il);
8144 return super.PredictiveTakeEntityToInventory(flags, item);
8150 Magazine mag = Magazine.Cast(item);
8151 if (parentWpn && mag)
8153 if (GetWeaponManager().CanAttachMagazine(parentWpn, mag))
8154 return GetWeaponManager().AttachMagazine(mag);
8158 return super.PredictiveTakeEntityToTargetAttachment(target, item);
8164 Magazine mag = Magazine.Cast(item);
8165 if (parentWpn && mag)
8167 if (target.CanReceiveAttachment(item,slot) && GetWeaponManager().CanAttachMagazine(parentWpn, mag))
8168 return GetWeaponManager().AttachMagazine(mag);
8172 return super.PredictiveTakeEntityToTargetAttachmentEx(target, item,slot);
8178 if (CanRedirectToWeaponManager(item,can_detach))
8183 return GetWeaponManager().DetachMagazine(il);
8187 return super.PredictiveTakeEntityToTargetCargo(target,item);
8193 if (CanRedirectToWeaponManager(item, can_detach))
8198 dst.
SetCargoAuto(cargo, item, row, col, item.GetInventory().GetFlipCargo());
8200 return GetWeaponManager().DetachMagazine(dst);
8204 return super.PredictiveTakeEntityToTargetCargoEx (cargo, item, row, col);
8210 if (CanRedirectToWeaponManager(item,can_detach))
8221 return GetWeaponManager().DetachMagazine(il);
8225 return super.PredictiveDropEntity(item);
8232 Magazine swapmag1 = Magazine.Cast(item1);
8233 Magazine swapmag2 = Magazine.Cast(item2);
8235 if (swapmag1 && swapmag2)
8239 if (
Class.
CastTo(parentWpn, swapmag1.GetHierarchyParent()))
8241 if (GetWeaponManager().CanSwapMagazine(parentWpn, swapmag2))
8243 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag1=" + swapmag1);
8244 return GetWeaponManager().SwapMagazine(swapmag2);
8248 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
8253 if (
Class.
CastTo(parentWpn, swapmag2.GetHierarchyParent()))
8255 if (GetWeaponManager().CanSwapMagazine(parentWpn, swapmag1))
8257 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag2=" + swapmag2);
8258 return GetWeaponManager().SwapMagazine(swapmag1);
8262 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
8270 if (IsSwapBetweenHandsAndGroundLargeItem(item1,item2,item_hands,item_ground) && !m_ActionManager.GetRunningAction())
8273 CastTo(mngr_client,m_ActionManager);
8276 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item_hands)))
8281 return super.PredictiveSwapEntities(item1, item2);
8284 return super.PredictiveSwapEntities(item1, item2);
8292 if (item1.IsHeavyBehaviour() && item1.GetInventory().GetCurrentInventoryLocation(il) && il.
GetType() ==
InventoryLocationType.GROUND && !m_ActionManager.GetRunningAction())
8296 CastTo(mngr_client,m_ActionManager);
8299 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item2)))
8306 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
8311 if (item.IsHeavyBehaviour() && !m_ActionManager.GetRunningAction() && !item.GetHierarchyParent())
8314 if (CastTo(mngr_client,m_ActionManager))
8328 super.PredictiveTakeEntityToHands(item);
8338 if (CanRedirectToWeaponManager(item,can_detach))
8342 return GetWeaponManager().DetachMagazine(dst);
8359 item_ground = item1;
8361 item_ground = item2;
8363 return item_hands && item_ground && item_ground.IsHeavyBehaviour();
8372 if (!m_CharactersHead)
8374 ErrorEx(
"No valid head detected on character!");
8380 m_HideHairAnimated = !m_HideHairAnimated;
8381 for (
int i = 0; i < m_CharactersHead.m_HeadHairSelectionArray.Count(); ++i)
8386 m_CharactersHead.m_HeadHairHidingStateMap.Set(i, stt);
8387#ifdef DIAG_DEVELOPER
8390 diagmenu.m_HairHidingStateMap.Set(i, m_HideHairAnimated);
8400#ifdef DIAG_DEVELOPER
8403 switchState = !diagmenuu.m_HairHidingStateMap.Get(level);
8404 diagmenuu.m_HairHidingStateMap.Set(level, switchState);
8410 switchState = !state;
8415 m_CharactersHead.m_HeadHairHidingStateMap.Set(level, stt);
8421 if (!item || !item.GetHeadHidingSelection() || !m_CharactersHead)
8430 item.GetInventory().GetCurrentAttachmentSlotInfo(slot_id,slot_name);
8432 if (item.HidesSelectionBySlot())
8434 count = item.GetInventory().GetSlotIdCount();
8435 for (i = 0; i < count; i++)
8437 if (item.GetInventory().GetSlotId(i) == slot_id)
8439 str = item.GetHeadHidingSelection().Get(i);
8440 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(str);
8441 SetHairLevelToHide(idx,state);
8447 count = item.GetHeadHidingSelection().Count();
8448 for (i = 0; i < count; i++)
8450 str = item.GetHeadHidingSelection().Get(i);
8451 idx = m_CharactersHead.m_HeadHairSelectionArray.Find(str);
8452 SetHairLevelToHide(idx,state);
8455 UpdateHairSelectionVisibility();
8460 if (!m_CharactersHead)
8463 bool exception_hidden =
false;
8465 int count = m_CharactersHead.m_HeadHairHidingStateMap.Count();
8469 if (IsMale() && m_CharactersHead.GetBeardIndex() > -1 && !was_debug)
8471 SetHairLevelToHide(m_CharactersHead.GetBeardIndex(),GetLifeSpanState() != LifeSpanState.BEARD_EXTRA);
8475 for (i = 0; i < count; i++)
8477 m_CharactersHead.SetSimpleHiddenSelectionState(i,
true);
8480 for (i = 0; i < count; i++)
8482 stt = m_CharactersHead.m_HeadHairHidingStateMap.Get(i);
8486 if (!m_CharactersHead.IsHandlingException())
8488 m_CharactersHead.SetSimpleHiddenSelectionState(i,shown);
8489 UpdateTranslatedSelections(stt);
8494 exception_hidden =
true;
8500 if (exception_hidden)
8502 m_CharactersHead.SetSimpleHiddenSelectionState(m_CharactersHead.GetHairIndex(),
false);
8504 m_CharactersHead.SetSimpleHiddenSelectionState(m_CharactersHead.GetBeardIndex(),
false);
8512 for (
int i = 0; i < translatedSelectinosArray.Count(); i++)
8514 index = translatedSelectinosArray.Get(i);
8516 m_CharactersHead.SetSimpleHiddenSelectionState(index,
false);
8526 HideHairSelections(headgear,
true);
8527 HideHairSelections(mask,
true);
8532 return m_ActiveNVTypes && m_ActiveNVTypes.Count() > 0;
8537 return m_LoweredNVGHeadset;
8542 if (!m_ActiveNVTypes || m_ActiveNVTypes.Count() == 0)
8548 return m_ActiveNVTypes[m_ActiveNVTypes.Count() - 1];
8554 return m_ActiveNVTypes;
8561 AddActiveNV(
NVTypes.NV_GOGGLES);
8566 m_LoweredNVGHeadset = state;
8571 if (!m_ActiveNVTypes || (
GetGame().IsMultiplayer() &&
GetGame().IsServer()))
8574 Error(
"AddActiveNV | illegal server-side call!");
8580 if (m_ActiveNVTypes.Find(type) == -1)
8581 m_ActiveNVTypes.Insert(type);
8586 if (!m_ActiveNVTypes || (
GetGame().IsMultiplayer() &&
GetGame().IsServer()))
8589 Error(
"RemoveActiveNV | illegal server-side call!");
8595 if (m_ActiveNVTypes.Find(type) != -1)
8596 m_ActiveNVTypes.RemoveItem(type);
8601 m_ActiveNVTypes.Clear();
8607 string text = super.GetDebugText();
8624 void DEBUGRotateNVG()
8628 if (FindAttachmentBySlotName(
"Eyewear"))
8630 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Eyewear").FindAttachmentBySlotName(
"NVG"));
8632 else if (FindAttachmentBySlotName(
"Headgear"))
8634 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Headgear").FindAttachmentBySlotName(
"NVG"));
8639 nvg.RotateGoggles(nvg.m_IsLowered);
8648 if (slot_name ==
"Headgear")
8650 item.SetSimpleHiddenSelectionState(0,1);
8651 item.SetSimpleHiddenSelectionState(1,0);
8653 else if (slot_name ==
"Mask")
8655 item.SetSimpleHiddenSelectionState(0,0);
8656 item.SetSimpleHiddenSelectionState(1,1);
8677 for (
int i = 0; i < bodyparts.Count(); i++)
8680 bodypart = GetInventory().FindPlaceholderForSlot(slot_id);
8681 item =
ItemBase.Cast(GetInventory().FindAttachment(slot_id));
8685 path =
"cfgVehicles " + bodypart.GetType();
8686 idx = bodypart.GetHiddenSelectionIndex(
"personality");
8689 bodypart.SetObjectTexture(idx,m_DecayedTexture);
8694 path =
"cfgVehicles " + item.GetType();
8695 idx = item.GetHiddenSelectionIndex(
"personality");
8698 item.SetObjectTexture(idx,m_DecayedTexture);
8703 SetFaceTexture(m_DecayedTexture);
8721 m_FliesEff.SetDecalOwner(
this);
8723 p = m_FliesEff.GetParticle();
8725 if (!m_SoundFliesEffect)
8727 PlaySoundSetLoop(m_SoundFliesEffect,
"Flies_SoundSet", 1.0, 1.0);
8739 m_FliesEff.SetDecalOwner(
this);
8741 p = m_FliesEff.GetParticle();
8743 if (!m_SoundFliesEffect)
8745 PlaySoundSetLoop(m_SoundFliesEffect,
"Flies_SoundSet", 1.0, 1.0);
8754 StopSoundSet(m_SoundFliesEffect);
8764 idx = GetHiddenSelectionIndex(
"decay_preload");
8767 SetObjectTexture(idx,m_DecayedTexture);
8778 m_LastMapScale = scale;
8784 scale = m_LastMapScale;
8787 return m_LastMapScale != -1.0;
8795 if (GetItemInHands() == item)
8798 return PredictiveDropEntity(item);
8800 if (entity.ConfigGetString(
"physLayer") !=
"item_large" && heavy_item_only)
8802 return PredictiveDropEntity(item);
8808 return GetHumanInventory().ThrowEntity(item,dir,0);
8814 if (CastTo(mngr_client,m_ActionManager))
8833 m_ProcessUIWarning = state;
8849 legZones.Insert(
"LeftLeg");
8850 legZones.Insert(
"RightLeg");
8851 legZones.Insert(
"RightFoot");
8852 legZones.Insert(
"LeftFoot");
8854 for (
int i = 0; i < legZones.Count(); i++)
8856 DecreaseHealth(legZones[i],
"",inputDmg);
8876 float stackable = item.GetTargetQuantityMax();
8877 if (!(stackable == 0 || stackable >= item.GetQuantity()))
8880 if (target && target.GetInventory().FindFreeLocationFor(item, flags, il))
8883 if (CastTo(itemB, item))
8885 itemB.SplitIntoStackMaxToInventoryLocationClient(il);
8895 float stackable = item.GetTargetQuantityMax();
8896 if (!(stackable == 0 || stackable >= item.GetQuantity()))
8899 if (CastTo(itemB, item))
8901 itemB.SplitIntoStackMaxToInventoryLocationClient(il);
8910 if (CheckAndExecuteStackSplit(flags, item,
this))
8916 return super.TakeEntityToInventoryImpl(mode, flags, item);
8927 return super.TakeEntityToCargoImpl(mode, item);
8938 return super.TakeEntityAsAttachmentImpl(mode, item);
8949 super.TakeEntityToHandsImpl(mode, item);
8954 if (CheckAndExecuteStackSplit(flags, item, target))
8960 return super.TakeEntityToTargetInventoryImpl(mode, target, flags, item);
8971 return super.TakeEntityToTargetCargoImpl(mode, target, item);
8982 return super.TakeEntityToTargetAttachmentImpl(mode, target, item);
8987 if (CheckAndExecuteStackSplitToInventoryLocation(dst, dst.GetItem()))
8993 return super.TakeToDstImpl(mode, src, dst);
9005 if (
GetCommand_Move() && m_ContaminatedAroundPlayer && m_ContaminatedAroundPlayerTiny)
9013 float particleLifetime = 5.25;
9014 float particleSpeed = 0.25;
9015 if (playerSpeed >= 1)
9017 particleLifetime = 3.5;
9018 particleSpeed = 3.25;
9020 if (playerSpeed >= 2)
9022 particleLifetime = 2.5;
9023 particleSpeed = 5.25;
9025 if (playerSpeed >= 3)
9027 particleLifetime = 1.5;
9028 particleSpeed = 8.25;
9037 GetTransform(transform);
9038 m_ContaminatedAroundPlayer.SetTransform(transform);
9039 m_ContaminatedAroundPlayerTiny.SetTransform(transform);
9045 if (!IsControlledPlayer())
9049 if (m_ProcessRemoveGlassesEffects)
9051 for (i = 0; i < m_ProcessRemoveGlassesEffects.Count(); i++)
9053 PPERequesterBank.GetRequester(m_ProcessRemoveGlassesEffects[i]).Stop();
9055 m_ProcessRemoveGlassesEffects.Clear();
9058 if (m_ProcessAddGlassesEffects)
9060 for (i = 0; i < m_ProcessAddGlassesEffects.Count(); i++)
9062 PPERequesterBank.GetRequester(m_ProcessAddGlassesEffects[i]).Start();
9064 m_ProcessAddGlassesEffects.Clear();
9073 int pivot = componentIndex;
9089 vector parentTransMat[4];
9092 arrow.GetTransform(arrowTransMat);
9103 parentTransMat[0] = rotMatrix[0];
9104 parentTransMat[1] = rotMatrix[1];
9105 parentTransMat[2] = rotMatrix[2];
9106 parentTransMat[3] = closeBonePosWS;
9111 arrow.SetTransform(arrowTransMat);
9117 BleedingSourcesManagerServer bleedingManager = GetBleedingManagerServer();
9118 if (bleedingManager)
9120 if (!bleedingManager.AttemptAddBleedingSourceBySelection(compName))
9121 bleedingManager.AttemptAddBleedingSourceBySelection(
"Pelvis");
void syncDebugPrint(string s)
eBleedingSourceType GetType()
void ActionDrinkPondContinuous()
void ActionGetOutTransport()
Param4< int, int, string, int > TSelectableActionInfoWithColor
void ActionManagerBase(PlayerBase player)
map< typename, ref array< ActionBase_Basic > > TInputActionMap
void ActionStartEngine()
DEPRECATED.
class ActionTargets ActionTarget
ActionUncoverHeadBase ActionContinuousBase ActionUncoverHeadSelf()
ActionWashHandsWaterCB ActionContinuousBaseCB ActionWashHandsWater()
WorldCraftActionReciveData m_RecipeID
TInputActionMap m_InputActionMap
void AddAction(typename actionName)
void RemoveAction(typename actionName)
protected 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
protected void GetActionManager()
map< string, ref array< string > > DamageZoneMap
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)
protected ref DayZPlayerImplementMeleeCombat m_MeleeCombat
private 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()
override string GetDebugName()
Gets the debug name for the ParticleManager.
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()
protected 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)
protected PlayerBase _player
void RandomGeneratorSyncManager(DayZPlayer player)
class SoundObjectBuilder SoundObject(SoundParams soundParams)
void StaminaHandler(PlayerBase player)
float GetSyncedStaminaNormalized()
float GetStaminaNormalized()
void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
StaminaHandler m_StaminaHandler
class JsonUndergroundAreaTriggerData GetPosition
void UndergroundHandlerClient(PlayerBase player)
proto float GetLength()
WARNING: Blocking! Waits for header to load.
static string GetPulseMessage(EPulseType pulse_type, int blood_level)
const int TARGET_IRREGULAR_PULSE_BIT
void RequestInterruptAction()
client requests action interrupt
void PerformActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
override void RequestEndAction()
void PerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
bool CanPerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
override void EndActionInput()
override void Interrupt()
void ForceTarget(Object targetObject)
static void PlayerDisconnected(StatsEventDisconnectedData data)
static void PlayerMeasures(StatsEventMeasuresData data)
void OnItemAttachedAtPlayer(EntityAI item, string slot_name)
void OnPlayerConnect(Man player)
void OnEntityHit(EntityAI source, Man target)
void OnPlayerDisconnect(Man player)
bool Load(ParamsReadContext ctx)
bool Save(ParamsWriteContext ctx)
static SoundOnVehicle SaySound(Object source, string sound_name, float distance, bool looped)
proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType)
proto native void ObjectDelete(Object obj)
proto native void SetVoiceEffect(Object player, int effect, bool enable)
Enable/disable VoN effect (only on server)
proto native vector GetCurrentCameraDirection()
proto native Mission GetMission()
AnalyticsManagerServer GetAnalyticsServer()
proto native void RPC(Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto native void Chat(string text, string colorClass)
Prints text into game chat.
proto native void GetPlayers(out array< Man > players)
proto native AbstractSoundScene GetSoundScene()
override ScriptCallQueue GetCallQueue(int call_category)
AnalyticsManagerClient GetAnalyticsClient()
proto native MenuData GetMenuData()
Return singleton of MenuData class - at main menu contains characters played with current profile.
proto native void MutePlayer(string muteUID, string playerUID, bool mute)
Mutes voice of source player to target player.
proto native int ConfigGetInt(string path)
Get int value from config on path.
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
proto native void EnableVoN(Object player, bool enable)
Enable/disable VoN for target player.
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
proto void ObjectGetType(Object obj, out string type)
proto native UIManager GetUIManager()
proto native vector GetCurrentCameraPosition()
proto native void ChatMP(Man recipient, string text, string colorClass)
proto native void RemoteObjectTreeCreate(Object obj)
RemoteObjectCreate - postponed registration of network object (and creation of remote object)....
proto native bool HasInventoryJunctureDestination(Man player, notnull InventoryLocation dst)
proto native bool ExecuteEnforceScript(string expression, string mainFnName)
Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script ...
proto int GetTime()
returns mission time in milliseconds
static ref TStringArray ARRAY_STRING
static ref Param1< bool > PARAM1_BOOL
static ref Param2< float, float > PARAM2_FLOAT_FLOAT
static ref Param1< string > PARAM1_STRING
static ref Param1< int > PARAM1_INT
represents base for cargo storage for entities
static bool GetAllowStaminaAffectInertia()
static bool GetUse3DMap()
static bool GetHitIndicationPPEEnabled()
static int GetLightingConfig()
static bool GetDisableRespawnDialog()
Super root of all classes in Enforce script.
static void AddPlayerBase(Man player)
static void RemovePlayerBase(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 void SendDeleteItem(DayZPlayer pPlayer, EntityAI item)
static const int SJ_STAMINA
static const int SJ_INVENTORY_REPAIR
static const int SJ_PLAYER_STATES
static bool ReadBrokenLegsParamsEx(ParamsReadContext pCtx, out int currentState)
static const int SJ_PLAYER_ADD_MODIFIER
static const int SJ_WEAPON_LIFT
static const int SJ_GESTURE_REQUEST
static const int SJ_INVENTORY
static bool ReadInjuryParams(ParamsReadContext pCtx, out bool pEnable, out eInjuryHandlerLevels level)
static const int SJ_ADS_RESET
static const int SJ_WEAPON_ACTION_ACK_REJECT
static const int SJ_KURU_REQUEST
static const int SJ_ACTION_ACK_ACCEPT
static const int SJ_STAMINA_MISC
static bool ReadPlayerUnconsciousnessParams(ParamsReadContext pCtx, out bool enable)
static const int SJ_ACTION_INTERRUPT
static void SendPlayerUnconsciousness(DayZPlayer pPlayer, bool enable)
static const int SJ_INVENTORY_FAILURE
static void SendBrokenLegsEx(DayZPlayer pPlayer, int currentState)
static const int SJ_UNCONSCIOUSNESS
static const int SJ_WEAPON_ACTION_ACK_ACCEPT
static const int SJ_BROKEN_LEGS
static const int SJ_ACTION_ACK_REJECT
static const int SJ_QUICKBAR_SET_SHORTCUT
static const int SJ_DELETE_ITEM
static const int SJ_SHOCK
static const int SJ_INJURY
static const int SJ_WEAPON_SET_JAMMING_CHANCE
static bool ReadShockParams(ParamsReadContext pCtx, out float shockValue)
static bool ReadKuruRequest(ParamsReadContext pCtx, out float amount)
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.
void SetDecalOwner(Object o)
Particle GetParticle()
Gets the main particle which this Effect is managing.
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
override bool PredictiveTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
script counterpart to engine's class Inventory
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
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...
proto native bool EnumerateInventory(InventoryTraversalType tt, out array< EntityAI > items)
enumerate inventory using traversal type and filling items array
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
proto native void CharacterKill(Man player)
proto native void CharacterSave(Man player)
void Update(float timeslice)
void ShowHudUI(bool show)
void ShowQuickbarPlayer(bool show)
void ShowQuickBar(bool show)
void ShowHudPlayer(bool show)
void ToggleHeatBufferPlusSign(bool show)
void ShowQuickbarUI(bool show)
void SetTemperature(string temp)
void SetStaminaBarVisibility(bool show)
proto native vector GetLogoutPosition()
proto native void SetDirectionSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterSprintTimeout
proto native void SetRunSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fRunSpringTimeout
proto native bool IsInRoll()
return true if character barrel rolling
proto native float GetCurrentMovementSpeed()
0,1,2..3 idle, walk, run, sprint
proto native void ForceStance(int pStanceIdx)
proto native void SetMeleeBlock(bool pBlock)
this enables/disables block
proto native bool IsOnBack()
return true if prone is on back
proto native void SetTurnSpanSprintModifier(float value)
sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingSprintFilterSpan
proto native void WakeUp(int targetStance=-1)
proto native void KnockedOutVehicle()
proto native Transport GetTransport()
proto native int GetVehicleSeat()
proto native bool ShouldBeKnockedOut()
proto native void SetVehicleType(int pVehicleType)
proto native void LiftWeapon(bool pState)
command for lifting weapon near obstacled (works only when weapon is raised)
int m_StanceRotation[6]
6 stances -> all has movement mask, STANCEIDX_ ... is index
int m_iStanceIdx
current command's id
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
Client only - manage set up crafting on client.
proto native int GetType()
returns type of InventoryLocation
proto native vector GetPos()
returns position of item in world if type is Ground
proto native void SetCargoAuto(notnull CargoBase cargo, EntityAI e, int row, int col, bool flip)
based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively
proto native InventoryLocation CopyLocationFrom(notnull InventoryLocation rhs, bool copyFlip)
copies location to another location without m_item member
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
bool ReadFromContext(ParamsReadContext ctx)
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)
void SetLastMapInfo(float scale, vector pos)
void PlayAttachmentDropSound()
void SetModifiers(bool enable)
PlayerBase m_CheckPulseLastTarget
void AdjustBandana(EntityAI item, string slot_name)
bool GetLiquidTendencyDrain()
ref Timer m_DeathCheckTimer
bool CanManipulateInventory()
override bool IsInventoryVisible()
void SetBleedingBits(int bits)
override void OnPlayerRecievedHit()
protected bool m_ProcessUIWarning
private int m_StoreLoadVersion
bool TogglePlacingServer(int userDataType, ParamsReadContext ctx)
void SetHairLevelToHide(int level, bool state, bool was_debug=false)
Dynamic hair hiding.
override void CommandHandler(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void ShockRefill(float pDt)
bool GetDrowningWaterLevelCheck()
void SetLastShavedSeconds(int last_shaved_seconds)
ref Hologram m_HologramLocal
ref InjuryAnimationHandler m_InjuryHandler
PluginConfigEmotesProfile m_ConfigEmotesProfile
void SetLastFirePointIndex(int last_fire_point_index)
protected bool m_HasHeatBuffer
ref EmoteManager m_EmoteManager
void ToggleHeatBufferVisibility(bool show)
void SetShakesForced(int value)
float GetBordersImmunity()
float GetFeetDamageMoveModifier()
ref Param2< float, float > m_UAProgressParam
ref DebugMonitorValues m_DebugMonitorValues
ref ArrowManagerPlayer m_ArrowManager
private bool m_FlagRaisingTendency
void MapNavigationItemNotInPossession(EntityAI item)
void dmgDebugPrint(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
float GetStatBordersWater()
override protected void SendSoundEvent(EPlayerSoundEventID id)
EntityAI SpawnEntityOnGroundOnCursorDir(string object_name, float distance)
static ref array< string > m_BleedingSourcesUp
EntityAI CreateInInventory(string item_name, string cargo_type="", bool full_quantity=false)
bool m_CanPlayBrokenLegSound
vector GetLastFirePoint()
float GetStatBordersEnergy()
void ForceUpdateInjuredState()
update injured state immediately
void BrokenLegWalkShock()
void IncreaseAntibioticsCount()
void CloseMap()
DEPRECATED; terminates map animation callback and re-enables controls.
protected ItemBase m_CheckMeleeItem
protected bool m_IsInWater
override array< string > GetSuitableFinisherHitComponents()
returns list of suitable finisher hit components (defined on base entity/entity type)
void StaminaHUDNotifier(bool show)
void SetFlagTendencyRaise(bool state)
DEPRECATED.
void SetDecayEffects(int effect=-1)
ref PlayerStats m_PlayerStats
override void OnCommandDeathStart()
override void EEItemIntoHands(EntityAI item)
void OnVehicleSeatDriverEnter()
void FixAllInventoryItems()
UndergroundHandlerClient GetUndergroundHandler()
override void SwitchItemSelectionTexture(EntityAI item, string slot_name)
private PluginPlayerStatus m_ModulePlayerStatus
private bool m_LiquidTendencyDrain
protected ref Timer m_UALastMessageTimer
void SetLastFirePoint(vector last_fire_point)
int GetBleedingSourceCount()
EntityAI SpawnAI(string object_name, vector pos)
void PlacingStartServer(ItemBase item)
bool Consume(ItemBase source, float amount, EConsumeType consume_type)
void SaveAreaPersistenceFlag(ParamsWriteContext ctx)
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
void CheckSendSoundEvent()
override bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void TogglePlacingLocal(ItemBase item=null)
override void OnCommandClimbFinish()
void CheckHairClippingOnCharacterLoad()
helper method for re-checking hairhiding on character load
void CalculateVisibilityForAI()
bool CheckMeleeItemDamage(ItemBase item)
vector m_DirectionToCursor
override void InsertAgent(int agent, float count=1)
override void SetDeathDarknessLevel(float duration, float tick_time)
bool HasStaminaRemaining()
DEPRECATED.
void GiveShock(float shock)
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)
ref EffectSound m_SoundFliesEffect
SoftSkillsManager GetSoftSkillsManager()
ref StanceIndicator m_StanceIndicator
ref Environment m_Environment
override void EOnPostFrame(IEntity other, int extra)
ModifiersManager GetModifiersManager()
bool CheckAndExecuteStackSplitToInventoryLocation(InventoryLocation il, notnull EntityAI item)
void SetPulseType(EPulseType pulse_type)
protected bool m_InventorySoftLocked
ref VirtualHud m_VirtualHud
override void OnStanceChange(int previousStance, int newStance)
void HandleGlassesEffect()
void ShowUnconsciousScreen(bool show)
void ProcessADDModifier()
PlayerStat< float > GetStatEnergy()
ItemBase CreateCopyOfItemInInventoryOrGroundEx(ItemBase src, bool markItemAsSplitResult=false)
void SwitchItemTypeAttach(EntityAI item, string slot)
override protected bool TakeEntityAsAttachmentImpl(InventoryMode mode, notnull EntityAI item)
override void HideClothing(ItemOptics optic, bool state)
state 'true' == hide
void BrokenLegForceProne(bool forceOverride=false)
override bool CanDropEntity(notnull EntityAI item)
void MovingShock(float legHealth, float highShock, float midShock, float lowShock)
void PlacingCancelLocal()
override void OnCommandVehicleFinish()
int GetLastShavedSeconds()
void SpawnDrowningBubbles()
void SetNVGLowered(bool state)
PlayerStat< int > GetStatBloodType()
void AddToEnvironmentTemperature(float pTemperature)
DEPRECATED.
override void OnStoreSave(ParamsWriteContext ctx)
void OnSpawnedFromConsole()
bool IsPlayerDisconnected()
override void RPC(int rpc_type, array< ref Param > params, bool guaranteed, PlayerIdentity recipient=NULL)
void SetActionEndInput(ActionBase action)
int m_BleedingSourceCount
bool ResetADSPlayerSync(int userDataType, ParamsReadContext ctx)
server only
DamageDealtEffect GetDamageDealtEffect()
override string GetHitComponentForAI()
Melee helpers.
void AddActiveNV(int type)
override bool IsInventorySoftLocked()
bool IsTargetInActiveRefresherRange(EntityAI target)
int GetLastFirePointIndex()
Head_Default m_CharactersHead
ref array< int > m_Recipes
PlayerStat< float > GetStatSpecialty()
bool m_MapCloseRequestProcessed
ref InventoryActionHandler m_InventoryActionHandler
bool m_IsRestrainPrelocked
bool IsItemInInventory(EntityAI entity)
override bool CanReceiveItemIntoCargo(EntityAI item)
void UpdateTranslatedSelections(SelectionTranslation stt)
EStatLevels GetImmunityLevel()
returns player's immunity level
override bool PredictiveDropEntity(notnull EntityAI item)
void RequestUnconsciousness(bool enable)
ref Param2< int, int > m_UAParam
override bool IsHoldingBreath()
override void OnCommandClimbStart()
override bool PredictiveForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
void DealShock(float dmg)
PlayerStat< float > GetStatStamina()
vector m_CraftingInitialPos
void SetPlayerLoad(float load)
bool GetLastMapInfo(out float scale, out vector pos)
override protected float GetWeightSpecialized(bool forceRecalc=false)
EStatLevels GetStatLevelHealth()
void QueueRemoveEffectWidget(array< int > effects)
void AddPossibleCoverFaceForShave()
ref WeaponManager m_WeaponManager
override void OnRollFinish()
ref TInputActionMap m_InputActionMapAsTarget
override void SetProcessUIWarning(bool state)
int m_SyncedModifiersPrev
void ProcessHoldBreath(float dT)
private void SetBloodyHandsBase(int type)
void SpawnShockEffect(float intensity_max)
protected ref array< EntityAI > m_ItemsToDelete
override void JunctureDeleteItem(EntityAI item)
void RadialQuickBarSingleUse(int slotClicked)
bool ReadLiftWeaponRequest(int userDataType, ParamsReadContext ctx)
override void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
void OnInventoryMenuClose()
override bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
ref TInputActionMap m_InputActionMap
override bool CanSaveItemInHands(EntityAI item_in_hands)
ref SoundParams m_SaySoundParams
bool GetMapClosingSyncSent()
vector GetLocalProjectionOrientation()
void QueueRemoveGlassesEffect(int id)
bool m_IsVehicleSeatDriver
override void RemoveAgent(int agent_id)
void ImmuneSystemTick(float value, float deltaT)
void MessageStatus(string text)
override void EEKilled(Object killer)
override bool CanBeTargetedByAI(EntityAI ai)
PluginAdminLog m_AdminLog
EmoteManager GetEmoteManager()
void OnUnconsciousUpdate(float pDt, int last_command)
override void OnParticleEvent(string pEventType, string pUserString, int pUserInt)
protected int m_ShakesForced
void Message(string text, string style)
void RemoveQuickBarEntityShortcut(EntityAI entity)
ref PlayerStomach m_PlayerStomach
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
private PluginLifespan m_ModuleLifespan
override EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
void OnVehicleSeatDriverLeft()
void AddAction(typename actionName)
override void RemoveAllAgents()
void OnQuickBarContinuousUseStart(int slotClicked)
bool CheckAndExecuteStackSplit(FindInventoryLocationType flags, notnull EntityAI item, notnull EntityAI target)
TransferValues GetTransferValues()
bool IsFacingTarget(Object target)
protected bool m_AllowQuickRestrain
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
vector m_DefaultHitPosition
override bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
protected int m_RecipePick
void OnQuickBarContinuousUseEnd(int slotClicked)
array< int > GetNVTypesArray()
protected vector SetDefaultHitPosition(string pSelection)
void SetRestrained(bool is_restrained)
override void TakeEntityToHandsImpl(InventoryMode mode, EntityAI item)
VirtualHud GetVirtualHud()
void SetNVGWorking(bool state)
Deprecated.
override protected bool TakeEntityToCargoImpl(InventoryMode mode, notnull EntityAI item)
PlayerStomach GetStomach()
override void SpawnDamageDealtEffect()
ref EffectRadial m_EffectRadial
void SetLiftWeapon(int pJunctureID, ParamsReadContext ctx)
void MessageImportant(string text)
void SetActionsRemoteTarget()
EntityAI GetQuickBarEntity(int index)
override protected void SendSoundEventEx(EPlayerSoundEventID id, int param=0)
ref HiddenSelectionsData m_EmptyGloves
void UpdatePlayerMeasures()
override void AddItemToDelete(EntityAI item)
void RequestHandAnimationStateRefresh()
override ArrowManagerBase GetArrowManager()
void DecreaseDiseaseCount()
SymptomManager GetSymptomManager()
override bool PredictiveTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
override bool PhysicalPredictiveDropItem(EntityAI entity, bool heavy_item_only=true)
void SetLoadedQuickBarItemBind(EntityAI entity, int index)
DayZPlayerCameraBase m_CurrentCamera
PluginRecipesManager m_ModuleRecipesManager
ref Hologram m_HologramServer
void DecreaseHealingsCount()
void UpdateMaskBreathWidget(notnull MaskBase mask, bool is_start=false)
ref Param1< float > m_UnconParam
ItemBase CreateCopyOfItemInInventoryOrGround(ItemBase src)
float GetSimplifiedShockNormalized()
void SetUnderground(EUndergroundPresence presence)
override string GetDefaultHitComponent()
returns default hit component (fallback)
static protected Particle m_ContaminatedAroundPlayerTiny
override bool IsRestrained()
ref EffectParticle m_FliesEff
NotifiersManager GetNotifiersManager()
override void OnCommandMelee2Finish()
void SetActions(out TInputActionMap InputActionMap)
void SetInWater(bool pState)
water contact (driven by Environment)
ref ConstructionActionData m_ConstructionActionData
void OnStoreSaveLifespan(ParamsWriteContext ctx)
void SetSoundCategoryHash(int hash)
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
void PlacingCompleteLocal()
override void CheckAnimationOverrides()
static ref array< string > m_BleedingSourcesLow
void TryHideItemInHands(bool hide, bool force=false)
tries to hide item in player's hands, some exceptions for various movement states
void OnUnconsciousStart()
void SwitchItemTypeDetach(EntityAI item, string slot)
void OnPlayerReceiveFlashbangHitEnd()
void UnsetMixedSoundState(eMixedSoundStates state)
ref PlayerSoundManagerClient m_PlayerSoundManagerClient
PlayerSoundManagerServer GetPlayerSoundManagerServer()
EStatLevels GetStatLevel(float stat_value, float critical, float low, float normal, float high)
override bool CanSwapItemInCargo(EntityAI child_entity, EntityAI new_entity)
void RequestResetADSSync()
ref SoundObject m_SaySoundObject
ActionManagerBase GetActionManager()
void SetPersistentFlag(PersistentFlag bit, bool enable)
void UpdateQuickBarEntityVisibility(EntityAI entity)
override void OnRollStart(bool isToTheRight)
void SetCheckMeleeItem(ItemBase item=null)
float GetHealthRegenSpeed()
override protected bool TakeEntityToInventoryImpl(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
ConstructionActionData GetConstructionActionData()
int m_DebugMonitorEnabled
override vector GetDefaultHitPosition()
override bool CanReleaseAttachment(EntityAI attachment)
void RemovePossibleCoverFaceForShave()
protected PlayerStat< int > m_StatWet protected PlayerStat< int > m_StatBloodType protected PlayerStat< float > m_StatDiet protected PlayerStat< float > m_StatStamina protected PlayerStat< float > m_StatSpecialty protected PlayerStat< float > m_StatHeatBuffer protected GameplayEffectWidgets_base m_EffectWidgets
effect widgets
protected bool m_AllowQuickFishing
ref EffectSound m_BrokenLegSound
bool m_ContaminatedAreaEffectEnabled
void QueueAddEffectWidget(array< int > effects)
protected bool m_MeleeDebug
melee stats
override bool CanPickupHeavyItem(notnull EntityAI item)
override bool CanReleaseCargo(EntityAI cargo)
void OnBleedingSourceRemovedEx(ItemBase item)
FlashbangEffect GetFlashbangEffect()
override void RequestSoundEventEx(EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
override void OnCommandLadderStart()
override void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
void SpawnFlashbangEffect(PlayerBase player, bool visual)
eMixedSoundStates GetMixedSoundStates()
void SetBloodTypeVisible(bool show)
void ContaminatedParticleAdjustment()
void SetEnableQuickBarEntityShortcut(EntityAI entity, bool value)
void SetRestrainPrelocked(bool restrain_prelock)
ref TransferValues m_TrasferValues
bool IsSyncedModifierActive(eModifierSyncIDs modifier)
Checks whether modifier (which has syncing enabled) is currently active, works on both Client and Ser...
float GetImmunity()
returns player's immunity strength between 0..1
protected int m_CorpseStateLocal
float GetLastFirePointRot()
vector GetLocalProjectionPosition()
void RunFightBlendTimer()
protected bool m_IsHoldingBreath
override void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
override void EEDelete(EntityAI parent)
override void OnJumpEnd(int pLandType=0)
override void OnCommandVehicleStart()
override bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
protected ref MapNavigationBehaviour m_MapNavigationBehaviour
void PlacingCancelServer()
PlayerStat< float > GetStatHeatComfort()
Hologram GetHologramServer()
ref HeatComfortAnimHandler m_HCAnimHandler
override void EEItemDetached(EntityAI item, string slot_name)
private int m_HasBloodyHandsVisible
ItemBase CreateCopyOfItemInInventory(ItemBase src)
ref TInputActionMap m_InputActionMapControled
protected PluginPresenceNotifier m_PresenceNotifier
int GetCraftingRecipeID()
ref NotifiersManager m_NotifiersManager
StaminaHandler GetStaminaHandler()
void SpawnDamageDealtEffect2(Param param1=null, Param param2=null)
float GetStatBordersToxicity()
PlayerStats GetPlayerStats()
override bool CanReleaseFromHands(EntityAI handheld)
protected ref array< int > m_ProcessRemoveEffectWidgets
override bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
void OnCommandHandlerTick(float delta_time, int pCurrentCommandID)
protected string m_UALastMessage
user actions last message
void ResetPlayer(bool set_max)
override bool PredictiveTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
PlayerStat< float > GetStatHeatBuffer()
float GetVisibilityCoef()
protected PlayerStat< float > m_StatHeatComfort
override bool IsInFBEmoteState()
void ProcessHandDamage(float delta_time, HumanMovementState pState)
PlayerSoundEventHandler GetPlayerSoundEventHandler()
override protected bool TakeEntityToTargetInventoryImpl(InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
protected ref array< int > m_ProcessAddGlassesEffects
ref protected RandomGeneratorSyncManager m_RGSManager
ref Timer m_AnalyticsTimer
override SoundOnVehicle PlaySound(string sound_name, float range, bool create_local=false)
ref FlashbangEffect m_FlashbangEffect
bool IsPersistentFlag(PersistentFlag bit)
void EndSurrenderRequest(SurrenderData data=null)
ends surrender, originally intended for surrender->restrained transitioning
void AddPlayerLoad(float addedload)
PlayerStat< float > GetStatToxicity()
private int m_LastShavedSeconds
void PlacingCompleteServer()
void PreloadDecayTexture()
override void AfterStoreLoad()
EStatLevels GetStatLevelEnergy()
private bool m_HasBloodTypeVisible
ref ShockDealtEffect m_ShockDealtEffect
override int GetQuickBarBonus()
override void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
ref PlayerSoundManagerServer m_PlayerSoundManagerServer
void OnQuickBarSingleUse(int slotClicked)
override void SimulateDeath(bool state)
int GetBreathVapourLevel()
void DropAllItems()
Drops all clothes/wearables this character is carrying on themselves.
void RemoveActiveNV(int type)
private int m_LifeSpanState
void CloseInventoryMenu()
static set< int > GetFaceCoverageShaveValues()
returns a set of face covering values (supplementary)
float m_OriginalSlidePoseAngle
bool CanSpawnBreathVaporEffect()
EUndergroundPresence m_UndergroundPresence
void OnVoiceEventPlayback(PlayerSoundEventBase voice_event, AbstractWave callback, float playback_time)
called every cmd handler tick during a playback of PlayerSoundEvent, m_ProcessPlaybackEvent needs to ...
PlayerStat< int > GetStatWet()
override bool CanStartConsumingStamina(EStaminaConsumers consumer)
override void OnJumpStart()
BleedingSourcesManagerServer GetBleedingManagerServer()
protected bool m_MapClosingSyncSent
override bool IsIgnoredByConstruction()
ref protected ActionManagerBase m_ActionManager
bool IsRestrainPrelocked()
ShockDealtEffect GetShockEffect()
ref BleedingSourcesManagerServer m_BleedingManagerServer
override void SetInventorySoftLock(bool status)
void MessageFriendly(string text)
protected int m_LocalRefreshAnimStateIdx
float ConvertNonlethalDamage(float damage)
void DecreaseAntibioticsCount()
float GetSingleAgentCountNormalized(int agent_id)
void SetDrowning(bool enable)
EffectSound m_AmbientContamination
protected int m_AnimCommandStarting
override void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
protected bool m_CanDisplayHitEffectPPE
override void OnCommandSwimFinish()
void SetBloodyHandsEx(eBloodyHandsTypes type)
void UpdateQuickBarExtraSlots()
override void EEHitByRemote(int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
protected PlayerStat< float > m_StatEnergy
override protected bool TakeEntityToTargetCargoImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
override void OnCommandSwimStart()
ref DamageDealtEffect m_DamageDealtEffect
ref ModifiersManager m_ModifiersManager
void OnBleedingSourceRemoved()
void SetQuickRestrain(bool enable)
override void OnCommandFallFinish()
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
float GetStatBordersBlood()
protected ref array< int > m_ActiveNVTypes
ref StaminaHandler m_StaminaHandler
void ResetActionEndInput()
PlayerStat< float > GetStatTremor()
void SetBrokenLegs(int stateId)
bool HandleRemoteItemManipulation(int userDataType, ParamsReadContext ctx)
void ProcessDrowning(float dT)
EPulseType GetPulseType()
eBrokenLegs GetBrokenLegs()
override void OnCommandMelee2Start()
protected int m_LifespanLevelLocal
protected PlayerStat< float > m_StatTremor
void OnBleedingSourceAdded()
ref Param1< string > m_UAParamMessage
void IncreaseDiseaseCount()
static protected Particle m_ContaminatedAroundPlayer
override bool IsFighting()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
void OnHoldBreathExhausted()
override bool IsRefresherSignalingViable()
void SetLiquidTendencyDrain(bool state)
override WeaponManager GetWeaponManager()
void UpdateBrokenLegs(int stateId)
void SendLiftWeaponSync(bool state)
Client-side only.
EntityAI GetMagazineToReload(EntityAI weapon)
void LockHandsUntilItemHeld()
void OnQuickbarSetEntityRequest(ParamsReadContext ctx)
void SetStaminaState(eStaminaState state)
string m_SaySoundLastSetName
override protected bool TakeEntityToTargetAttachmentImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
bool IsSwapBetweenHandsAndGroundLargeItem(notnull EntityAI item1, notnull EntityAI item2, out EntityAI item_hands, out EntityAI item_ground)
void SetStamina(int value, int range)
override void CheckLiftWeapon()
string GetLastUAMessage()
UA Last Message.
override bool CanChangeStance(int previousStance, int newStance)
override bool CanConsumeStamina(EStaminaConsumers consumer)
void UpdateHairSelectionVisibility(bool was_debug=false)
override bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
void SpreadAgentsEx(float distance=3, float chance=0.25)
chance between [0..1] , distance in meters
protected bool m_PlayerDisconnectProcessed
void UpdateCorpseStateVisual()
void RemoveAction(typename actionName, out TInputActionMap InputActionMap)
PlayerStat< float > GetStatDiet()
bool CanRedirectToWeaponManager(notnull EntityAI item, out bool isActionPossible)
int GetStoreLoadVersion()
override void EEItemAttached(EntityAI item, string slot_name)
EStatLevels GetStatLevelWater()
void CloseMapEx(bool cancelled)
protected vector m_LastMapPos
bool IsMapCallbackCancelInput()
eBloodyHandsTypes HasBloodyHandsEx()
void IncreaseHealingsCount()
void KillUndergroundHandler()
void OnVoiceEvent(PlayerSoundEventBase voice_event)
ref SymptomManager m_SymptomManager
bool IsMapCallbackEndInput()
void SetVisibilityCoef(float pVisibility)
override bool IsLiftWeapon()
override vector GetCenter()
void SetCraftingRecipeID(int recipeID)
void SetBloodyHands(bool show)
void HideHairSelections(ItemBase item, bool state)
ItemBase GetItemOnHead()
Returns item on player's head. For an example, a headtorch.
override protected bool TakeToDstImpl(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
DayZPlayerCamera GetCurrentPlayerCamera()
protected void ClearLastUAMessage()
void SetLastFirePointRot(float last_fire_point_rot)
ref CraftingManager m_CraftingManager
override bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
void DamageAllLegs(float inputDmg)
void QueueAddGlassesEffect(int id)
void SetRestrainStarted(bool restrain_started)
bool m_BrokenLegsJunctureReceived
bool HasBloodTypeVisible()
void SetPlayerDisconnected(bool state)
override void OnThrowingModeChange(bool change_to_enabled)
ref Param1< float > m_DeathDarkeningParam
int FindQuickBarEntityIndex(EntityAI entity)
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)
void SetLifeSpanStateVisible(int show_state)
bool HasCoveredFaceForShave()
void OnPlayerReceiveFlashbangHitStart(bool visual)
override void OnCommandMoveStart()
override void EEItemOutOfHands(EntityAI item)
protected ref array< int > m_ProcessRemoveGlassesEffects
override bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
float GetStatLevelBorders(float stat_value, float critical, float low, float normal, float high, float max)
override void OnVariablesSynchronized()
protected ref UndergroundHandlerClient m_UndergroundHandler
protected ref array< int > m_ProcessAddEffectWidgets
void MapNavigationItemInPossession(EntityAI item)
void CheckZeroSoundEvent()
override bool CanClimb(int climbType, SHumanCommandClimbResult climbRes)
void SetImmunityBoosted(bool boosted)
protected bool m_PlayerLoaded
void RadialQuickBarCombine(int slotClicked)
void SetQuickBarEntityShortcut(EntityAI entity, int index, bool force=false)
bool AnimCommandCheck(HumanMoveCommandID mask)
bool IsStance(int stance, int stanceMask)
override void PredictiveTakeEntityToHands(EntityAI item)
bool IsAntibioticsActive()
void SetActionsRemoteTarget(out TInputActionMap InputActionMap)
void SetLastUAMessage(string pMsg)
void AntibioticsAttack(float value)
void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
void SetBloodType(int blood_type)
void QuickReloadWeapon(EntityAI weapon)
void MessageAction(string text)
void SetLocalProjectionPosition(vector local_position)
Hologram GetHologramLocal()
ref Param3< float, float, bool > m_StaminaParam
override bool PredictiveTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
override bool IsManagingArrows()
void OnCameraChanged(DayZPlayerCameraBase new_camera)
void SetMixedSoundState(eMixedSoundStates state)
ref BleedingSourcesManagerRemote m_BleedingManagerRemote
void UpdateMovementInertia()
Update movement inertia based on stamina available.
override void ProcessLiftWeapon()
override bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
protected PlayerStat< float > m_StatToxicity
int m_ForceInjuryAnimMask
int GetSingleAgentCount(int agent_id)
AbstractWave SaySoundSet(string name)
ItemBase GetItemInHands()
bool OnStoreLoadLifespan(ParamsReadContext ctx, int version)
ref ShockHandler m_ShockHandler
override bool IsUnconscious()
void SetLocalProjectionOrientation(vector local_orientation)
BleedingSourcesManagerRemote GetBleedingManagerRemote()
void UpdateShoulderProxyVisibility(EntityAI item, string slot_name)
void AddAction(typename actionName, out TInputActionMap InputActionMap)
void SetMapClosingSyncSet(bool state)
void ReloadWeapon(EntityAI weapon, EntityAI magazine)
EStatLevels GetStatLevelBlood()
PlayerStat< float > GetStatWater()
void OnInventoryMenuOpen()
override void ProcessFeetDamageServer(int pUserInt)
bool DropItem(ItemBase item)
Spawn item on server side.
void OnJumpOutVehicleFinish(float carSpeed)
void SetToDelete(ParamsReadContext pCtx)
RandomGeneratorSyncManager GetRandomGeneratorSyncManager()
ref array< ref Param2< EntityAI, int > > m_aQuickBarLoad
bool GetFlagTendencyRaise()
DEPRECATED.
void RefreshHandAnimationState(int delay=0)
void RemoveAction(typename actionName)
override bool CanReceiveItemIntoHands(EntityAI item_to_hands)
EntityAI FindCargoByBaseType(string searched_item)
override void OnCommandFallStart()
float GetTotalAgentCount()
void SetQuickFishing(bool enable)
ref SoftSkillsManager m_SoftSkillsManager
void OnUnconsciousStop(int pCurrentCommandID)
ItemBase GetItemOnSlot(string slot_type)
Returns item that's on this player's attachment slot. Parameter slot_type should be a string from con...
DebugMonitorValues GetDebugMonitorValues()
override void EOnFrame(IEntity other, float timeSlice)
bool IsCurrentCameraAimedAtGround()
void SetBloodyHandsPenalty()
ref protected QuickBarBase m_QuickBarBase
CraftingManager GetCraftingManager()
EStatLevels GetStatLevelToxicity()
protected PlayerStat< float > m_StatWater
int GetNoisePresenceInAI()
Return actual noise presence of player.
static ref TStringArray m_QBarItems
void SetMapOpen(bool state)
ref SoundObjectBuilder m_SaySoundBuilder
override void OnCommandLadderFinish()
void HandleBrokenLegsSync()
float m_LastPostFrameTickTime
void SpawnBreathVaporEffect()
MapNavigationBehaviour GetMapNavigationBehaviour()
protected int m_RefreshAnimStateIdx
override void OnGameplayDataHandlerSync()
void ResetConstructionActionData()
float GetStatBordersHealth()
ref PlayerAgentPool m_AgentPool
void PlacingStartLocal(ItemBase item)
void SetHitPPEEnabled(bool enabled)
void OnScheduledTick(float deltaTime)
void OnVehicleSwitchSeat(int seatIndex)
array< vector > GetActiveRefresherLocations()
void EnableAllInputs(bool bForceSupress=false)
void RemoveActiveInputRestriction(int restrictor)
WorldLighting GetWorldLighting()
void AddActiveInputExcludes(array< string > excludes)
void SyncRespawnModeInfo(PlayerIdentity identity)
server-side
void SetRespawnModeClient(int mode)
for client-side usage
GameplayEffectWidgets_base GetEffectWidgets()
void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
deprecated
void OnPlayerRespawned(Man player)
void AddDummyPlayerToScheduler(Man player)
void SetPlayerRespawning(bool state)
base "helper" class for nonlethal ammo handling
Static component of PPE manager, used to hold the instance.
static PPEManager GetPPEManager()
Returns the manager instance singleton.
void Start(Param par=null)
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 DROWNING_BUBBLES
static const int BREATH_VAPOUR_MEDIUM
static const int CONTAMINATED_AREA_GAS_TINY
static const int CONTAMINATED_AREA_GAS_AROUND
static const int BREATH_VAPOUR_HEAVY
static const int BREATH_VAPOUR_LIGHT
override void OnGameplayDataHandlerSync()
static const float SL_HEALTH_HIGH
static const float BROKEN_LEGS_ROLL_SHOCK
static const float BROKEN_LEGS_HIGH_SHOCK_WALK
static const float SL_BLOOD_LOW
static const int LAST_UA_MSG_LIFETIME
static const float IMMUNITY_THRESHOLD_LEVEL_LOW
static const float UNCONSCIOUS_IN_WATER_TIME_LIMIT_TO_DEATH
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
static const int DROWNING_BUBBLE_FREQUENCY_MIN
static const float DROWNING_SWIMMING_THRESHOLD
static const float BROKEN_CROUCH_MODIFIER
static const float BAREFOOT_MOVEMENT_BLEED_MODIFIER
static const float MELEE2_MOVEMENT_BLEND_DELAY
static const float SL_BLOOD_CRITICAL
static const float SL_ENERGY_NORMAL
static const float IMMUNITY_THRESHOLD_LEVEL_NORMAL
static const float SL_HEALTH_CRITICAL
static const float HEALTH_REGEN_MIN
static const float SL_ENERGY_CRITICAL
static const float SL_WATER_MAX
static const float SL_ENERGY_HIGH
static const float SHOES_MOVEMENT_DAMAGE_PER_STEP
static const float BROKEN_LEGS_SHOCK_SWIM
static const float IMMUNITY_THRESHOLD_LEVEL_HIGH
static const float BROKEN_LEGS_HIGH_HEALTH_THRESHOLD
static const float BROKEN_LEGS_MID_SHOCK_WALK
static const float BROKEN_LEGS_INITIAL_SHOCK
static const int CHECK_EVERY_N_STEP
static const int CORPSE_STATE_DECAYED
static const float CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC
static const float HEALTH_REGEN_MAX
static const float BROKEN_LEGS_LOW_HEALTH_THRESHOLD
static const float SL_ENERGY_LOW
static const float SL_WATER_HIGH
static const float SL_BLOOD_HIGH
static const float DROWNING_DEFAULT_THRESHOLD
static const float THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL
static const float SL_ENERGY_MAX
static const float SL_HEALTH_NORMAL
static const float BROKEN_LEGS_STAND_SHOCK
static const int BLOOD_THRESHOLD_FATAL
static const float IMMUNITY_THRESHOLD_LEVEL_CRITICAL
static const float SL_WATER_CRITICAL
static const float GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC
static const float SL_WATER_LOW
static const float CAMERA_THRESHOLD_PITCH
static const float BROKEN_LEGS_LOW_SHOCK_WALK
static const int DROWNING_BUBBLE_FREQUENCY_MAX
static const float DROWNING_UNCONSCIOUS_THRESHOLD
static const float SL_BLOOD_NORMAL
static const float SL_WATER_NORMAL
static const int CORPSE_STATE_MEDIUM
static const float SL_HEALTH_LOW
The class that will be instanced (moddable)
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
void OnVariableSynchronized()
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 void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
static bool IsEffectExist(int effect_id)
Checks whether an Effect ID is registered in SEffectManager.
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void Remove(func fn)
remove specific call from queue
void SetSelectionState(bool state)
ref array< int > GetTranslatedSelections()
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
string m_CharacterId
character ID
string m_Reason
reason of disconnect (quit, kick, ban, sign-out...)
int m_DaytimeHour
current daytime in gameplay (hour in 24h format)
vector m_PositionEnd
player world position at the end of interval
int m_TimeInterval
amount of real time in seconds covered by this event
vector m_PositionStart
player world position at the start of interval
float m_DistanceOnFoot
traveled distance on foot (meters) during interval
string m_CharacterId
character ID
static float GetParamFloat(string surface_name, string param_name)
static void SendEntityKilled(EntityAI victim, EntityAI killer, EntityAI source, bool is_headshot)
proto native float GetDamage(string zoneName, string healthType)
Base native class for all motorized wheeled vehicles.
proto native void CloseDialog()
proto native void ScreenFadeIn(float duration, string text, int backgroundColor, int textColor)
UIScriptedMenu FindMenu(int id)
Returns menu with specific ID if it is open (see MenuID)
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
bool CloseAll()
Close all opened menus.
proto native void ScreenFadeOut(float duration)
bool CanAttachMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
bool CanSwapMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
bool CanLoadBullet(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
void SetCalcDetails(string details)
void SetGlobalLighting(int lightingID)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto float Normalize()
Normalizes vector. Returns length.
proto native float LengthSq()
Returns squared length (magnitudeSqr)
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
const int SIMPLE_SELECTION_SHOULDER_RIFLE
const int SIMPLE_SELECTION_SHOULDER_MELEE
void ForceStandUpForHeavyItemsSwap(notnull EntityAI item1, notnull EntityAI item2)
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
proto native DayZPlayerInstanceType GetInstanceType()
DayZPlayerConstants
defined in C++
proto native void SendSyncJuncture(int pJunctureID, ParamsWriteContext ctx)
-------------— sync stuff ----------------------—
class SDayZPlayerAimingModel SIMPLE_SELECTION_MELEE_RIFLE
const int SIMPLE_SELECTION_MELEE_MELEE
string GetDefaultHitPositionComponent()
private void SDayZPlayerHeadingModel()
cannot be created from script
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 float PROJECTILE_CONVERSION_PLAYERS
const float DZPLAYER_CAMERA_FOV_IRONSIGHTS
const int INVENTORY_ENTITY_DROP_OVERLAP_DEPTH
const int DEFAULT_CHARACTER_MENU_ID
const float REFRESHER_RADIUS
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 MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
static proto float Max(float x, float y)
Returns bigger of two given values.
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 InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float AbsFloat(float f)
Returns absolute value.
static const float RAD2DEG
static proto float Sin(float angle)
Returns sinus of angle in radians.
static proto int AbsInt(int i)
Returns absolute value.
const int SAT_DEBUG_ACTION
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...
proto native int Length()
Returns length of string.
proto void GetHourMinuteSecond(out int hour, out int minute, out int second)
Returns world time.
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native bool IsModifierActive()
is modifier active
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 bool IsInWater()
proto native HumanCommandMelee GetCommand_Melee()
proto native HumanCommandMove StartCommand_Move()
returns current command ID
proto native HumanCommandFullBodyDamage StartCommand_Damage(int pType, float pDirection)
--— FullBody Damages --—
proto native HumanCommandWeapons GetCommandModifier_Weapons()
returns interface for handling weapons
proto native HumanCommandVehicle GetCommand_Vehicle()
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()
private void HumanItemAccessor()
class HumanItemBehaviorCfg OnItemInHandsChanged(bool pInstant=false)
signalization from script to engine that item in hands changed