6#ifdef FEATURE_NETWORK_RECONCILIATION
7class PlayerBaseOwnerState : DayZPlayerImplementOwnerState
9 protected override event void Write(PawnStateWriter ctx)
14 protected override event void Read(PawnStateReader ctx)
20class PlayerBaseMove : DayZPlayerImplementMove
24 float m_fStaminaValue;
25 float m_fStaminaCapacity;
26 float m_fStaminaDepletion;
28 bool m_bStaminaSynced;
29 float m_fStaminaSyncedValue;
30 float m_fStaminaSyncedCapacity;
32 protected void PlayerBaseMove()
34 m_bStaminaSynced =
false;
37 protected override event void Write(PawnMoveWriter ctx, PawnMove prev)
39 super.Write(ctx, prev);
42 protected override event void Read(PawnMoveReader ctx, PawnMove prev)
44 super.Read(ctx, prev);
225 #ifdef DIAG_DEVELOPER
226 int m_IsInsideTrigger;
227 bool m_CanBeTargetedDebug;
229 bool m_PresetSpawned;
230 ref CameraToolsMenuClient m_CameraToolsMenuClient;
231 protected PluginTargetTemperature m_TargetTemperatureDiag;
238 #ifdef DIAG_DEVELOPER
374 m_PlayerSelected =
false;
401 #ifdef DIAG_DEVELOPER
402 m_CanBeTargetedDebug =
true;
441 if (!
g_Game.IsDedicatedServer())
466 PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(
GetPlugin(PluginConfigDebugProfileFixed));
468 PluginDeveloper m_Developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
475 if (player && default_preset !=
"")
478 m_ConfigDebugProfileFixed.GetPresetItems(default_preset, preset_array);
480 bool is_preset_fixed =
true;
481 if (preset_array.Count() == 0)
484 is_preset_fixed =
false;
487 if (preset_array.Count() > 0)
489 m_Developer.ClearInventory(player);
491 for (
int i = 0; i < preset_array.Count(); i++)
497 health = m_ConfigDebugProfileFixed.GetItemHealth(default_preset, i);
498 quantity = m_ConfigDebugProfileFixed.GetItemQuantity(default_preset, i);
505 m_Developer.SpawnEntityInPlayerInventory(player, preset_array.Get(i), health, quantity);
552 RegisterNetSyncVariableInt(
"m_LifeSpanState", LifeSpanState.BEARD_NONE, LifeSpanState.COUNT);
553 RegisterNetSyncVariableInt(
"m_BloodType", 0, 128);
556 RegisterNetSyncVariableInt(
"m_SoundEventParam", 0, ((EPlayerSoundEventParam.ENUM_COUNT - 1) * 2) - 1);
557 RegisterNetSyncVariableInt(
"m_StaminaState",0, eStaminaState.COUNT - 1);
558 RegisterNetSyncVariableInt(
"m_BleedingBits");
562 RegisterNetSyncVariableInt(
"m_MixedSoundStates", 0,
eMixedSoundStates.COUNT - 1);
564 RegisterNetSyncVariableInt(
"m_RefreshAnimStateIdx",0,3);
565 RegisterNetSyncVariableInt(
"m_BrokenLegState", -
eBrokenLegs.BROKEN_LEGS_SPLINT,
eBrokenLegs.BROKEN_LEGS_SPLINT);
566 RegisterNetSyncVariableInt(
"m_SyncedModifiers", 0, ((
eModifierSyncIDs.LAST_INDEX - 1) * 2) - 1);
567 RegisterNetSyncVariableInt(
"m_HasBloodyHandsVisible", 0,
eBloodyHandsTypes.LAST_INDEX - 1);
568 RegisterNetSyncVariableInt(
"m_ActionSoundCategoryHash");
569 RegisterNetSyncVariableInt(
"m_PerformedAnimActionID", -1, 2048);
570 RegisterNetSyncVariableInt(
"m_ActivePrimarySymptomID", 0, SymptomIDs.LAST_INDEX);
573 RegisterNetSyncVariableFloat(
"m_HeatBufferDynamicMax", 0.0, 1.0, 2);
575 RegisterNetSyncVariableBool(
"m_IsUnconscious");
576 RegisterNetSyncVariableBool(
"m_IsRestrained");
577 RegisterNetSyncVariableBool(
"m_IsInWater");
578 RegisterNetSyncVariableBool(
"m_InsideEffectArea");
580 RegisterNetSyncVariableBool(
"m_HasBloodTypeVisible");
581 RegisterNetSyncVariableBool(
"m_IsRestrainStarted");
582 RegisterNetSyncVariableBool(
"m_IsRestrainPrelocked");
583 RegisterNetSyncVariableBool(
"m_HasHeatBuffer");
584 RegisterNetSyncVariableBool(
"m_IsInColdArea");
586 RegisterNetSyncVariableFloat(
"m_CurrentShock");
621 if(itemInHands.m_LightSourceItem && itemInHands.m_LightSourceItem.GetCompEM())
623 if(state && itemInHands.m_LightSourceItem.GetCompEM().GetPreviousSwitchState())
624 itemInHands.m_LightSourceItem.GetCompEM().SwitchOn();
626 itemInHands.m_LightSourceItem.GetCompEM().SwitchOff();
631 else if(itemInHands.GetCompEM())
633 if(state && itemInHands.GetCompEM().GetPreviousSwitchState())
634 itemInHands.GetCompEM().SwitchOn();
636 itemInHands.GetCompEM().SwitchOff();
642#ifdef FEATURE_NETWORK_RECONCILIATION
643 protected override event typename GetOwnerStateType()
645 return PlayerBaseOwnerState;
648 protected override event typename GetMoveType()
650 return PlayerBaseMove;
653 protected override event void ObtainMove( PawnMove pMove)
655 super.ObtainMove(pMove);
657 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
658 GetStaminaHandler().ObtainMove(move);
661 protected override event bool ReplayMove(PawnMove pMove)
663 if (!super.ReplayMove(pMove))
666 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
667 GetStaminaHandler().ReplayMove(move);
668 UpdateMovementInertia();
673 protected override event void ObtainState( PawnOwnerState pState)
675 super.ObtainState(pState);
677 PlayerBaseOwnerState state = PlayerBaseOwnerState.Cast(pState);
679 GetStaminaHandler().ObtainState(state);
682 protected override event void RewindState(PawnOwnerState pState, PawnMove pMove, inout NetworkRewindType pRewindType)
684 super.RewindState(pState, pMove, pRewindType);
686 PlayerBaseOwnerState state = PlayerBaseOwnerState.Cast(pState);
687 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
688 GetStaminaHandler().RewindState(state, move);
732 m_ActionSoundCategoryHash = hash;
887 if (waterLevel > 0.5)
890 timeSpent += timeSlice;
904 timeSpent += timeSlice;
952 EntityAI item_EAI = this.GetInventory().FindAttachment(slot_id);
955 if (item_EAI && !item_IB)
957 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() +
"!";
981 if (GetInventory().HasInventoryReservation(item, null))
988 if (GetEntityInHands() == item)
1007 int bit_mask_remove = ~state;
1202 g_Game.EnableVoN(
this,
false);
1203 if (!
g_Game.IsDedicatedServer())
1217 g_Game.GetMission().SyncRespawnModeInfo(GetIdentity());
1221 super.EEKilled(killer);
1226 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
1233 if (damageResult != null && damageResult.
GetDamage(dmgZone,
"Shock") > 0)
1239 if (
g_Game.ConfigIsExisting(
"cfgAmmo " + ammo +
" unconRefillModifier"))
1251 if (damageType ==
DamageType.EXPLOSION && ammo ==
"FlashGrenade_Ammo")
1260 float dmg = damageResult.
GetDamage(dmgZone,
"Blood");
1265 #ifdef DIAG_DEVELOPER
1267 Print(
"EEHitBy() | " +
GetDisplayName() +
" hit by " + source.GetDisplayName() +
" to " + dmgZone);
1269 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
1270 if (plugin_remote_server)
1272 plugin_remote_server.OnDamageEvent(
this, damageResult);
1276 if (
g_Game.IsDebugMonitor())
1282 int transferShockToDamageCoef =
g_Game.ConfigGetInt(
string.Format(
"%1 %2 DamageApplied transferShockToDamage",
CFG_AMMO, ammo));
1283 if (transferShockToDamageCoef == 1)
1287 if (dmgZone !=
"Head")
1288 AddHealth(dmgZone,
"Health", -damageResult.
GetDamage(dmgZone,
"Shock"));
1293 if (GetHealth(
"RightLeg",
"Health") <= 1 || GetHealth(
"LeftLeg",
"Health") <= 1 || GetHealth(
"RightFoot",
"Health") <= 1 || GetHealth(
"LeftFoot",
"Health") <= 1)
1302 if (ammo ==
"Bullet_CupidsBolt" && IsAlive())
1304 DamageSystem.ResetAllZones(
this);
1346 g_Game.GetAnalyticsServer().OnEntityHit(source,
this);
1351 super.EEHitByRemote(damageType, source,
component, dmgZone, ammo, modelPos);
1353 if (m_MeleeFightLogic.IsInBlock())
1374 return super.ConvertNonlethalDamage(damage, damageType);
1384 float shakeStrength =
Math.
InverseLerp(0, 500, hitData.m_InSpeed.Length());
1389 if (hitData.m_AmmoType ==
"Bullet_CupidsBolt")
1390 Ammo_CupidsBolt.PlayOnHitParticle(hitData.m_Position);
1397 if (m_MeleeFightLogic.IsInBlock())
1449 return GetSelectionPositionMS(pSelection);
1466 super.EEItemAttached(item, slot_name);
1470 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1471 item.SwitchItemSelectionTextureEx(EItemManipulationContext.ATTACHING, p);
1478 g_Game.GetAnalyticsClient().OnItemAttachedAtPlayer(item, slot_name);
1482 if (!
g_Game.IsDedicatedServer())
1484 if (clothing.GetEffectWidgetTypes())
1489 if (clothing.GetGlassesEffectID() > -1)
1497 else if (
g_Game.IsServer())
1499 if (clothing.IsGasMask())
1505 clothing.UpdateNVGStatus(
this,
true);
1514 super.EEItemDetached(item, slot_name);
1517 item.SwitchItemSelectionTextureEx(EItemManipulationContext.DETACHING);
1527 if (!
g_Game.IsDedicatedServer())
1529 if (clothing.GetEffectWidgetTypes())
1534 if (clothing.GetGlassesEffectID() > -1)
1542 if (clothing.IsGasMask())
1548 clothing.UpdateNVGStatus(
this,
false,
true);
1556 string slot = slot_name;
1558 boo = item.IsWeapon();
1560 if (slot ==
"Melee")
1565 else if (slot ==
"Shoulder")
1574 super.SwitchItemSelectionTexture(item,slot_name);
1577 EntityAI armband = FindAttachmentBySlotName(
"Armband");
1578 if (slot_name ==
"Body" && armband)
1580 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1581 armband.SwitchItemSelectionTextureEx(EItemManipulationContext.UPDATE,p);
1592 for (
int i = 0; i < itemsArray.Count(); i++)
1612 if (ConfigGetBool(
"woman") != 1)
1621 int voice_type = ConfigGetInt(
"voiceType");
1623 if (voice_type == 0)
1659 AddAction(ActionLockedDoors, InputActionMap);
1709 if (IsControlledPlayer())
1740 if (IsControlledPlayer())
1750 if (IsControlledPlayer())
1755 actions.InsertAll(bcActions);
1775 InputActionMap.Insert(ai, action_array);
1777 action_array.Insert(action);
1793 for (
int i = 0; i < action_array.Count(); i++)
1795 if (action == action_array.Get(i))
1797 action_array.Remove(i);
1801 InputActionMap.Insert(ai, action_array);
1803 action_array.Insert(action);
1859 if (gloves && gloves.GetHealthLevel() < 4)
1892 string surface;
int liquid;
1893 g_Game.SurfaceUnderObject(
this, surface, liquid);
1896 if (shoes && shoes.GetHealthLevel() < 4)
1908 if (pUserInt % 2 == 0)
1946 #ifdef DIAG_DEVELOPER
1947 void SetStaminaDisabled(
bool value)
2005 if (GetThrowing() && GetThrowing().IsThrowingModeEnabled())
2053 g_Game.GetMission().HideInventory();
2065 g_Game.GetMission().HideInventory();
2076 if (IsControlledPlayer())
2085 return super.CanReleaseAttachment(attachment);
2090 return super.CanReleaseCargo(cargo);
2095 return super.CanReceiveItemIntoCargo(item);
2100 return super.CanSwapItemInCargo(child_entity, new_entity);
2111 return super.CanReceiveItemIntoHands(item_to_hands);
2246 float add_health_coef = 0.33;
2250 AddHealth(
"LeftLeg",
"Health", (GetMaxHealth(
"LeftLeg",
"Health") - GetHealth(
"LeftLeg",
"Health") ) * add_health_coef );
2251 AddHealth(
"RightLeg",
"Health", (GetMaxHealth(
"RightLeg",
"Health") - GetHealth(
"RightLeg",
"Health")) * add_health_coef );
2252 AddHealth(
"RightFoot",
"Health", (GetMaxHealth(
"RightFoot",
"Health") - GetHealth(
"RightFoot",
"Health")) * add_health_coef );
2253 AddHealth(
"LeftFoot",
"Health", (GetMaxHealth(
"LeftFoot",
"Health") - GetHealth(
"LeftFoot",
"Health")) * add_health_coef );
2263 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2360 for (
int att = 0; att < attcount; ++att)
2363 if (attachment.IsItemBase())
2365 item_name = attachment.GetType();
2366 if (
g_Game.IsKindOf(item_name, searched_item))
2379 if (!
g_Game.IsMultiplayer() &&
g_Game.GetPlayer() &&
g_Game.GetPlayer().GetID() ==
this.GetID())
2381 PluginSceneManager scene_editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager));
2382 scene_editor.InitLoad();
2404 if (IsControlledPlayer())
2412 m_Hud.UpdateBloodName();
2414 g_Game.GetUIManager().CloseAll();
2415 mission.SetPlayerRespawning(
false);
2416 mission.OnPlayerRespawned(
this);
2418 m_Hud.ShowQuickbarUI(
true);
2419 m_Hud.UpdateQuickbarGlobalVisibility();
2420 m_Hud.InitHeatBufferUI(
this);
2421 m_Hud.OnPlayerLoaded();
2425 if (!
g_Game.IsDedicatedServer())
2432 m_CharactersHead = Head_Default.Cast(GetInventory().FindPlaceholderForSlot(slotId));
2442 wpn.DelayedValidateAndRepair();
2446 wpn.ValidateAndRepair();
2505 EntityAI entityInHands = GetEntityInHands();
2516 else if (entityInHands && entityInHands.HasEnergyManager())
2518 if (entityInHands.GetCompEM().IsPlugged())
2519 entityInHands.OnPlacementCancelled(
this);
2531 EntityAI entityInHands = GetEntityInHands();
2532 if (entityInHands && entityInHands.HasEnergyManager())
2534 if (entityInHands.GetCompEM().IsPlugged())
2535 entityInHands.OnPlacementCancelled(
this);
2579 if (IsControlledPlayer())
2581 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2592 if (IsControlledPlayer())
2594 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2616 m_ProcessResetADS =
true;
2619 else if (!
g_Game.IsMultiplayer())
2633 m_ProcessResetADS =
false;
2655 foreach (
string t: disallowedUndergroundTypes)
2657 if (item.IsKindOf(t))
2809 if (!IsPlayerSelected() || !IsAlive())
2825 EntityAI heldEntity = GetEntityInHands();
2826 if (heldEntity && heldEntity.HasEnergyManager() && heldEntity.GetCompEM().IsPlugged())
2829 EntityAI placed_entity = heldEntity;
2832 placed_entity.GetCompEM().UpdatePlugState();
2840 if (!m_DeathSyncSent && m_KillerData)
2843 m_DeathSyncSent =
true;
2856 if (m_PlayerSoundEventHandler)
2857 m_PlayerSoundEventHandler.OnTick(delta_time);
2874 #ifdef DIAG_DEVELOPER
2877 m_WeaponDebug.OnCommandHandlerUpdate();
2890 if (m_ProcessResetADS)
2920 int currentTime =
g_Game.GetTime();
2921 float deltaT = (currentTime -
m_LastTick) * 0.001;
2933 super.EEItemIntoHands(item);
2937 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(item, {
Bolt_Base});
2942 w.ResetWeaponAnimState();
2948 GetMeleeFightLogic().SetBlock(
false);
2953 if (item.IsHeavyBehaviour() && IsRaised())
2962 SurrenderDummyItem dummyItem;
2972 super.EEItemOutOfHands(item);
2979 SurrenderDummyItem dummyItem;
2991 override void CommandHandler(
float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished)
2993 EvaluateDamageHit(pCurrentCommandID);
2996 super.CommandHandler(pDt,pCurrentCommandID,pCurrentCommandFinished);
2998 vector playerPosition = PhysicsGetPositionWS();
3099 HandleDamageHit(pCurrentCommandID);
3103 mngr.Update(pCurrentCommandID);
3108 if (!m_UnconsciousDebug)
3111 if (m_ShouldBeUnconscious && m_IsUnconscious)
3116 m_Swimming.m_bWasSwimming |= hcu.
IsInWater();
3119 if (m_Swimming.m_bWasSwimming)
3127 else if (m_ShouldBeUnconscious)
3136 m_IsUnconscious =
true;
3144 m_LastCommandBeforeUnconscious = pCurrentCommandID;
3152 m_TransportCache = null;
3156 m_JumpClimb.CheckAndFinishJump();
3157 StartCommand_Unconscious(0);
3158 SetFallYDiff(playerPosition[1]);
3162 else if (m_IsUnconscious)
3175 if (m_Swimming.m_bWasSwimming || m_LastCommandBeforeUnconscious ==
DayZPlayerConstants.COMMANDID_VEHICLE)
3178 hcu.
WakeUp(wakeUpStance);
3180 m_IsUnconscious =
false;
3189 m_IsUnconscious =
false;
3198 if (quickBarSlot && IsAlive())
3226 bool isSwimmingOrClimbing = GetCommand_Swim() || GetCommand_Climb() || GetCommand_Ladder();
3227 bool isStaminaLimitAppliable = hcm || isSwimmingOrClimbing;
3229 if (isStaminaLimitAppliable)
3238 if (!
g_Game.IsDedicatedServer())
3259 #ifdef DIAG_DEVELOPER
3261 m_Bot.OnUpdate(pDt);
3271 TryGetInVehicleDebug();
3278 void SetGetInVehicleDebug(
EntityAI ent)
3280 m_GetInVehicleTransportDebug =
Transport.Cast(ent);
3283 void TryGetInVehicleDebug()
3285 if (m_GetInVehicleTransportDebug)
3287 HumanCommandVehicle vehCommand = StartCommand_Vehicle(m_GetInVehicleTransportDebug, 0, 0);
3290 vehCommand.
SetVehicleType(m_GetInVehicleTransportDebug.GetAnimInstance());
3292 m_GetInVehicleTransportDebug = null;
3325 mission.RemoveActiveInputExcludes({
"map"});
3326 mission.RemoveActiveInputRestriction(EInputRestrictors.MAP);
3328 else if (!
g_Game.IsMultiplayer())
3335 m_hac.InternalCommand(command_ID);
3341 if (!
g_Game.IsDedicatedServer())
3349 m_Hud.ShowQuickbarPlayer(
true);
3352 mission.RemoveActiveInputExcludes({
"map"});
3353 mission.RemoveActiveInputRestriction(EInputRestrictors.MAP);
3390 if (
GetUApi().GetInputByID(UADefaultAction).LocalPress() ||
GetUApi().GetInputByID(UAUIMenu).LocalPress() ||
GetUApi().GetInputByID(UAGear).LocalPress())
3459 if (super.IsLanded(pCurrentCommandID))
3467 bool wasFalling = m_IsUnconsciousFalling;
3468 m_IsUnconsciousFalling = PhysicsIsFalling(
false);
3469 return wasFalling && !m_IsUnconsciousFalling;
3479 if (super.OnLand(pCurrentCommandID, fallDamageData))
3492 if (super.IsAlreadyInFallingCommand(pCurrentCommandID))
3510 g_Game.GetMission().GetHud().ShowHudUI(
false);
3514 EntityAI entity_in_hands = GetEntityInHands();
3520 g_Game.GetSoundScene().SetSoundVolume(0,2);
3530 if (m_TransportCache)
3531 m_TransportCache.MarkCrewMemberUnconscious(m_TransportCache.CrewMemberIndex(
this));
3535 g_Game.EnableVoN(
this,
false);
3543 if (GetMeleeFightLogic())
3545 GetMeleeFightLogic().SetBlock(
false);
3549 SetMasterAttenuation(
"UnconsciousAttenuation");
3567 g_Game.GetSoundScene().SetSoundVolume(
g_Game.m_volume_sound,1);
3568 PPERequester_UnconEffects requester = PPERequester_UnconEffects.Cast(PPERequesterBank.GetRequester(PPERequester_UnconEffects));
3569 requester.FadeOutEffect();
3588 g_Game.EnableVoN(
this,
true);
3596 SetMasterAttenuation(
"");
3617 PluginAdminLog adm = PluginAdminLog.Cast(
GetPlugin(PluginAdminLog));
3618 adm.PlayerKilledByDrowningUncon(
this);
3620 SetHealth(
"",
"",-100);
3625 g_Game.GetMission().GetHud().ShowQuickbarUI(
false);
3631 float sin_normalized = (sin + 1) / 2;
3632 if (sin_normalized < 0.05)
3638 PPERequesterBank.GetRequester(PPERequester_UnconEffects).Start(
m_UnconParam);
3662 return m_IsUnconscious;
3667 #ifdef DIAG_DEVELOPER
3668 if (!m_CanBeTargetedDebug)
3674 return super.CanBeTargetedByAI(ai) && !
IsUnconscious() && !IsInVehicle();
3679 AddHealth(
"",
"Shock",shock);
3686 g_Game.GetMission().RemoveActiveInputExcludes({
"inventory"},
true);
3687 g_Game.GetMission().RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
3779 if (attachment && attachment.GetType() ==
"Splint_Applied")
3781 attachment.Delete();
3801 hcm = GetCommand_Move();
3810 m_JumpClimb.CheckAndFinishJump();
3819 float avgLegHealth = GetHealth(
"RightLeg",
"") + GetHealth(
"LeftLeg",
"") + GetHealth(
"RightFoot",
"") + GetHealth(
"LeftFoot",
"");
3820 avgLegHealth *= 0.25;
3826 PhysicsGetVelocity(v);
3835 if (IsClimbingLadder())
3863 void MovingShock(
float legHealth,
float highShock,
float midShock,
float lowShock)
3884 Param1<float> damage =
new Param1<float>(0);
3885 damage.param1 = dmg;
3886 g_Game.RPCSingleParam(
this,
ERPCs.RPC_SHOCK, damage,
true, GetIdentity());
3895 return super.CanPickupHeavyItem(item);
3901 SetHealth(
"RightLeg",
"", 0);
3902 SetHealth(
"RightFoot",
"", 0);
3903 SetHealth(
"LeftLeg",
"", 0);
3904 SetHealth(
"LeftFoot",
"", 0);
3910 if (itemInHands && itemInHands.IsHeavyBehaviour())
3918 if (attachment && attachment.GetType() ==
"Splint_Applied")
3933 if (itemInHands.IsHeavyBehaviour())
3937 ServerDropEntity(itemInHands);
3944 itemInHands.OnItemInHandsPlayerSwimStart(
this);
3959 g_Game.GetMission().AddActiveInputExcludes({
"swimming"});
3974 g_Game.GetMission().RemoveActiveInputExcludes({
"swimming"});
3988 g_Game.GetMission().AddActiveInputExcludes({
"ladderclimbing"});
3999 g_Game.GetMission().RemoveActiveInputExcludes({
"ladderclimbing"});
4024 m_JumpClimb.CheckAndFinishJump();
4073 EntityAI itemOnHead = FindAttachmentBySlotName(
"Headgear");
4075 if (itemInHand && itemInHand.GetCompEM())
4076 itemInHand.GetCompEM().SwitchOff();
4080 if (itemOnHead && itemOnHead.GetCompEM())
4081 itemOnHead.GetCompEM().SwitchOff();
4083 g_Game.GetMission().AddActiveInputExcludes({
"vehicledriving"});
4092 if (!m_ShouldBeUnconscious)
4095 g_Game.GetMission().RemoveActiveInputExcludes({
"vehicledriving"});
4124 super.OnCommandDeathStart();
4159 return ((1 << stance) & stanceMask) != 0;
4187 if (GetThrowing().IsThrowingAnimationPlaying())
4193 if (
Math.
AbsInt(previousStance - newStance) == 3)
4259 g_Game.SurfaceUnderObject(
this, surfaceType, liquidType);
4270 m_Hud.ShowVehicleInfo();
4272#ifdef FEATURE_NETWORK_RECONCILIATION
4279 identity.Possess(pawn);
4286#ifdef FEATURE_NETWORK_RECONCILIATION
4290 if (identity && !m_ShouldBeUnconscious)
4293 identity.Possess(
this);
4299 m_Hud.HideVehicleInfo();
4304 if (change_to_enabled)
4335 int currentTime =
g_Game.GetTime();
4383 #ifdef DIAG_DEVELOPER
4384 DiagOnPostFrame(other, extra);
4388#ifdef DIAG_DEVELOPER
4389 protected void DiagOnPostFrame(
IEntity other,
int extra)
4395 m_WeaponDebug.OnPostFrameUpdate();
4398 if (GetBleedingManagerRemote())
4400 GetBleedingManagerRemote().OnUpdate();
4407 m_MeleeDebug =
true;
4410 else if (!DiagMenu.GetBool(
DiagMenuIDs.MELEE_DEBUG) && m_MeleeDebug)
4412 m_MeleeDebug =
false;
4417 if (DiagMenu.GetBool(
DiagMenuIDs.SOUNDS_ITEM_IMPACT_SOUNDS))
4418 InventoryItem.DrawImpacts();
4422 PluginDrawCheckerboard drawCheckerboard = PluginDrawCheckerboard.Cast(
GetPluginManager().GetPluginByType(PluginDrawCheckerboard));
4423 if (drawCheckerboard && !drawCheckerboard.IsActive())
4425 drawCheckerboard.ShowWidgets(DiagMenu.GetBool(
DiagMenuIDs.MISC_DRAW_CHECKERBOARD));
4429 if (m_PresenceNotifier)
4431 m_PresenceNotifier.EnableDebug(DiagMenu.GetBool(
DiagMenuIDs.MISC_PRESENCE_NOTIFIER_DBG));
4434 if (m_TargetTemperatureDiag)
4436 m_TargetTemperatureDiag.ShowDebug(DiagMenu.GetBool(
DiagMenuIDs.MISC_TARGET_TEMPERATURE));
4439 if (DiagMenu.GetBool(
DiagMenuIDs.TRIGGER_PLAYER_DEBUG))
4442 GetCollisionBox(minmax);
4445 if (m_IsInsideTrigger)
4452 dbgShape.CreateMatrix(mat);
4453 dbgShape.SetMatrix(mat);
4457 if (m_Environment && m_Environment.m_Debug)
4460 EnvDebugData envDebugData = m_Environment.GetEnvDebugData();
4461 g_Game.RPCSingleParam(
this,
ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG_DATA, envDebugData,
false, GetIdentity());
4463 m_Environment.ShowEnvDebugPlayerInfo(DiagMenu.GetBool(
DiagMenuIDs.MISC_ENVIRONMENT_DEBUG));
4467 if (m_FallDamage && m_FallDamage.m_Debug)
4470 FallDamageDebugData fallDamageDebugData = m_FallDamage.GetFallDamageDebugData();
4471 g_Game.RPCSingleParam(
this,
ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG_DATA, fallDamageDebugData,
false, GetIdentity());
4473 m_FallDamage.ShowFallDamageDebugInfo(DiagMenu.GetBool(
DiagMenuIDs.MISC_FALLDAMAGE_DEBUG));
4478 override void OnEnterTrigger(ScriptedEntity trigger)
4480 super.OnEnterTrigger(trigger);
4482 ++m_IsInsideTrigger;
4485 override void OnLeaveTrigger(ScriptedEntity trigger)
4487 super.OnLeaveTrigger(trigger);
4489 --m_IsInsideTrigger;
4496 m_Hud.SetStaminaBarVisibility(show);
4531 override bool CanClimb(
int climbType, SHumanCommandClimbResult climbRes)
4549 return super.CanClimb(climbType,climbRes);
4571 return super.CanJump();
4576 return m_JumpClimb.m_bIsJumpInProgress;
4582 temp =
g_Game.GetMission().GetActiveRefresherLocations();
4583 int count = temp.Count();
4586 vector pos = target.GetPosition();
4587 for (
int i = 0; i < count; i++)
4616 GetItemAccessor().OnItemInHandsChanged(
true);
4617 GetItemAccessor().ResetWeaponInHands();
4631 vector pdir = GetDirection();
4656 if (GetThrowing().IsThrowingModeEnabled() || GetThrowing().IsThrowingAnimationPlaying())
4680 if (!quickBarEntity)
4689 EntityAI inHandEntity = GetEntityInHands();
4691 if (!GetDayZPlayerInventory().
IsIdle())
4695 handInventoryLocation.
SetHands(
this,quickBarEntity);
4699 if (inHandEntity == quickBarEntity)
4701 if (GetHumanInventory().CanRemoveEntityInHands())
4704 PredictiveMoveItemFromHandsToInventory();
4710 quickBarEntity.GetInventory().GetCurrentInventoryLocation(invLocQBItem);
4718 int index = GetHumanInventory().FindUserReservedLocationIndex(inHandEntity);
4720 GetHumanInventory().GetUserReservedLocation(index, inHandEntityFSwapDst);
4750 if (GetInventory().IsInventoryLocked())
4762 if (itemInHands != quickBarItem)
4772 if (IsRaised() || GetCommand_Melee())
4840 EntityAI entity_in_hands = GetEntityInHands();
4862 mngr_client.Interrupt();
4864 else if (GetEntityInHands()!= magazine)
4902 int last_ammo_magazine_count;
4903 int ammo_magazine_count;
4906 int last_ammo_pile_count;
4907 int ammo_pile_count;
4912 for (
int att_i = 0; att_i < nAttachment; ++att_i)
4915 ref
CargoBase attachment_cargo = attachment.GetInventory().GetCargo();
4917 if (attachment_cargo)
4919 int nAttachmentCargoItem = attachment_cargo.GetItemCount();
4920 for (
int cgo_i = 0; cgo_i < nAttachmentCargoItem; ++cgo_i)
4922 EntityAI cargo_item = attachment_cargo.GetItem(cgo_i);
4925 if (cargo_item.IsMagazine())
4927 Magazine magazine = Magazine.Cast(cargo_item);
4928 ammo_pile_count = magazine.GetAmmoCount();
4933 if (ammo_pile_count > 0)
4935 if (last_ammo_magazine_count == 0)
4937 ammo_magazine = magazine;
4938 last_ammo_magazine_count = ammo_pile_count;
4942 if (last_ammo_magazine_count < ammo_pile_count)
4944 ammo_magazine = magazine;
4945 last_ammo_magazine_count = ammo_pile_count;
4951 else if (weapon_manager.
CanLoadBullet(weapon_base, magazine))
4953 if (ammo_pile_count > 0)
4955 if (last_ammo_pile_count == 0)
4957 ammo_pile = magazine;
4958 last_ammo_pile_count = ammo_pile_count;
4962 if (last_ammo_pile_count > ammo_pile_count)
4964 ammo_pile = magazine;
4965 last_ammo_pile_count = ammo_pile_count;
4978 return ammo_magazine;
4991 g_Game.GetMission().AddDummyPlayerToScheduler(
this);
4995#ifdef DIAG_DEVELOPER
4998 m_Bot =
new Bot(
this);
5030 override SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
false)
5037 return GetWeightEx();
5064 return GetInventory().HasEntityInInventory(entity);
5069 if (
g_Game.IsMultiplayer())
5085 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
5087 bool cp_owned =
false;
5089 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
5091 bool np_owned =
false;
5093 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
5095 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
5100 Error(
"[syncinv] unsupported instance type t=" + t);
5110 float totalWeight = super.GetWeightSpecialized(forceRecalc);
5115 totalWeight += itemHands.GetWeightEx(forceRecalc);
5118 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
5120 float itemInHandsWeight = totalWeight - super.GetWeightSpecialized(forceRecalc);
5122 dta.
SetCalcDetails(
"TMan: " + (super.GetWeightSpecialized(forceRecalc)+ itemInHandsWeight) +
"(contents weight[includes item in hands])");
5130 const int VISIBILITY_SLOTS_COUNT = 10;
5132 int attcount = GetInventory().AttachmentCount();
5133 float sumVisibility = 0;
5134 float countVisibility = 0;
5135 float visibilityMean = 0;
5139 for (
int att = 0; att < attcount; att++)
5141 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
5142 if (attachment.IsClothing())
5146 sumVisibility += clothing.GetItemVisibility();
5151 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
5180 float health = GetHealth(
"",
"");
5192 float blood = GetHealth(
"",
"Blood");
5220 float immmunity_max = 1;
5227 float health = GetHealth(
"",
"");
5228 float health_max = GetMaxHealth(
"",
"");
5241 float blood = GetHealth(
"",
"Blood");
5242 float blood_max = GetMaxHealth(
"",
"Blood");
5264 if (stat_value <= critical)
5268 if (stat_value <= low)
5272 if (stat_value <= normal)
5276 if (stat_value <= high)
5285 if (stat_value <= critical)
5289 if (stat_value <= low)
5293 if (stat_value <= normal)
5297 if (stat_value <= high)
5317 float max_health = GetMaxHealth(
"GlobalHealth",
"Health") + 0.01;
5318 float max_blood = GetMaxHealth(
"GlobalHealth",
"Blood") + 0.01;
5321 float health_normalized = GetHealth(
"GlobalHealth",
"Health") / max_health;
5322 float blood_normalized = GetHealth(
"GlobalHealth",
"Blood") / max_blood;
5323 immunity = energy_normalized + water_normalized + health_normalized + blood_normalized;
5324 immunity = immunity / 4;
5338 if (IsRaised() || (item && item.IsHeavyBehaviour()))
5344 if (item && GetThrowing() && GetThrowing().IsThrowingModeEnabled())
5370 return GetCommand_Move() && GetCommand_Move().IsInRoll();
5408 if (!m_FightEndBlendTimer)
5409 m_FightEndBlendTimer =
new Timer();
5410 if (!m_FightEndBlendTimer.IsRunning())
5425 if (item && item.GetHierarchyParent() && item.GetHierarchyParent().IsWeapon() && item.IsRuined())
5446 super.RPC(rpc_type, params, guaranteed, recipient);
5452 super.OnRPC(sender, rpc_type, ctx);
5458 case ERPCs.RPC_PLAYER_STAT:
5463 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5470 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5477 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5484 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5489 case ERPCs.RPC_USER_ACTION_MESSAGE:
5501 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5502 ref Param1<float> p_synch =
new Param1<float>(0);
5504 float specialty_level = p_synch.param1;
5508 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5509 ref Param5<float, float, float, float, bool> p_debug_synch =
new Param5<float, float ,float, float, bool>(0, 0, 0, 0,
false);
5510 ctx.
Read(p_debug_synch);
5511 float general_bonus_before = p_debug_synch.param1;
5512 float general_bonus_after = p_debug_synch.param2;
5513 float last_UA_value = p_debug_synch.param3;
5514 float cooldown_value = p_debug_synch.param4;
5515 float cooldown_active = p_debug_synch.param5;
5523 case ERPCs.RPC_WARNING_ITEMDROP:
5528 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5533 case ERPCs.RPC_WARNING_TELEPORT:
5538 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5542 case ERPCs.RPC_INIT_SET_QUICKBAR:
5543 ref Param1<int> count =
new Param1<int>(0);
5544 if (ctx.
Read(count))
5546 for (
int i = 0; i < count.param1 ; i++)
5553 case ERPCs.RPC_SYNC_THERMOMETER:
5556 if (ctx.
Read(value))
5557 m_Hud.SetTemperature(value.
ToString() +
"#degrees_celsius");
5562 case ERPCs.RPC_CHECK_PULSE:
5583 case PlantType.TREE_HARD:
5584 SoundHardTreeFallingPlay();
5587 case PlantType.TREE_SOFT:
5588 SoundSoftTreeFallingPlay();
5591 case PlantType.BUSH_HARD:
5592 SoundHardBushFallingPlay();
5595 case PlantType.BUSH_SOFT:
5596 SoundSoftBushFallingPlay();
5599 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5606 case ERPCs.RPC_DEBUG_MONITOR_STR:
5613 case ERPCs.RPC_ITEM_REPAIR:
5614 PluginInventoryRepair repairPlugin = PluginInventoryRepair.Cast(
GetPlugin(PluginInventoryRepair));
5615 repairPlugin.OnRPC(ctx);
5631 #ifdef DIAG_DEVELOPER
5632 case ERPCs.DEV_RPC_AGENT_RESET:
5640 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5642 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
5643 plugin_remote_server.OnRPC(ctx,
this);
5647 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5649 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
5650 PluginDeveloper plugin_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5651 if (plugin_dev.m_ScriptConsole)
5652 plugin_dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5654 plugin_remote_client.OnRPC(ctx);
5658 case ERPCs.DEV_AGENT_GROW:
5664 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5667 mid.StopWatchRequest(
this);
5672 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5674 PluginUniversalTemperatureSourceServer plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5675 plugin_uts_server.OnRPC(ctx,
this);
5679 case ERPCs.DEV_UTS_DEBUG_DATA:
5681 PluginUniversalTemperatureSourceClient plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5682 plugin_uts_client.OnRPC(ctx);
5689 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5698 bool success =
g_Game.ExecuteEnforceScript(
"void scConsMain() \n{\n" + code +
"\n}\n",
"scConsMain");
5705 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5707 PluginDeveloper dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5708 if (dev.m_ScriptConsole)
5709 dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5713 case ERPCs.DEV_SET_DEV_ITEM:
5715 Param1<EntityAI> ent =
new Param1<EntityAI>(null);
5716 if (ctx.
Read(ent) && ent.param1)
5719 mid2.RegisterDebugItem(ent.param1,
this);
5725 case ERPCs.RPC_ITEM_DIAG:
5727 Param1<EntityAI> p1 =
new Param1<EntityAI>(null);
5731 plgn.OnRPC(p1.param1, ctx);
5738 #ifdef DIAG_DEVELOPER
5739 PluginDeveloper module_rc = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5741 module_rc.OnRPC(
this, rpc_type, ctx);
5743 PluginDeveloperSync module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
5745 module_rcs.OnRPC(
this, rpc_type, ctx);
5753 if (plugin_diag_menu)
5754 plugin_diag_menu.
OnRPC(
this, rpc_type, ctx);
5760 super.OnGameplayDataHandlerSync();
5807 if (
Class.
CastTo(ppeRequester, PPERequesterBank.GetRequester(ppeIdx)))
5808 ppeRequester.
Start();
5831 PPERequesterBank.GetRequester(ppeIdx).Stop(
new Param1<bool>(
true));
5862 g_Game.GetWeather().GetSnowfall().GetLimits(min,max);
5870 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
5871 if (!
g_Game.IsDedicatedServer())
5888 super.OnVariablesSynchronized();
6003 item.SetHealthMax(
"",
"");
6004 item.SetWet(item.GetWetInit());
6006 item.SetFrozen(
false);
6017 m_PlayerSelected =
true;
6025#ifdef FEATURE_NETWORK_RECONCILIATION
6029 identity.Possess(
this);
6048 Param1<int> paramCount =
new Param1<int>(count);
6049 params.Insert(paramCount);
6050 for (
int i = 0; i < count; i++)
6056 if (count > 0 &&
g_Game.IsMultiplayer())
6058 g_Game.RPC(
this,
ERPCs.RPC_INIT_SET_QUICKBAR, params,
true, identity);
6068 if (
g_Game.IsMultiplayer())
6073 g_Game.RPCSingleParam(
this,
ERPCs.RPC_WARNING_ITEMDROP, null,
true, identity);
6077 g_Game.GetMission().SyncRespawnModeInfo(identity);
6104 g_Game.GetMission().ResetGUI();
6114 int characterCount =
g_Game.GetMenuData().GetCharactersCount() - 1;
6115 int idx =
g_Game.GetMenuData().GetLastPlayedCharacter();
6121 g_Game.GetMission().EnableAllInputs(
true);
6125 #ifdef DIAG_DEVELOPER
6126 m_TargetTemperatureDiag = PluginTargetTemperature.Cast(
GetPlugin(PluginTargetTemperature));
6127 m_TargetTemperatureDiag.Init(
this);
6133 m_Bot =
new Bot(
this);
6140 super.SimulateDeath(state);
6163 BurlapSackCover attachment;
6166 PPERequester_BurlapSackEffects req;
6167 if (
Class.
CastTo(req,PPERequesterBank.GetRequester(PPERequesterBank.REQ_BURLAPSACK)))
6173 else if (req.IsRequesterRunning())
6175 PPERequesterBank.GetRequester(PPERequester_BurlapSackEffects).Stop();
6192 if (item && item.IsObstructingVoice())
6194 item.MutePlayer(
this,
true);
6198 g_Game.SetVoiceEffect(
this, VoiceEffectMumbling,
false);
6199 g_Game.SetVoiceEffect(
this, VoiceEffectObstruction,
false);
6208 float resistance = 0;
6209 if (mask.HasIntegratedFilter() || mask.IsExternalFilterAttached())
6210 resistance = 1 - mask.GetFilterQuantity01();
6242 if (
m_EffectWidgets.m_MaskWidgetUpdateCount < 2 && callback.GetLength() > 2 && playback_time > 0.5 )
6252 if (super.OnInputUserDataProcess(userDataType, ctx))
6280 if (ctx.
Read(uid) && ctx.
Read(mute))
6282 g_Game.MutePlayer(uid, GetIdentity().GetPlainId(), mute);
6301 float blood = GetHealth(
"GlobalHealth",
"Blood");
6303 blood_scale_normalized =
Math.
Clamp(blood_scale_normalized,0,1);
6316 bool use_stack_max =
false;
6321 if (!ctx.
Read(type))
6326 if (!ctx.
Read(item1))
6333 if (!ctx.
Read(dummy))
6338 item1.GetInventory().GetCurrentInventoryLocation(srcIL);
6347 item1.SplitItemToInventoryLocation(dstIL);
6349 item1.SplitIntoStackMaxToInventoryLocation(dstIL);
6355 if (!ctx.
Read(item1))
6357 if (!ctx.
Read(item2))
6359 if (!ctx.
Read(use_stack_max))
6361 if (!ctx.
Read(slot_id))
6364 item1.GetInventory().GetCurrentInventoryLocation(srcIL);
6369 if (type == -1 && item1 && item2)
6371 item2.GetInventory().GetCurrentInventoryLocation(dstIL);
6374 item1.CombineItems(item2, use_stack_max);
6376 else if (type == 1 && item1)
6399 item1.SplitIntoStackMax(item2, slot_id,
this);
6407 item1.SplitItem(
this);
6410 else if (type == 2 && item1 && item2)
6418 dstIL.
SetCargo(item2, item1, slot_id, row, col,
false);
6422 item1.SplitIntoStackMaxCargo(item2, slot_id, row, col);
6424 else if (type == 3 && item1)
6429 item1.SplitIntoStackMaxHands(
this);
6439 return ItemBase.Cast(GetEntityInHands());
6449 bool is_AI =
g_Game.IsKindOf(object_name,
"DZ_LightAI");
6452 return SpawnAI(object_name, pos);
6464 if (
g_Game.IsKindOf(object_name,
"Boat"))
6476 vector posRandom = MiscGameplayFunctions.GetRandomizedPositionVerifiedPlayer(
this,raycastDistance,radius,
this);
6488 bool is_ai =
g_Game.IsKindOf(object_name,
"DZ_LightAI");
6509 item.SetPosition(pos_spawn);
6510 item.PlaceOnSurface();
6511 return can_be_dropped;
6538 string t = src.GetType();
6542 bool locked =
g_Game.HasInventoryJunctureDestination(
this, loc);
6551 MiscGameplayFunctions.TransferItemProperties(src, dst);
6553 g_Game.RemoteObjectTreeCreate(dst);
6573 dst.PlaceOnSurface();
6574 dst.SetResultOfSplit(markItemAsSplitResult);
6575 MiscGameplayFunctions.TransferItemProperties(src, dst);
6594 g_Game.ChatMP(
this, text, style);
6598 g_Game.Chat(text, style);
6605 Message(text,
"colorStatusChannel");
6617 Message(text,
"colorFriendly");
6623 Message(text,
"colorImportant");
6635 g_Game.GetUIManager().CloseAll();
6636 mission.RemoveActiveInputExcludes({
"inventory"},
false);
6637 mission.RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
6655 if ((
g_Game.IsServer() || !
g_Game.IsMultiplayer()) && inventory)
6659 int nItems = items.Count();
6660 for (
int i = 0; i < nItems; ++i)
6665 g_Game.ObjectDelete(item);
6673 LocalDestroyEntityInHands();
6684 int count = itemsArray.Count();
6686 for (
int i = 0; i < count; ++i)
6692 ServerDropEntity(item);
6700 g_Game.ObjectGetType(
this, type);
6730 super.OnParticleEvent(pEventType ,pUserString, pUserInt);
6732 if (!
g_Game.IsDedicatedServer())
6734 if (pUserInt == 123456)
6737 int boneIdx = player.GetBoneIndexByName(
"Head");
6753 eff.SetAutodestroy(
true);
6756 player.AddChild(p, boneIdx);
6765 if (!ToDelete() && IsAlive() && !IsSwimming() && !
m_IsDrowning)
6816 vector pos = GetBonePositionWS(index);
6817 float depth =
g_Game.GetWaterDepth(pos);
6834 state_changed =
true;
6869 set<int> ret =
new set<int>;
6870 ret.Insert(EAttExclusions.SHAVING_MASK_ATT_0);
6871 ret.Insert(EAttExclusions.SHAVING_HEADGEAR_ATT_0);
6902 #ifdef DIAG_DEVELOPER
6904 if (IsControlledPlayer())
6943 if (amount > storedValue)
6985 if (IsPlayerSelected() && !IsAlive())
7035 if (
g_Game.SaveVersion() < 102)
7040 super.OnStoreSave(ctx);
7042 GetHumanInventory().OnStoreSave(ctx);
7072 arrowManager.
Save(ctx);
7097 if (!super.OnStoreLoad(ctx, version))
7101 if (!GetHumanInventory().
OnStoreLoad(ctx, version))
7111 Print(
"---- failed to load PlayerStats ----");
7117 Print(
"---- failed to load ModifiersManager, read fail ----");
7123 Print(
"---- failed to load AgentPool, read fail ----");
7129 Print(
"---- failed to load SymptomManager, read fail ----");
7135 Print(
"---- failed to load BleedingManagerServer, read fail ----");
7141 Print(
"---- failed to load PlayerStomach, read fail ----");
7163 Print(
"---- failed to load Persistent Flags, read fail ----");
7170 if (!ctx.
Read(onLadder))
7178 if (!ctx.
Read(position))
7194 arrowManager.
Load(ctx);
7198 Print(
"---- PlayerBase OnStoreLoad SUCCESS ----");
7204 GetHumanInventory().OnAfterStoreLoad();
7217 if (MiscGameplayFunctions.TeleportPlayerToSafeLocation3D(
this,safePos) &&
m_AdminLog)
7218 m_AdminLog.PlayerTeleportedLog(
this,currentPos,safePos,
"Spawning in Player Restricted Area: " + pra.
areaName);
7233 int lifespan_state = 0;
7234 if (!ctx.
Read(lifespan_state))
7238 int last_shaved = 0;
7239 if (!ctx.
Read(last_shaved))
7245 bool bloody_hands_old;
7246 if (!ctx.
Read(bloody_hands_old))
7252 int bloody_hands = 0;
7253 if (!ctx.
Read(bloody_hands))
7259 bool blood_visible =
false;
7260 if (!ctx.
Read(blood_visible))
7265 if (!ctx.
Read(blood_type))
7275 int hour, minute, second;
7299 g_Game.GetAnalyticsServer().OnPlayerConnect(
this);
7325 g_Game.GetAnalyticsServer().OnPlayerDisconnect(
this);
7346 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7349 float temperature = 0;
7355 if (pollution & EPollution.HEAVYMETAL)
7369 if (!edibleItem || !edibleItem.CanBeConsumed())
7375 temperature = edibleItem.GetTemperature();
7380 if (edibleItem.IsLiquidContainer())
7382 int liquidType = edibleItem.GetLiquidType();
7383 string liquidClassName = Liquid.GetLiquidClassname(liquidType);
7384 if (liquidClassName.
Length() == 0)
7385 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edibleItem) +
" data.m_Type=" + data.
m_Type +
" liquid_type=" + liquidType);
7393 foodStageType = edibleItem.
GetFoodStage().GetFoodStageType();
7412 g_Game.GetUIManager().ScreenFadeIn(0,
"You are Unconscious", FadeColors.BLACK, FadeColors.WHITE);
7417 g_Game.GetUIManager().ScreenFadeOut(0);
7465 if (!
g_Game.IsMultiplayer())
7494 if (m_ReplaceSoundEventHandler)
7495 return m_ReplaceSoundEventHandler.PlayReplaceSound(soundEventID, soundType, param);
7507 if (!m_PlayerSoundEventHandler)
7510 return m_PlayerSoundEventHandler.PlayRequestEx(
id, is_from_server, param);
7515 if (!m_PlayerSoundEventHandler)
7518 return m_PlayerSoundEventHandler.StopRequest(
id, is_from_server, param);
7523 return m_PlayerSoundEventHandler;
7532 if (IsControlledPlayer())
7534 if (!
g_Game.IsDedicatedServer())
7565 if (IsControlledPlayer())
7567 if (!
g_Game.IsDedicatedServer())
7593 #ifdef DIAG_DEVELOPER
7598 DamageSystem.ResetAllZones(
this);
7650 transport.FixEntity();
7668 if (m_PerformedActionSounds.Count() == 0)
7677 m_PerformedActionSounds.Clear();
7683 if (
g_Game.IsClient())
return;
7729 float dist_check = distance * distance;
7730 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7734 if (
vector.
DistanceSq(GetWorldPosition(), target.GetWorldPosition()) < dist_check && target !=
this)
7780 int max_count = PluginTransmissionAgents.GetAgentMaxCount(agent_id);
7781 return m_AgentPool.GetSingleAgentCount(agent_id) / max_count;
7812 float min_distance = 0.5;
7815 vector to = from + (
g_Game.GetCurrentCameraDirection() * min_distance);
7818 int contactComponent;
7820 DayZPhysics.
RaycastRV(from, to, contactPos, contactDir, contactComponent, NULL, NULL, NULL,
false,
true);
7829 return (!mask || (mask && mask.AllowFoodConsumption()));
7912 return m_StatStamina;
7921 return m_StatSpecialty;
7930 return m_StatBloodType;
7939 return m_StatHeatBuffer;
8004#ifdef DIAG_DEVELOPER
8005 if (m_Bot && action_id >
EActions.PLAYER_BOT_INTERNAL_START && action_id <
EActions.PLAYER_BOT_END)
8007 m_Bot.StartAction(action_id);
8012 if (super.OnAction(action_id, player, ctx))
8048 PluginTransmissionAgents pluginTransmissionAgents = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
8050#ifdef DIAG_DEVELOPER
8056 map<int, string> agentList = pluginTransmissionAgents.GetSimpleAgentList();
8060 foreach (
int tid,
string tname : agentList)
8062 string injectName =
"Inject " + tname;
8063 string removeName =
"Remove " + tname;
8073#ifdef DIAG_DEVELOPER
8078 int cnt = e.GetVariableCount();
8081 for (i = 0; i < cnt; i++)
8083 if (!e.GetVariableValue(null, i, val))
8086 if (val <=
EActions.PLAYER_BOT_INTERNAL_START)
8089 if (val ==
EActions.PLAYER_BOT_START)
8095 if (val >=
EActions.PLAYER_BOT_END)
8098 string name = e.GetVariableName(i);
8107 super.GetDebugActions(outputList);
8109 if (Gizmo_IsSupported())
8126 super.OnSyncJuncture(pJunctureID, pCtx);
8143 GetInventory().OnInventoryJunctureFromServer(pCtx);
8146 GetInventory().OnInventoryJunctureFailureFromServer(pCtx);
8168 if (GetAimingModel() && IsFireWeaponRaised())
8170 GetAimingModel().RequestKuruShake(amount);
8203 SetGetInVehicleDebug(vehicle);
8225 item.SetPrepareToDelete();
8232 return !(GetThrowing().IsThrowingAnimationPlaying() || GetDayZPlayerInventory().IsProcessing() || (
GetActionManager() &&
GetActionManager().GetRunningAction()));
8252 for (
int i = count - 1; i >= 0 ; i--)
8255 if (itemToDelete != null)
8257 itemToDelete.GetInventory().GetCurrentInventoryLocation(il);
8268 for (
int j = count - 1; j >= 0 ; j--)
8271 if (itemToDelete == null)
8277 itemToDelete.Delete();
8316 m_fLastHeadingDiff = 0;
8321 return super.HeadingModel(pDt, pModel);
8351 return m_LiftWeapon_player;
8356 return m_ObstructWeapon_player;
8370 if (obstruction <= 0.0)
8375 float penetration = weapon.GetObstructionPenetrationDistance(obstruction);
8376 bool inSights = m_CameraIronsight || m_CameraOptics;
8381 return penetration > 0.040;
8387 return penetration > 0.005;
8417 m_ProcessLiftWeaponState = state;
8418 m_ProcessLiftWeapon =
true;
8419 m_ProcessObstructWeapon = obstruct;
8427 bool liftChange = m_LiftWeapon_player != state;
8428 bool obstructChange =
Math.
AbsFloat(m_ObstructWeapon_player-obstruct) > 0.03;
8431 m_LiftWeapon_player = state;
8432 m_ObstructWeapon_player = obstruct;
8439 if (!liftChange && !obstructChange)
8457 ctx.
Write(obstruct);
8472 bool limited = weap.LiftWeaponCheckEx(
this, obstruct, hitObject);
8473 if (weap.UseWeaponObstruction(
this, obstruct, hitObject))
8482 obstruct =
Math.
Clamp( obstruct, 0, 1 );
8484 if (m_LiftWeapon_player != limited || m_ObstructWeapon_player != obstruct)
8489 else if (m_LiftWeapon_player || m_ObstructWeapon_player > 0)
8498 if (m_ProcessLiftWeapon)
8500 bool liftChange = m_LiftWeapon_player != m_ProcessLiftWeaponState;
8505 m_LiftWeapon_player = m_ProcessLiftWeaponState;
8506 m_ObstructWeapon_player = m_ProcessObstructWeapon;
8507 m_ProcessLiftWeapon =
false;
8516 super.HideClothing(optic, state);
8533 SetInvisibleRecursive(
true,
this,clothingArray);
8543 SetInvisibleRecursive(
false,
this,clothingArray);
8555 super.SetDeathDarknessLevel(duration, tick_time);
8557 if (IsControlledPlayer())
8559 float actual_tick = tick_time;
8568 progress = 1 - ((duration - m_DeathDarkeningCurrentTime) / duration);
8570 m_DeathDarkeningCurrentTime += actual_tick;
8572 if (!IsAlive() && IsPlayerSelected())
8578 if (m_DeathDarkeningCurrentTime >= duration)
8580 StopDeathDarkeningEffect();
8585 StopDeathDarkeningEffect();
8626 OverrideSlidePoseAngle(
Math.
PI2);
8628 else if (!
IsInFBEmoteState() && IsControlledPlayer() && IsPlayerSelected())
8642 isActionPossible =
false;
8643 Magazine mag = Magazine.Cast(item);
8650 isActionPossible =
true;
8668 if (can_detach && target.GetInventory().FindFreeLocationFor(item, flags, il))
8674 return super.PredictiveTakeEntityToTargetInventory(target, flags, item);
8683 if (can_detach && GetInventory().FindFreeLocationFor(item, flags, il))
8689 return super.PredictiveTakeEntityToInventory(flags, item);
8695 Magazine mag = Magazine.Cast(item);
8696 if (parentWpn && mag)
8703 return super.PredictiveTakeEntityToTargetAttachment(target, item);
8709 Magazine mag = Magazine.Cast(item);
8710 if (parentWpn && mag)
8712 if (target.CanReceiveAttachment(item,slot) &&
GetWeaponManager().CanAttachMagazine(parentWpn, mag))
8717 return super.PredictiveTakeEntityToTargetAttachmentEx(target, item,slot);
8732 return super.PredictiveTakeEntityToTargetCargo(target,item);
8743 dst.
SetCargoAuto(cargo, item, row, col, item.GetInventory().GetFlipCargo());
8749 return super.PredictiveTakeEntityToTargetCargoEx (cargo, item, row, col);
8770 return super.PredictiveDropEntity(item);
8776 Magazine swapmag1 = Magazine.Cast(item1);
8777 Magazine swapmag2 = Magazine.Cast(item2);
8779 if (swapmag1 && swapmag2)
8783 if (
Class.
CastTo(parentWpn, swapmag1.GetHierarchyParent()))
8787 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag1=" + swapmag1);
8792 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
8797 if (
Class.
CastTo(parentWpn, swapmag2.GetHierarchyParent()))
8801 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag2=" + swapmag2);
8806 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
8820 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item_hands)))
8825 return super.PredictiveSwapEntities(item1, item2);
8841 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item2)))
8848 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
8853 if (item.IsHeavyBehaviour() && !
m_ActionManager.GetRunningAction() && !item.GetHierarchyParent())
8870 super.PredictiveTakeEntityToHands(item);
8888 return super.PredictiveTakeToDst(src,dst);
8901 item_ground = item1;
8903 item_ground = item2;
8905 return item_hands && item_ground && item_ground.IsHeavyBehaviour();
8916 ErrorEx(
"No valid head detected on character!");
8923 for (
int i = 0; i <
m_CharactersHead.m_HeadHairSelectionArray.Count(); ++i)
8929#ifdef DIAG_DEVELOPER
8942#ifdef DIAG_DEVELOPER
8945 switchState = !diagmenuu.m_HairHidingStateMap.Get(level);
8946 diagmenuu.m_HairHidingStateMap.Set(level, switchState);
8952 switchState = !state;
8975 if (item.HidesSelectionBySlot())
8978 for (i = 0; i < count; ++i)
8980 if (itemInventory.
GetSlotId(i) == slot_id)
8982 str = item.GetHeadHidingSelection().Get(i);
8988 Debug.
Log(
"No valid selection '" + str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
8995 count = item.GetHeadHidingSelection().Count();
8996 for (i = 0; i < count; i++)
8998 str = item.GetHeadHidingSelection().Get(i);
9004 Debug.
Log(
"No valid selection '" + str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
9016 bool exception_hidden =
false;
9028 for (i = 0; i < count; i++)
9033 for (i = 0; i < count; i++)
9047 exception_hidden =
true;
9053 if (exception_hidden)
9065 for (
int i = 0; i < translatedSelectinosArray.Count(); i++)
9067 index = translatedSelectinosArray.Get(i);
9120 Error(
"AddActiveNV | illegal server-side call!");
9135 Error(
"RemoveActiveNV | illegal server-side call!");
9153 string text = super.GetDebugText();
9170 void DEBUGRotateNVG()
9174 if (FindAttachmentBySlotName(
"Eyewear"))
9176 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Eyewear").FindAttachmentBySlotName(
"NVG"));
9178 else if (FindAttachmentBySlotName(
"Headgear"))
9180 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Headgear").FindAttachmentBySlotName(
"NVG"));
9185 nvg.RotateGoggles(nvg.m_IsLowered);
9194 if (slot_name ==
"Headgear")
9196 item.SetSimpleHiddenSelectionState(0,1);
9197 item.SetSimpleHiddenSelectionState(1,0);
9199 else if (slot_name ==
"Mask")
9201 item.SetSimpleHiddenSelectionState(0,0);
9202 item.SetSimpleHiddenSelectionState(1,1);
9211 if (slot_name ==
"Headgear")
9213 item.SetSimpleHiddenSelectionState(0,1);
9214 item.SetSimpleHiddenSelectionState(1,0);
9216 else if (slot_name ==
"Mask")
9218 item.SetSimpleHiddenSelectionState(0,0);
9219 item.SetSimpleHiddenSelectionState(1,1);
9241 int nBodyparts = bodyparts.Count();
9242 for (
int i = 0; i < nBodyparts; ++i)
9250 path =
"cfgVehicles " + bodypart.GetType();
9251 idx = bodypart.GetHiddenSelectionIndex(
"personality");
9259 path =
"cfgVehicles " + item.GetType();
9260 idx = item.GetHiddenSelectionIndex(
"personality");
9323 int idx = GetHiddenSelectionIndex(
"decay_preload");
9389 legZones.Insert(
"LeftLeg");
9390 legZones.Insert(
"RightLeg");
9391 legZones.Insert(
"RightFoot");
9392 legZones.Insert(
"LeftFoot");
9394 foreach (
string legZone : legZones)
9395 DecreaseHealth(legZone,
"", inputDmg);
9403 if (!hide && ((!IsSwimming() && !IsClimbingLadder() && !IsInVehicle() && !
AnimCommandCheck(HumanMoveCommandID.CommandSwim | HumanMoveCommandID.CommandLadder | HumanMoveCommandID.CommandVehicle)) || force))
9406 GetItemAccessor().HideItemInHands(
false);
9411 GetItemAccessor().HideItemInHands(
true);
9419 if (target.GetInventory().FindFreeLocationFor(item, flags, il))
9429 float stackableTarget = item.GetTargetQuantityMax(slotID);
9430 if (stackableTarget > 0 && stackableTarget < item.GetQuantity())
9433 if (CastTo(itemB, item))
9435 itemB.SplitIntoStackMaxToInventoryLocationClient(il);
9450 return super.TakeEntityToInventoryImpl(mode, flags, item);
9461 return super.TakeEntityToCargoImpl(mode, item);
9472 return super.TakeEntityAsAttachmentImpl(mode, item);
9483 super.TakeEntityToHandsImpl(mode, item);
9494 return super.TakeEntityToTargetInventoryImpl(mode, target, flags, item);
9505 return super.TakeEntityToTargetCargoImpl(mode, target, item);
9516 return super.TakeEntityToTargetAttachmentImpl(mode, target, item);
9527 return super.TakeToDstImpl(mode, src, dst);
9541 float playerSpeed = GetCommand_Move().GetCurrentMovementSpeed();
9547 float particleLifetime = 5.25;
9548 float particleSpeed = 0.25;
9549 if (playerSpeed >= 1)
9551 particleLifetime = 3.5;
9552 particleSpeed = 3.25;
9554 if (playerSpeed >= 2)
9556 particleLifetime = 2.5;
9557 particleSpeed = 5.25;
9559 if (playerSpeed >= 3)
9561 particleLifetime = 1.5;
9562 particleSpeed = 8.25;
9571 GetTransform(transform);
9579 if (!IsControlledPlayer())
9607 int pivot = componentIndex;
9623 vector parentTransMat[4];
9626 arrow.GetTransform(arrowTransMat);
9630 GetTransformWS(parentTransMat);
9637 parentTransMat[0] = rotMatrix[0];
9638 parentTransMat[1] = rotMatrix[1];
9639 parentTransMat[2] = rotMatrix[2];
9640 parentTransMat[3] = closeBonePosWS;
9645 arrow.SetTransform(arrowTransMat);
9652 if (bleedingManager)
9654 if (!bleedingManager.AttemptAddBleedingSourceBySelection(compName))
9655 bleedingManager.AttemptAddBleedingSourceBySelection(
"Pelvis");
9677 super.OnFreezeStateChangeClient();
9726 consumeData.
m_Type = consume_type;
9753 [
Obsolete(
"use the GetUndergroundHandler instead")]
9766 [
Obsolete(
"not used but kept in the case of modders needing/using it")]
Param4< int, int, string, int > TSelectableActionInfoWithColor
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
eBleedingSourceType GetType()
void ActionDrinkPondContinuous()
ActionEatSnowContinuousCB ActionContinuousBaseCB ActionEatSnowContinuous()
void ActionManagerBase(PlayerBase player)
map< typename, ref array< ActionBase_Basic > > TInputActionMap
ActionStartCarCB ActionContinuousBaseCB ActionStartEngine()
ActionStartEngineBoatCB ActionContinuousBaseCB ActionStartEngineBoat()
class ActionTargets ActionTarget
ActionUncoverHeadBase ActionContinuousBase ActionUncoverHeadSelf()
override bool CanBePerformedWhileChangingStance()
ActionWashHandsSnowCB ActionContinuousBaseCB ActionWashHandsSnow()
ActionWashHandsWaterCB ActionContinuousBaseCB ActionWashHandsWater()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
override ArrowManagerBase GetArrowManager()
const int BREATH_VAPOUR_LEVEL_MAX
void EffectRadial(Param param1, Param param2)
override event void Read(PawnStateReader ctx)
override event void Write(PawnStateWriter ctx)
const int ECE_EQUIP_ATTACHMENTS
const int ECE_PLACE_ON_SURFACE
const int ECE_IN_INVENTORY
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DamageType
exposed from C++ (do not change)
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
ref HumanMovementState m_MovementState
movement state
void DayZPlayerCameraOptics(DayZPlayer pPlayer, HumanInputController pInput)
override bool OnInventoryCheck(int userDataType, ParamsReadContext ctx)
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
void DayZPlayerUtils()
cannot be instantiated
DisplayElementBase GetElement(eDisplayElements element_id)
void VirtualHud(PlayerBase player)
bool Consume(float amount, PlayerBase consumer)
void EmoteManager(PlayerBase player)
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void Environment(PlayerBase pPlayer)
bool IsProcessing()
returns true when FP is heating or cooling
proto GizmoApi GetGizmoApi()
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)
static string GetDisplayName(int liquid_type)
void MapNavigationBehaviour(PlayerBase pPlayer, EMapNavigationType pNavigationType=EMapNavigationType.BASIC)
bool OnStoreLoad(ParamsReadContext ctx, int version)
void ModifiersManager(PlayerBase player)
void NotifiersManager(PlayerBase player)
VirtualHud GetVirtualHud()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
void PlayerSoundEventHandler(PlayerBase player)
void PlayerSoundManagerClient(PlayerBase player)
void PlayerStat(T min, T max, T init, string label, int flags)
bool LoadStats(ParamsReadContext ctx, int version)
void PlayerStats(Man player)
void PlayerStomach(PlayerBase player)
PluginConfigDebugProfile m_ConfigDebugProfile
void PluginItemDiagnostic()
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
PluginBase GetPlugin(typename plugin_type)
void PluginPresenceNotifier()
EPresenceNotifierNoiseEventType
void QuickBarBase(PlayerBase player)
void RandomGeneratorSyncManager(DayZPlayer player)
const float DEFAULT_SPAWN_DISTANCE
void ReplaceSoundEventHandler(PlayerBase player)
StaminaHandler m_StaminaHandler
void UndergroundHandlerClient(PlayerBase player)
bool IsFullBody(PlayerBase player)
static string GetPulseMessage(EPulseType pulse_type, int blood_level)
const int TARGET_IRREGULAR_PULSE_BIT
Vector2 GetCameraLRAngle()
bool IsCameraLockOnPerform()
bool CanPerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
void PerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
override void RequestInterruptAction()
client requests action interrupt
override void RequestEndAction()
void PerformActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
override void EndActionInput()
void ForceTarget(Object targetObject)
static void PlayerDisconnected(StatsEventDisconnectedData data)
static void PlayerMeasures(StatsEventMeasuresData data)
const string STAT_PLAYTIME
const string STAT_DISTANCE
bool Save(ParamsWriteContext ctx)
bool Load(ParamsReadContext ctx)
static SoundOnVehicle SaySound(Object source, string sound_name, float distance, bool looped)
static ref TStringArray ARRAY_STRING
static ref Param1< bool > PARAM1_BOOL
static ref Param1< int > PARAM1_INT
static ref Param1< string > PARAM1_STRING
static ref Param2< float, float > PARAM2_FLOAT_FLOAT
represents base for cargo storage for entities
static bool GetUse3DMap()
static int GetLightingConfig()
static bool GetAllowStaminaAffectInertia()
static bool GetHitIndicationPPEEnabled()
static TStringSet GetDisallowedTypesInUnderground()
static bool GetDisableRespawnDialog()
static bool IsInitialized()
static bool IsPointInPlayerRestrictedArea(vector point, out PlayerRestrictedAreaInstance hitArea)
Super root of all classes in Enforce script.
static void RemovePlayerBase(Man player)
static void AddPlayerBase(Man player)
Client only - manage set up crafting on client.
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
this is main camera class
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool RestrictHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff, HeadingRestrictData restrictData)
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static const int SJ_BROKEN_LEGS
static const int SJ_ACTION_INTERRUPT
static const int SJ_PLAYER_STATES
static const int SJ_ACTION_ACK_REJECT
static const int SJ_WEAPON_LIFT
static const int SJ_STAMINA
static bool ReadShockParams(ParamsReadContext pCtx, out float shockValue)
static const int SJ_KURU_REQUEST
static const int SJ_PLAYER_ADD_MODIFIER
static const int SJ_WEAPON_ACTION_ACK_REJECT
static const int SJ_SHOCK
static void SendDeleteItem(DayZPlayer pPlayer, EntityAI item)
static bool ReadKuruRequest(ParamsReadContext pCtx, out float amount)
static const int SJ_GESTURE_REQUEST
static const int SJ_QUICKBAR_SET_SHORTCUT
static bool ReadBrokenLegsParamsEx(ParamsReadContext pCtx, out int currentState)
static const int SJ_INVENTORY_FAILURE
static const int SJ_WEAPON_ACTION_ACK_ACCEPT
static const int SJ_UNCONSCIOUSNESS
static const int SJ_DELETE_ITEM
static const int SJ_ADS_RESET
static const int SJ_WEAPON_SET_JAMMING_CHANCE
static bool ReadInjuryParams(ParamsReadContext pCtx, out bool pEnable, out eInjuryHandlerLevels level)
static void SendPlayerUnconsciousness(DayZPlayer pPlayer, bool enable)
static const int SJ_ACTION_ACK_ACCEPT
static bool ReadPlayerUnconsciousnessParams(ParamsReadContext pCtx, out bool enable)
static void SendBrokenLegsEx(DayZPlayer pPlayer, int currentState)
static const int SJ_INJURY
static const int SJ_STAMINA_MISC
static const int SJ_INVENTORY
static 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.
int FilterAgents(int agentsIn)
Filter agents from the item (override on higher implementations)
bool Consume(float amount, PlayerBase consumer)
override FoodStage GetFoodStage()
Particle GetParticle()
Gets the main particle which this Effect is managing.
void SetDecalOwner(Object o)
Wrapper class for managing particles through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Wrapper class for managing sound through SEffectManager.
bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
bool LocalDestroyEntity(notnull EntityAI item)
proto native bool FindFirstFreeLocationForNewEntity(string item_type, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFirstFreeLocationForNewEntity.
proto native EntityAI GetAttachmentFromIndex(int index)
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 EntityAI FindPlaceholderForSlot(int slot)
Returns placeholder entity for slot (naked arms, legs etc)
proto native bool EnumerateInventory(InventoryTraversalType tt, out array< EntityAI > items)
enumerate inventory using traversal type and filling items array
proto native void LockInventory(int lockType)
bool CanAddEntityIntoHands(notnull EntityAI item)
Test if entity can be put into hands.
proto native bool IsInventoryLocked()
proto native void UnlockInventory(int lockType)
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static proto native EntityAI LocationCreateLocalEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new local item directly at location @NOTE: the item is created localy, i.e....
proto native int GetSlotId(int index)
attachments
bool GetCurrentAttachmentSlotInfo(out int slot_id, out string slot_name)
Returns true if the item is currently attached and outputs attachment slot id and name.
static proto native bool HasInventoryReservation(EntityAI item, InventoryLocation dst)
Internally: HasInventoryReservationEx(item, dst, FindInventoryReservationMode.LEGACY,...
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
const float c_MaxItemDistanceRadius
anti-cheats
proto native int AttachmentCount()
Returns count of attachments attached to this item.
proto native int GetSlotIdCount()
proto native bool FindFreeLocationFor(notnull EntityAI item, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFreeLocationFor.
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)
script counterpart to engine's class Inventory
proto void SelectObject(Object object)
proto void SelectPhysics(Physics physics)
const int NUMBER_OF_STAGES
proto native void CharacterSave(Man player)
proto native bool CharacterIsLoginPositionChanged(Man player)
Only valid during login.
proto native void CharacterKill(Man player)
static void ApplyEffects(PlayerBase player)
static const float HEAT_DAMAGE_TICK_TIME
void ShowHudUI(bool show)
void ShowQuickbarUI(bool show)
proto native vector GetLogoutPosition()
proto native void SetTurnSpanSprintModifier(float value)
sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingSprintFilterSpan
proto native void ForceStance(int pStanceIdx)
proto native void SetRunSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fRunSpringTimeout
proto native void SetDirectionSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterSprintTimeout
proto native void SetMeleeBlock(bool pBlock)
this enables/disables block
proto native bool IsInWater()
proto native void WakeUp(int targetStance=-1)
proto native Transport GetTransport()
proto native bool IsGettingIn()
proto native void SetVehicleType(int pVehicleType)
proto native bool IsSwitchSeat()
proto native bool IsGettingOut()
int m_StanceRotation[6]
6 stances -> all has movement mask, STANCEIDX_ ... is index
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 bool IsValid()
verify current set inventory location
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
static string DumpToStringNullSafe(InventoryLocation loc)
proto native vector GetPos()
returns position of item in world if type is Ground
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
sets current inventory location type to Attachment with slot id set to <slotId>
proto native int GetSlot()
returns slot id if current type is Attachment
proto native void SetGround(EntityAI e, vector mat[4])
sets current inventory location type to Ground with transformation mat
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 int GetType()
returns type of InventoryLocation
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
sets current inventory location type to Cargo with coordinates (idx, row, col)
bool ReadFromContext(ParamsReadContext ctx)
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
proto native float GetCurrentStepFOV()
returns fov value at current index, or 'OpticsInfo.opticsZoomInit' config value (non-zooming optics)
static const string NAME_FIRE
static bool IsSyncLogEnable()
ref MapNavigationBehaviour m_MapNavigationBehaviour
override bool StopSoundEvent(EPlayerSoundEventID id, bool is_from_server=false, int param=0)
bool AnimCommandCheck(HumanMoveCommandID mask)
bool IsTargetInActiveRefresherRange(EntityAI target)
override void PredictiveTakeEntityToHands(EntityAI item)
float GetSimplifiedShockNormalized()
string m_UALastMessage
user actions & symptoms
ref PlayerSoundManagerServer m_PlayerSoundManagerServer
SymptomManager GetSymptomManager()
void UpdateHairSelectionVisibility(bool was_debug=false)
PlayerStat< float > GetStatSpecialty()
DayZPlayerCameraBase m_CurrentCamera
ref Param2< float, float > m_UAProgressParam
void SetNVGWorking(bool state)
bool GetLiquidTendencyDrain()
bool IsAntibioticsActive()
PlayerStat< float > GetStatToxicity()
PlayerBase m_CheckPulseLastTarget
override bool IsUnconsciousStateOnly()
float GetSingleAgentCountNormalized(int agent_id)
override bool IsRefresherSignalingViable()
ref BleedingSourcesManagerRemote m_BleedingManagerRemote
ref array< int > m_ProcessAddGlassesEffects
override bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
void SetPlayerLoad(float load)
void AddToEnvironmentTemperature(float pTemperature)
void SetEnergyManagerState(ItemBase itemInHands, bool state)
override void ProcessLiftWeapon()
ref CraftingManager m_CraftingManager
void FixAllInventoryItems()
override bool IsLanded(int pCurrentCommandID)
void ReloadWeapon(EntityAI weapon, EntityAI magazine)
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
void AddPossibleCoverFaceForShave()
DEPRECATED!
void RefreshHandAnimationState(int delay=0)
void ImmuneSystemTick(float value, float deltaT)
override void OnReceivedHit(ImpactEffectsData hitData)
override void OnVariablesSynchronized()
ref array< int > m_ProcessRemoveEffectWidgets
void OnUnconsciousStart()
void SetCraftingRecipeID(int recipeID)
PlayerSoundManagerServer GetPlayerSoundManagerServer()
void UpdateQuickBarEntityVisibility(EntityAI entity)
override bool CanStartConsumingStamina(EStaminaConsumers consumer)
override bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
ItemBase GetItemOnSlot(string slot_type)
Returns item that's on this player's attachment slot. Parameter slot_type should be a string from con...
override void OnThrowingModeChange(bool change_to_enabled)
override bool CanSwapItemInCargo(EntityAI child_entity, EntityAI new_entity)
override void OnStoreSave(ParamsWriteContext ctx)
bool TakeEntityToInventoryImpl(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
void MessageAction(string text)
void ClearLastUAMessage()
void OnCommandHandlerTick(float delta_time, int pCurrentCommandID)
ref SymptomManager m_SymptomManager
void SetImmunityBoosted(bool boosted)
bool CheckAndExecuteStackSplit(FindInventoryLocationType flags, notnull EntityAI item, notnull EntityAI target)
override SoundOnVehicle PlaySound(string sound_name, float range, bool create_local=false)
void SetActivePrimarySymptomID(SymptomIDs id)
override void OnCommandClimbStart()
void SwitchItemTypeDetach(EntityAI item, string slot)
void RadialQuickBarCombine(int slotClicked)
void SetBloodType(int blood_type)
void Message(string text, string style)
void RemoveCurrentEffectTrigger()
void MapNavigationItemInPossession(EntityAI item)
void SetBloodTypeVisible(bool show)
void SetMixedSoundState(eMixedSoundStates state)
ref map< EEffectAreaType, float > m_EffectAreaTimeToTick
const int SIMPLIFIED_SHOCK_CAP
PlayerStat< float > m_StatEnergy
void PlacingCancelServer()
bool m_MeleeDebug
melee stats
void IncreaseContaminatedAreaCount()
float GetImmunity()
returns player's immunity strength between 0..1
override bool IsLiftWeapon()
ItemBase CreateCopyOfItemInInventoryOrGroundEx(ItemBase src, bool markItemAsSplitResult=false)
static ref array< string > m_BleedingSourcesLow
vector m_DirectionToCursor
void ProcessADSSyncResetRequest()
void OnBleedingSourceAdded()
DamageDealtEffect GetDamageDealtEffect()
ref TInputActionMap m_InputActionMap
ref PlayerStats m_PlayerStats
void SendSoundEventEx(EPlayerSoundEventID id, int param=0)
void ResetPlayer(bool set_max)
override void OnCommandDeathStart()
EntityAI SpawnAI(string object_name, vector pos)
override void OnPlayerRecievedHit()
PluginPlayerStatus m_ModulePlayerStatus
void EndSurrenderRequest(SurrenderData data=null)
ends surrender, originally intended for surrender->restrained transitioning
ItemBase GetItemOnHead()
Returns item on player's head. For an example, a headtorch.
void OnInventoryMenuClose()
bool CanSpawnBreathVaporEffect()
void CloseMapEx(bool cancelled)
TransferValues GetTransferValues()
int m_SyncedModifiersPrev
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override float GetWeaponObstruction()
ref array< int > m_Recipes
void UpdateBrokenLegs(int stateId)
override bool IsUnconscious()
override void SpawnDamageDealtEffect()
DebugMonitorValues GetDebugMonitorValues()
bool m_MapCloseRequestProcessed
ref EffectParticle m_FliesEff
ref array< int > m_ProcessRemoveGlassesEffects
ref ArrowManagerPlayer m_ArrowManager
PlayerStat< float > m_StatHeatComfort
ref PlayerAgentPool m_AgentPool
void QueueRemoveEffectWidget(array< int > effects)
bool m_LiquidTendencyDrain
EPulseType GetPulseType()
EEffectAreaType m_InEffectAreaType
override bool PredictiveDropEntity(notnull EntityAI item)
void SetPersistentFlag(PersistentFlag bit, bool enable)
void SetStaminaState(eStaminaState state)
override void OnRollFinish()
void SetHeatBufferDynamicMax(float value)
int GetBreathVapourLevel()
bool IsSwapBetweenHandsAndGroundLargeItem(notnull EntityAI item1, notnull EntityAI item2, out EntityAI item_hands, out EntityAI item_ground)
ref UndergroundHandlerClient m_UndergroundHandler
vector GetLocalProjectionOrientation()
const int ACT_STORE_SAVE_VERSION
void SetStamina(int value, int range)
void SetActionEndInput(ActionBase action)
float GetStatBordersWater()
bool TakeEntityToTargetAttachmentImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
void dmgDebugPrint(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
float GetTemporaryResistanceToAgent(int agent)
override void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
override bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void OnPlayerReceiveFlashbangHitStart(bool visual)
override array< string > GetSuitableFinisherHitComponents()
returns list of suitable finisher hit components (defined on base entity/entity type)
string GetLastUAMessage()
UA Last Message.
eMixedSoundStates GetMixedSoundStates()
void SpawnShockEffect(float intensity_max)
void MessageFriendly(string text)
bool IsMapCallbackCancelInput()
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
override int GetQuickBarBonus()
ref Hologram m_HologramServer
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
BleedingSourcesManagerServer GetBleedingManagerServer()
vector m_LocalProjectionOrientation
override bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
bool IsInEffectArea(EEffectAreaType area)
void OnPlayerIsNowInsideEffectAreaEndServer()
void OnBleedingSourceRemovedEx(ItemBase item)
static Particle m_ContaminatedAroundPlayerTiny
override void EEKilled(Object killer)
void SetBloodyHands(bool show)
float GetStatBordersEnergy()
override bool CanReleaseAttachment(EntityAI attachment)
void RadialQuickBarSingleUse(int slotClicked)
override void EEItemOutOfHands(EntityAI item)
float GetBordersImmunity()
int m_ActivePrimarySymptomID
SymptomIDs GetActivePrimarySymptomID()
void QuickReloadWeapon(EntityAI weapon)
void PreloadDecayTexture()
void DecreaseHealingsCount()
bool CanConsumeFood(ConsumeConditionData data=null)
VirtualHud GetVirtualHud()
EffectSound m_AmbientContamination
override void EEItemIntoHands(EntityAI item)
void MapNavigationItemNotInPossession(EntityAI item)
void UpdateShoulderProxyVisibility(EntityAI item, string slot_name)
int GetCraftingRecipeID()
override bool IsRestrained()
void OnSpawnedFromConsole()
void SetLiftWeapon(bool state, float obstruct=0)
ref Param2< int, int > m_UAParam
void ShowUnconsciousScreen(bool show)
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
ref array< int > m_ProcessAddEffectWidgets
override void SwitchItemSelectionTexture(EntityAI item, string slot_name)
bool m_InsideEffectAreaPrev
bool ReadLiftWeaponRequest(int userDataType, ParamsReadContext ctx)
EStatLevels GetStatLevelEnergy()
bool m_AllowQuickRestrain
override bool IsFighting()
ref EffectRadial m_EffectRadial
ref Environment m_Environment
void SetNVGLowered(bool state)
void SetLocalProjectionOrientation(vector local_orientation)
bool IsPersistentFlag(PersistentFlag bit)
override void EOnFrame(IEntity other, float timeSlice)
int m_ContaminatedAreaCount
PlayerStat< float > GetStatEnergy()
void OnUnconsciousUpdate(float pDt, int last_command)
override void OnCommandLadderStart()
int m_PerformedAnimActionID
GameplayEffectWidgets_base m_EffectWidgets
effect widgets
void DecreaseEffectAreaCount()
override void RemoveAgent(int agent_id)
override vector GetDefaultHitPosition()
float m_OriginalSlidePoseAngle
float m_UnconsciousEndTime
override EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
PlayerStomach GetStomach()
ref PlayerStomach m_PlayerStomach
void OnQuickbarSetEntityRequest(ParamsReadContext ctx)
void IncreaseDiseaseCount()
void SetMapOpen(bool state)
CraftingManager GetCraftingManager()
void AdjustBandana(EntityAI item, string slot_name)
void SetLastMapInfo(float scale, vector pos)
override string GetDefaultHitComponent()
returns default hit component (fallback)
void SwitchItemTypeAttach(EntityAI item, string slot)
bool m_BrokenLegsJunctureReceived
override void CommandHandler(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
override WeaponManager GetWeaponManager()
ModifiersManager GetModifiersManager()
void IncreaseAntibioticsCount()
float GetStatLevelBorders(float stat_value, float critical, float low, float normal, float high, float max)
void RequestUnconsciousness(bool enable)
UndergroundHandlerClient GetUndergroundHandler()
string m_CachedPlayerName
override void EEItemDetached(EntityAI item, string slot_name)
void RemoveAction(typename actionName, out TInputActionMap InputActionMap)
bool ResetADSPlayerSync(int userDataType, ParamsReadContext ctx)
server only
void SetHairLevelToHide(int level, bool state, bool was_debug=false)
Dynamic hair hiding.
void SpawnDrowningBubbles()
void IncreaseHealingsCount()
void SetActionsRemoteTarget(out TInputActionMap InputActionMap)
override bool CanChangeStance(int previousStance, int newStance)
void SetSoundCategoryHash(int hash)
override bool CanDropEntity(notnull EntityAI item)
ref SoundObject m_SaySoundObject
EffectTrigger m_CurrentEffectTrigger
ItemBase m_CheckMeleeItem
void HandleBrokenLegsSync()
void OnVoiceEventPlayback(PlayerSoundEventBase voice_event, AbstractWave callback, float playback_time)
called every cmd handler tick during a playback of PlayerSoundEvent, m_ProcessPlaybackEvent needs to ...
void TogglePlacingLocal(ItemBase item=null)
ref ShockDealtEffect m_ShockDealtEffect
void OnJumpOutVehicleFinish(float carSpeed)
float GetHeatBufferDynamicMax()
void SetUnderground(EUndergroundPresence presence)
void QueueRemoveGlassesEffect(int id)
void RequestTriggerEffect(EffectTrigger trigger, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, string soundset="", bool partDynaUpdate=false, int newBirthRate=0, bool forceUpdate=false)
bool m_IsRestrainStartedLocal
bool m_MapClosingSyncSent
bool m_CanPlayBrokenLegSound
override void OnStanceChange(int previousStance, int newStance)
void PlacingCancelLocal()
static ref array< CargoBase > SPREAD_AGENTS_PROXY_CARGOS
void SetInWater(bool pState)
water contact (driven by Environment)
void SetLastFirePointRot(float last_fire_point_rot)
void OnVoiceEvent(PlayerSoundEventBase voice_event)
void SetEnableQuickBarEntityShortcut(EntityAI entity, bool value)
EntityAI CreateInInventory(string item_name, string cargo_type="", bool full_quantity=false)
void AntibioticsAttack(float value)
override bool IsWeaponObstructionBlockingADS()
ActionManagerBase GetActionManager()
bool IsItemInInventory(EntityAI entity)
void AddActiveNV(int type)
int m_RefreshAnimStateIdx
void SetLoadedQuickBarItemBind(EntityAI entity, int index)
void CheckSendSoundEvent()
int m_InventorySoftLockCount
void SetLifeSpanStateVisible(int show_state)
override void OnJumpStart()
void RemoveQuickBarEntityShortcut(EntityAI entity)
vector SetDefaultHitPosition(string pSelection)
override bool IsHoldingBreath()
void UpdateTranslatedSelections(SelectionTranslation stt)
ref DebugMonitorValues m_DebugMonitorValues
bool m_InventorySoftLocked
void MessageImportant(string text)
void SetHitPPEEnabled(bool enabled)
bool m_CanDisplayHitEffectPPE
int GetStoreLoadVersion()
SoftSkillsManager GetSoftSkillsManager()
ref Param3< float, float, bool > m_StaminaParam
bool Consume(ItemBase source, float amount, EConsumeType consume_type)
Hologram GetHologramLocal()
override void OnGameplayDataHandlerSync()
void OnQuickBarContinuousUseStart(int slotClicked)
float GetHealthRegenSpeed()
void SaveAreaPersistenceFlag(ParamsWriteContext ctx)
override bool PredictiveTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
void RemovePossibleCoverFaceForShave()
DEPRECATED!
void SetBloodyHandsEx(eBloodyHandsTypes type)
void UnsetMixedSoundState(eMixedSoundStates state)
void IncreaseEffectAreaCount()
void SendLiftWeaponSync(bool state, float obstruct=0)
Client-side only.
void UpdateMaskBreathWidget(notnull MaskBase mask, bool is_start=false)
override void OnCommandMoveStart()
override void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
ref Hologram m_HologramLocal
int GetSingleAgentCount(int agent_id)
override bool PredictiveTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
ref array< string > m_DbgOptions
void QueueAddEffectWidget(array< int > effects)
void SetQuickFishing(bool enable)
override bool CanPickupHeavyItem(notnull EntityAI item)
PluginPresenceNotifier m_PresenceNotifier
void SetInColdArea(bool state)
void DecreaseContaminatedAreaCount()
void OnPlayerReceiveFlashbangHitEnd()
EmoteManager GetEmoteManager()
void RunFightBlendTimer()
void SetFlagTendencyRaise(bool state)
DEPRECATED.
void AddMedicalDrugsInUse(EMedicalDrugsType drugType)
float m_UnconsciousVignetteTarget
void CheckZeroSoundEvent()
ref EffectSound m_SoundFliesEffect
void HandleGlassesEffect()
void SendSoundEvent(EPlayerSoundEventID id)
float GetVisibilityCoef()
DayZPlayerCamera GetCurrentPlayerCamera()
EStatLevels GetStatLevelBlood()
override bool IsManagingArrows()
void OnPlayerIsNowInsideEffectAreaEndClient()
PlayerStat< float > m_StatTremor
EntityAI FindCargoByBaseType(string searched_item)
int m_FaceCoveredForShaveLayers
static set< int > GetFaceCoverageShaveValues()
returns a set of face covering values
vector m_DefaultHitPosition
override void OnCommandLadderFinish()
ref BleedingSourcesManagerServer m_BleedingManagerServer
override void JunctureDeleteItem(EntityAI item)
ScriptInvoker GetOnUnconsciousStart()
int GetBleedingSourceCount()
override void OnCommandMelee2Finish()
override void OnCommandSwimStart()
bool m_IsVehicleSeatDriver
override void RequestSoundEventStop(EPlayerSoundEventID id, bool from_server_and_client=false, int param=EPlayerSoundEventParam.STOP_PLAYBACK)
void CloseInventoryMenu()
void ClearBloodyHandsPenaltyChancePerAgent(eAgents type)
int m_BleedingSourceCount
override void OnVehicleSeatDriverEnter()
bool CheckMeleeItemDamage(ItemBase item)
int FindQuickBarEntityIndex(EntityAI entity)
void SetToDelete(ParamsReadContext pCtx)
void OnUpdateEffectAreaServer(float timeSlice)
EMedicalDrugsType m_MedicalDrugsActive
override bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
bool m_FlagRaisingTendency
float GetBloodyHandsPenaltyChancePerAgent(eAgents type)
bool IsStance(int stance, int stanceMask)
void SetModifiers(bool enable)
bool IsCurrentCameraAimedAtGround()
ref Timer m_UALastMessageTimer
override bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
void OnVehicleSwitchSeat(int seatIndex)
ref InventoryActionHandler m_InventoryActionHandler
EStatLevels GetImmunityLevel()
ref TransferValues m_TrasferValues
EStatLevels GetStatLevelToxicity()
void ProcessHoldBreath(float dT)
void KillUndergroundHandler()
void UnsetInEffectAreaTypeFlag(EEffectAreaType flag)
PlayerStat< float > GetStatTremor()
bool m_HasBloodTypeVisible
bool Consume(PlayerConsumeData data)
void AddAction(typename actionName)
void SpawnBreathVaporEffect()
ref Param1< float > m_DeathDarkeningParam
void SetMapClosingSyncSet(bool state)
void OnPlayerIsNowInsideEffectAreaBeginClient()
bool TogglePlacingServer(int userDataType, ParamsReadContext ctx)
override bool PredictiveTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
ref VirtualHud m_VirtualHud
const int SHAKE_LEVEL_MAX
ref Timer m_AnalyticsTimer
void UpdateCorpseStateVisual()
bool IsRestrainPrelocked()
void AdjustShemag(EntityAI item, string slot_name)
override bool IsAlreadyInFallingCommand(int pCurrentCommandID)
ref TInputActionMap m_InputActionMapControled
override void OnCommandClimbFinish()
ref HiddenSelectionsData m_EmptyGloves
NotifiersManager GetNotifiersManager()
bool HasStaminaRemaining()
void SetLastFirePoint(vector last_fire_point)
eBloodyHandsTypes HasBloodyHandsEx()
float m_LastPostFrameTickTime
float GetStatBordersToxicity()
void DecreaseDiseaseCount()
void SetActions(out TInputActionMap InputActionMap)
float m_HeatBufferDynamicMax
void SetActionsRemoteTarget()
bool GetLastMapInfo(out float scale, out vector pos)
void ProcessADDModifier()
void SetRestrained(bool is_restrained)
void SetLocalProjectionPosition(vector local_position)
ref ScriptInvoker m_OnUnconsciousStop
ref SoftSkillsManager m_SoftSkillsManager
override string GetHitComponentForAI()
Melee helpers.
override vector GetCenter()
float GetWeightSpecialized(bool forceRecalc=false)
override void EEItemAttached(EntityAI item, string slot_name)
bool CheckAndExecuteStackSplitToInventoryLocation(InventoryLocation il, notnull EntityAI item)
BleedingSourcesManagerRemote GetBleedingManagerRemote()
PlayerStat< float > GetStatHeatComfort()
ref ScriptInvoker m_OnUnconsciousStart
invokers
bool TakeEntityToTargetInventoryImpl(InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
override void OnCommandSwimFinish()
override void OnCommandVehicleStart()
bool IsSyncedModifierActive(eModifierSyncIDs modifier)
Checks whether modifier (which has syncing enabled) is currently active, works on both Client and Ser...
FlashbangEffect GetFlashbangEffect()
override bool PhysicalPredictiveDropItem(EntityAI entity, bool heavy_item_only=true)
float m_UnconRefillModifier
ref ModifiersManager m_ModifiersManager
ref map< EEffectAreaType, int > m_EffectAreaOverlap
void CloseMap()
DEPRECATED; terminates map animation callback and re-enables controls.
ShockDealtEffect GetShockEffect()
void PlacingStartServer(ItemBase item)
ref array< EntityAI > m_ItemsToDelete
override void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
override void ProcessFeetDamageServer(int pUserInt)
override void InsertAgent(int agent, float count=1)
void SetQuickBarEntityShortcut(EntityAI entity, int index, bool force=false)
PlayerStat< float > m_StatToxicity
override void OnFreezeStateChangeClient()
bool m_PlayerDisconnectProcessed
bool GetDrowningWaterLevelCheck()
int m_AnimCommandStarting
bool m_IsRestrainPrelocked
int m_ForceInjuryAnimMask
ref EffectSound m_BrokenLegSound
void SetPlayerDisconnected(bool state)
PlayerStat< float > GetStatWater()
override void OnCommandVehicleFinish()
override bool PlaySoundEventType(ESoundEventType soundType, int soundEventID, int param=0)
PlayerStat< int > GetStatBloodType()
void SetLastUAMessage(string pMsg)
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
override void OnVehicleSeatDriverLeft()
void SetShakesForced(int value)
bool CanManipulateInventory()
float GetLastFirePointRot()
void SpawnDamageDealtEffect2(Param param1=null, Param param2=null)
int m_DebugMonitorEnabled
EntityAI GetQuickBarEntity(int index)
StaminaHandler GetStaminaHandler()
override bool CanReceiveItemIntoCargo(EntityAI item)
ref SoundObjectBuilder m_SaySoundBuilder
static ref array< Man > m_ServerPlayers
ref NotifiersManager m_NotifiersManager
override bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
override void EOnPostFrame(IEntity other, int extra)
ref StanceIndicator m_StanceIndicator
float ConvertNonlethalDamage(float damage, DamageType damageType)
ItemBase GetItemInHands()
void OnUnconsciousStop(int pCurrentCommandID)
EntityAI SpawnEntityOnGroundRaycastDispersed(string object_name, float raycastDistance=DEFAULT_SPAWN_DISTANCE, float radius=UAItemsSpreadRadius.DEFAULT)
int GetLastFirePointIndex()
void SetCheckMeleeItem(ItemBase item=null)
static bool DEBUG_INVENTORY_ACCESS
void OnStoreSaveLifespan(ParamsWriteContext ctx)
void SetDecayEffects(int effect=-1)
PluginAdminLog m_AdminLog
bool CanRedirectToWeaponManager(notnull EntityAI item, out bool isActionPossible)
bool HasCoveredFaceForShave()
ref array< ref Param2< EntityAI, int > > m_aQuickBarLoad
void DealShock(float dmg)
void SetPulseType(EPulseType pulse_type)
void SetDrowning(bool enable)
void SetRestrainPrelocked(bool restrain_prelock)
PlayerStats GetPlayerStats()
void OnCameraChanged(DayZPlayerCameraBase new_camera)
override void OnCommandFallStart()
ref SoundParams m_SaySoundParams
PlayerSoundEventHandler GetPlayerSoundEventHandler()
EntityAI GetMagazineToReload(EntityAI weapon)
void QueueAddGlassesEffect(int id)
override bool IsInventoryVisible()
void CalculateVisibilityForAI()
void SetBloodyHandsPenalty()
RandomGeneratorSyncManager GetRandomGeneratorSyncManager()
void OnScheduledTick(float deltaTime)
void AddAction(typename actionName, out TInputActionMap InputActionMap)
void SetBloodyHandsPenaltyChancePerAgent(eAgents type, float amount)
increments the chances per agents
void SetLastFirePointIndex(int last_fire_point_index)
PluginRecipesManager m_ModuleRecipesManager
vector m_CraftingInitialPos
PlayerStat< int > GetStatWet()
override void HideClothing(ItemOptics optic, bool state)
state 'true' == hide
void RemoveMedicalDrugsInUse(EMedicalDrugsType drugType)
vector GetLocalProjectionPosition()
ItemBase CreateCopyOfItemInInventoryOrGround(ItemBase src)
ref array< int > m_ActiveNVTypes
Head_Default m_CharactersHead
override bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
EStatLevels GetStatLevelWater()
void SetPerformedActionID(int id)
void ToggleHeatBufferVisibility(int heatbufferStage)
PluginLifespan m_ModuleLifespan
void OnRestrainChangeClient()
PlayerStat< float > GetStatStamina()
override void AfterStoreLoad()
void OnQuickBarContinuousUseEnd(int slotClicked)
bool DropItem(ItemBase item)
void ProcessHandDamage(float delta_time, HumanMovementState pState)
float GetStatBordersHealth()
float GetTotalAgentCount()
override bool IsInventorySoftLocked()
void PlacingStartLocal(ItemBase item)
const string SOUND_BREAK_LEG
void ForceUpdateInjuredState()
update injured state immediately
void OnPlayerIsNowInsideEffectAreaBeginServer()
bool IsPlayerDisconnected()
ref WeaponManager m_WeaponManager
bool GetFlagTendencyRaise()
DEPRECATED.
void SetTemporaryResistanceToAgent(int agent, float time)
override void RequestSoundEventEx(EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
void OnQuickBarSingleUse(int slotClicked)
void MovingShock(float legHealth, float highShock, float midShock, float lowShock)
void BrokenLegWalkShock()
void OnBleedingSourceRemoved()
void OnInventoryMenuOpen()
ref StaminaHandler m_StaminaHandler
override void OnCommandMelee2Start()
ref DamageDealtEffect m_DamageDealtEffect
override void ClearInventory()
PlayerStat< float > m_StatWater
override void DepleteStaminaEx(EStaminaModifiers modifier, float dT=-1, float coef=1.0)
bool m_ContaminatedAreaEffectEnabled
override void RPC(int rpc_type, array< ref Param > params, bool guaranteed, PlayerIdentity recipient=NULL)
void ResetConstructionActionData()
ref ConstructionActionData m_ConstructionActionData
MapNavigationBehaviour GetMapNavigationBehaviour()
ItemBase CreateCopyOfItemInInventory(ItemBase src)
RandomGeneratorSyncManager m_RGSManager
override bool IsIgnoredByConstruction()
int m_HasBloodyHandsVisible
void DecreaseAntibioticsCount()
static Particle m_ContaminatedAroundPlayer
ref Timer m_DeathCheckTimer
ref Param1< float > m_UnconParam
override void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
static ref array< Object > SPREAD_AGENTS_OBJECTS
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
array< int > GetNVTypesArray()
string m_SaySoundLastSetName
ConstructionActionData GetConstructionActionData()
float m_CameraSwayModifier
EntityAI SpawnEntityOnGroundOnCursorDir(string object_name, float distance)
override void TakeEntityToHandsImpl(InventoryMode mode, EntityAI item)
static ref TStringArray m_QBarItems
override bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
ref HeatComfortAnimHandler m_HCAnimHandler
override void RemoveAllAgents()
int GetLastShavedSeconds()
void SpreadAgentsEx(float distance=3, float chance=0.25)
chance between [0..1] , distance in meters
void SetLiftWeapon(int pJunctureID, ParamsReadContext ctx)
bool HandleRemoteItemManipulation(int userDataType, ParamsReadContext ctx)
void DamageAllLegs(float inputDmg)
void RequestResetADSSync()
void RemoveActiveNV(int type)
bool GetMapClosingSyncSent()
void SetInEffectAreaTypeFlag(EEffectAreaType flag)
void BrokenLegForceProne(bool forceOverride=false)
void UpdateQuickBarExtraSlots()
override bool CanBeTargetedByAI(EntityAI ai)
override bool CanPlaceItem(EntityAI item)
void DropAllItems()
Drops all clothes/wearables this character is carrying on themselves.
ref UndergroundBunkerHandlerClient m_UndergroundBunkerHandler
ScriptInvoker GetOnUnconsciousStop()
override bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
void SpawnFlashbangEffect(PlayerBase player, bool visual)
PluginConfigEmotesProfile m_ConfigEmotesProfile
void HideHairSelections(ItemBase item, bool state)
ref FlashbangEffect m_FlashbangEffect
override void CheckAnimationOverrides()
bool OnStoreLoadLifespan(ParamsReadContext ctx, int version)
void SetVisibilityCoef(float pVisibility)
EStatLevels GetStatLevelHealth()
float GetStatBordersBlood()
bool TakeEntityAsAttachmentImpl(InventoryMode mode, notnull EntityAI item)
int GetBloodyHandsPenaltyAgents()
override void OnParticleEvent(string pEventType, string pUserString, int pUserInt)
void OnContaminatedAreaExitServer()
void PlacingCompleteLocal()
EUndergroundPresence m_UndergroundPresence
override bool IsSelfAdjustingTemperature()
override void SetInventorySoftLock(bool status)
'soft lock' meaning inventory screen cannot be displayed, but mechanically, inventory operations are ...
bool TakeEntityToTargetCargoImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
AbstractWave SaySoundSet(string name)
void PlacingCompleteServer()
override bool IsInFBEmoteState()
void SetRestrainStarted(bool restrain_started)
QuickBarBase m_QuickBarBase
void ProcessDrowning(float dT)
override void OnRollStart(bool isToTheRight)
eBrokenLegs GetBrokenLegs()
void ShockRefill(float pDt)
functionality moved to ShockMdfr::OnTick
void TryHideItemInHands(bool hide, bool force=false)
tries to hide item in player's hands, some exceptions for various movement states
ref Param1< string > m_UAParamMessage
bool TakeEntityToCargoImpl(InventoryMode mode, notnull EntityAI item)
override void CheckLiftWeapon()
void SetQuickRestrain(bool enable)
void AddPlayerLoad(float addedload)
void RequestHandAnimationStateRefresh()
ActionManagerBase m_ActionManager
override void OnJumpEnd(int pLandType=0)
override void OnCommandFallFinish()
ref ShockHandler m_ShockHandler
int m_LocalRefreshAnimStateIdx
bool IsMapCallbackEndInput()
float GetFeetDamageMoveModifier()
bool HasBloodTypeVisible()
vector m_LocalProjectionPosition
void OnHoldBreathExhausted()
ref TInputActionMap m_InputActionMapAsTarget
override bool PredictiveForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
PlayerStat< float > GetStatHeatBuffer()
void SetBleedingBits(int bits)
void ContaminatedParticleAdjustment()
void LockHandsUntilItemHeld()
void ResetActionEndInput()
void SetLiquidTendencyDrain(bool state)
void UpdateMovementInertia()
Update movement inertia based on stamina available.
UndergroundBunkerHandlerClient GetUndergroundBunkerHandler()
bool m_IsHeadingRestricted
override bool CanReceiveItemIntoHands(EntityAI item_to_hands)
override bool CanConsumeStamina(EStaminaConsumers consumer)
ref InjuryAnimationHandler m_InjuryHandler
void UpdatePlayerMeasures()
void OnContaminatedAreaEnterServer()
void ToggleHeatBufferVisibility(bool show)
void SetLastShavedSeconds(int last_shaved_seconds)
override void AddItemToDelete(EntityAI item)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override bool CanClimb(int climbType, SHumanCommandClimbResult climbRes)
ref PlayerSoundManagerClient m_PlayerSoundManagerClient
ref HeadingRestrictData m_HeadingRestrictData
override void EEHitByRemote(int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
ref EmoteManager m_EmoteManager
void SetContaminatedEffect(bool enable, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, bool partDynaUpdate=false, int newBirthRate=0)
void OnRestrainStartedChangeClient()
override ArrowManagerBase GetArrowManager()
ref map< eAgents, float > m_BloodyHandsPenaltyChancePerAgent
const string CONTAMINATED_AREA_AMBIENT
void GiveShock(float shock)
override void SetProcessUIWarning(bool state)
bool TakeToDstImpl(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
void SetBrokenLegs(int stateId)
override void SimulateDeath(bool state)
int GetPerformedActionID()
int GetNoisePresenceInAI()
Return actual noise presence of player.
void CheckHairClippingOnCharacterLoad()
helper method for re-checking hairhiding on character load
void SetBloodyHandsBase(int type)
void SetContaminatedEffectEx(bool enable, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, string soundset="", bool partDynaUpdate=false, int newBirthRate=0)
override void EEDelete(EntityAI parent)
bool IsFacingTarget(Object target)
override void SetDeathDarknessLevel(float duration, float tick_time)
void StaminaHUDNotifier(bool show)
vector GetLastFirePoint()
static ref array< string > m_BleedingSourcesUp
Hologram GetHologramServer()
override void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
void RemoveAction(typename actionName)
override bool CanReleaseCargo(EntityAI cargo)
EStatLevels GetStatLevel(float stat_value, float critical, float low, float normal, float high)
void MessageStatus(string text)
void PlayAttachmentDropSound()
PlayerStat< float > GetStatDiet()
static PPEManager GetPPEManager()
Returns the manager instance singleton.
Static component of PPE manager, used to hold the instance.
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.
static const int BREATH_VAPOUR_MEDIUM
static const int BREATH_VAPOUR_LIGHT
static const int DROWNING_BUBBLES
static const int CONTAMINATED_AREA_GAS_AROUND
static const int CONTAMINATED_AREA_GAS_TINY
static const int BREATH_VAPOUR_HEAVY
Keeps track of agents and their simulation.
override void OnGameplayDataHandlerSync()
static const float HEALTH_REGEN_MAX
static const float SL_HEALTH_CRITICAL
static const int LAST_UA_MSG_LIFETIME
static const float BROKEN_LEGS_HIGH_HEALTH_THRESHOLD
static const float SL_WATER_HIGH
static const float SHOES_MOVEMENT_DAMAGE_PER_STEP
static const float IMMUNITY_THRESHOLD_LEVEL_CRITICAL
static const int CORPSE_STATE_MEDIUM
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
static const float SL_ENERGY_HIGH
static const float BROKEN_LEGS_SHOCK_SWIM
static const float BROKEN_LEGS_INITIAL_SHOCK
static const float FULL_SPRINT_DELAY_FROM_CROUCH
[seconds]
static const float SL_ENERGY_LOW
static const float THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL
static const float SL_BLOOD_LOW
static const float BROKEN_LEGS_ROLL_SHOCK
static const int CORPSE_STATE_DECAYED
static const float BROKEN_LEGS_LOW_SHOCK_WALK
static const float SL_WATER_NORMAL
static const float SL_BLOOD_CRITICAL
static const float FULL_SPRINT_DELAY_FROM_PRONE
[seconds]
static const float SL_ENERGY_MAX
static const float SL_HEALTH_LOW
static const float GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC
static const float UNCONSCIOUS_IN_WATER_TIME_LIMIT_TO_DEATH
static const float SL_HEALTH_NORMAL
static const float BROKEN_LEGS_STAND_SHOCK
static const float SL_WATER_LOW
static const float BROKEN_LEGS_MID_SHOCK_WALK
static const float BROKEN_CROUCH_MODIFIER
static const float SL_ENERGY_CRITICAL
static const float HEALTH_REGEN_MIN
static const int CHECK_EVERY_N_STEP
static const int DROWNING_BUBBLE_FREQUENCY_MIN
static const float IMMUNITY_THRESHOLD_LEVEL_LOW
static const float CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC
static const float IMMUNITY_THRESHOLD_LEVEL_HIGH
static const float DROWNING_DEFAULT_THRESHOLD
static const int DROWNING_BUBBLE_FREQUENCY_MAX
static const float BAREFOOT_MOVEMENT_BLEED_MODIFIER
static const float SL_BLOOD_NORMAL
static const float MELEE2_MOVEMENT_BLEND_DELAY
static const float SL_BLOOD_HIGH
static const float DROWNING_UNCONSCIOUS_THRESHOLD
static const int BLOOD_THRESHOLD_FATAL
static const float SL_ENERGY_NORMAL
static const float SL_WATER_CRITICAL
static const float IMMUNITY_THRESHOLD_LEVEL_NORMAL
static const float BROKEN_LEGS_LOW_HEALTH_THRESHOLD
static const float DROWNING_SWIMMING_THRESHOLD
static const float CAMERA_THRESHOLD_PITCH
static const float SL_WATER_MAX
static const float SL_HEALTH_HIGH
static const float BROKEN_LEGS_HIGH_SHOCK_WALK
proto string GetName()
nick (short) name of player
proto string GetId()
unique id of player (hashed steamID, database Xbox id...) can be used in database or logs
The class that will be instanced (moddable)
vector GetRandomSafePos3D(vector targetPos)
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
void OnVariableSynchronized()
static int PlayInWorld(notnull Effect eff, vector pos)
Play an Effect.
static int PlayOnObject(notnull Effect eff, Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_relative_to_world=false)
Play an Effect.
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static bool IsEffectExist(int effect_id)
Checks whether an Effect ID is registered in SEffectManager.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Manager class for managing Effect (EffectParticle, EffectSound)
ScriptInvoker Class provide list of callbacks usage:
void SetSelectionState(bool state)
ref array< int > GetTranslatedSelections()
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...)
vector m_PositionStart
player world position at the start of interval
int m_TimeInterval
amount of real time in seconds covered by this event
int m_DaytimeHour
current daytime in gameplay (hour in 24h format)
vector m_PositionEnd
player world position at the end of interval
string m_CharacterId
character ID
float m_DistanceOnFoot
traveled distance on foot (meters) during interval
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)
Native class for boats - handles physics simulation.
proto native bool IsDialogVisible()
UIScriptedMenu FindMenu(int id)
Returns menu with specific ID if it is open (see MenuID)
bool IsMenuOpen(int id)
Returns true if menu with specific ID is opened (see MenuID)
proto native void CloseDialog()
static const float HEAT_DAMAGE_TICK_TIME
static void ApplyEffects(PlayerBase player)
bool CanLoadBullet(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
bool CanAttachMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
bool CanSwapMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
void SetCalcDetails(string details)
float GetLiquidTypeEnviroTemperature(int liquidType)
Keeps information about currently loaded world, like temperature.
void SetGlobalLighting(int lightingID)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool simple=true)
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
proto native float LengthSq()
Returns squared length (magnitudeSqr)
proto float Normalize()
Normalizes vector. Returns length.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
const int SIMPLE_SELECTION_SHOULDER_RIFLE
const int SIMPLE_SELECTION_SHOULDER_MELEE
override string GetDebugName()
void SDayZPlayerHeadingModel()
cannot be created from script
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
proto native DayZPlayerCamera GetCurrentCamera()
-------------— camera additional functions ----------------------—
proto native DayZPlayerInstanceType GetInstanceType()
DayZPlayerConstants
defined in C++
proto native void SendSyncJuncture(int pJunctureID, ParamsWriteContext ctx)
-------------— sync stuff ----------------------—
class SDayZPlayerAimingModel SIMPLE_SELECTION_MELEE_RIFLE
float GetCurrentWaterLevel()
const int SIMPLE_SELECTION_MELEE_MELEE
proto native bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
string GetDefaultHitPositionComponent()
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
proto native float GetMax()
Serializer ParamsReadContext
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
Serializer ParamsWriteContext
const int AGT_UACTION_CONSUME
const int AGT_AIRBOURNE_BIOLOGICAL
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
proto native void SetPosition(vector position)
Set the world position of the Effect.
const int INVENTORY_ENTITY_DROP_OVERLAP_DEPTH
const float DZPLAYER_CAMERA_FOV_IRONSIGHTS
const float REFRESHER_RADIUS
const int DEFAULT_CHARACTER_MENU_ID
const float NL_DAMAGE_FIREARM_CONVERSION_PLAYERS
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
class array< Class T > PrintString
void Obsolete(string msg="")
EntityEvent
Entity events for event-mask, or throwing event from code.
static const float ITEM_TEMPERATURE_NEUTRAL_ZONE_MIDDLE
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto int AbsInt(int i)
Returns absolute value.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Sin(float angle)
Returns sinus of angle in radians.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static const float RAD2DEG
static proto float AbsFloat(float f)
Returns absolute value.
const int SAT_DEBUG_ACTION
SetSoundControllerOverride(string controllerName, float value, SoundControllerAction action)
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
vector GetPosition()
Get the world position of the Effect.
class SoundObject SoundParams(string name)
proto native int Length()
Returns length of string.
proto void GetHourMinuteSecond(out int hour, out int minute, out int second)
Returns system time.
proto native bool IsCLIParam(string param)
Returns if command line argument is present.
proto native bool IsModifierActive()
is modifier active
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native bool IsInWater()
proto native float GetWeaponObstruction()
return obstruction value
class HumanCommandMelee2 HumanCommandFall()
class HumanCommandWeapons HumanCommandAdditives()
class HumanItemBehaviorCfg OnItemInHandsChanged(bool pInstant=false)
signalization from script to engine that item in hands changed