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);
224 #ifdef DIAG_DEVELOPER
225 int m_IsInsideTrigger;
226 bool m_CanBeTargetedDebug;
228 bool m_PresetSpawned;
229 ref CameraToolsMenuClient m_CameraToolsMenuClient;
230 protected PluginTargetTemperature m_TargetTemperatureDiag;
379 m_PlayerSelected =
false;
407 #ifdef DIAG_DEVELOPER
408 m_CanBeTargetedDebug =
true;
448 if (!
g_Game.IsDedicatedServer())
473 PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(
GetPlugin(PluginConfigDebugProfileFixed));
475 PluginDeveloper m_Developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
482 if (player && default_preset !=
"")
485 m_ConfigDebugProfileFixed.GetPresetItems(default_preset, preset_array);
487 bool is_preset_fixed =
true;
488 if (preset_array.Count() == 0)
491 is_preset_fixed =
false;
494 if (preset_array.Count() > 0)
496 m_Developer.ClearInventory(player);
498 for (
int i = 0; i < preset_array.Count(); i++)
504 health = m_ConfigDebugProfileFixed.GetItemHealth(default_preset, i);
505 quantity = m_ConfigDebugProfileFixed.GetItemQuantity(default_preset, i);
512 m_Developer.SpawnEntityInPlayerInventory(player, preset_array.Get(i), health, quantity);
559 RegisterNetSyncVariableInt(
"m_LifeSpanState", LifeSpanState.BEARD_NONE, LifeSpanState.COUNT);
560 RegisterNetSyncVariableInt(
"m_BloodType", 0, 128);
563 RegisterNetSyncVariableInt(
"m_SoundEventParam", 0, ((EPlayerSoundEventParam.ENUM_COUNT - 1) * 2) - 1);
564 RegisterNetSyncVariableInt(
"m_StaminaState",0, eStaminaState.COUNT - 1);
565 RegisterNetSyncVariableInt(
"m_BleedingBits");
569 RegisterNetSyncVariableInt(
"m_MixedSoundStates", 0,
eMixedSoundStates.COUNT - 1);
571 RegisterNetSyncVariableInt(
"m_RefreshAnimStateIdx",0,3);
572 RegisterNetSyncVariableInt(
"m_BrokenLegState", -
eBrokenLegs.BROKEN_LEGS_SPLINT,
eBrokenLegs.BROKEN_LEGS_SPLINT);
573 RegisterNetSyncVariableInt(
"m_SyncedModifiers", 0, ((
eModifierSyncIDs.LAST_INDEX - 1) * 2) - 1);
574 RegisterNetSyncVariableInt(
"m_HasBloodyHandsVisible", 0,
eBloodyHandsTypes.LAST_INDEX - 1);
575 RegisterNetSyncVariableInt(
"m_ActionSoundCategoryHash");
576 RegisterNetSyncVariableInt(
"m_PerformedAnimActionID", -1, 2048);
577 RegisterNetSyncVariableInt(
"m_ActivePrimarySymptomID", 0, SymptomIDs.LAST_INDEX);
580 RegisterNetSyncVariableFloat(
"m_HeatBufferDynamicMax", 0.0, 1.0, 2);
582 RegisterNetSyncVariableBool(
"m_IsUnconscious");
583 RegisterNetSyncVariableBool(
"m_IsRestrained");
584 RegisterNetSyncVariableBool(
"m_IsInWater");
585 RegisterNetSyncVariableBool(
"m_InsideEffectArea");
587 RegisterNetSyncVariableBool(
"m_HasBloodTypeVisible");
588 RegisterNetSyncVariableBool(
"m_IsRestrainStarted");
589 RegisterNetSyncVariableBool(
"m_IsRestrainPrelocked");
590 RegisterNetSyncVariableBool(
"m_HasHeatBuffer");
591 RegisterNetSyncVariableBool(
"m_IsInColdArea");
593 RegisterNetSyncVariableFloat(
"m_CurrentShock");
610 m_Bot =
new Bot(
this);
636 if(itemInHands.m_LightSourceItem && itemInHands.m_LightSourceItem.GetCompEM())
638 if(state && itemInHands.m_LightSourceItem.GetCompEM().GetPreviousSwitchState())
639 itemInHands.m_LightSourceItem.GetCompEM().SwitchOn();
641 itemInHands.m_LightSourceItem.GetCompEM().SwitchOff();
646 else if(itemInHands.GetCompEM())
648 if(state && itemInHands.GetCompEM().GetPreviousSwitchState())
649 itemInHands.GetCompEM().SwitchOn();
651 itemInHands.GetCompEM().SwitchOff();
657#ifdef FEATURE_NETWORK_RECONCILIATION
660 return PlayerBaseOwnerState;
665 return PlayerBaseMove;
668 protected override event void ObtainMove( PawnMove pMove)
670 super.ObtainMove(pMove);
672 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
673 GetStaminaHandler().ObtainMove(move);
676 protected override event bool ReplayMove(PawnMove pMove)
678 if (!super.ReplayMove(pMove))
681 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
682 GetStaminaHandler().ReplayMove(move);
683 UpdateMovementInertia();
688 protected override event void ObtainState( PawnOwnerState pState)
690 super.ObtainState(pState);
692 PlayerBaseOwnerState state = PlayerBaseOwnerState.Cast(pState);
694 GetStaminaHandler().ObtainState(state);
697 protected override event void RewindState(PawnOwnerState pState, PawnMove pMove, inout NetworkRewindType pRewindType)
699 super.RewindState(pState, pMove, pRewindType);
701 PlayerBaseOwnerState state = PlayerBaseOwnerState.Cast(pState);
702 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
703 GetStaminaHandler().RewindState(state, move);
763 m_ActionSoundCategoryHash = hash;
918 if (waterLevel > 0.5)
921 timeSpent += timeSlice;
935 timeSpent += timeSlice;
983 EntityAI item_EAI = this.GetInventory().FindAttachment(slot_id);
986 if (item_EAI && !item_IB)
988 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() +
"!";
1012 if (GetInventory().HasInventoryReservation(item, null))
1019 if (GetEntityInHands() == item)
1038 int bit_mask_remove = ~state;
1233 g_Game.EnableVoN(
this,
false);
1234 if (!
g_Game.IsDedicatedServer())
1248 g_Game.GetMission().SyncRespawnModeInfo(GetIdentity());
1252 super.EEKilled(killer);
1257 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
1264 if (damageResult != null && damageResult.
GetDamage(dmgZone,
"Shock") > 0)
1270 if (
g_Game.ConfigIsExisting(
"cfgAmmo " + ammo +
" unconRefillModifier"))
1282 if (damageType ==
DamageType.EXPLOSION && ammo ==
"FlashGrenade_Ammo")
1291 float dmg = damageResult.
GetDamage(dmgZone,
"Blood");
1296 #ifdef DIAG_DEVELOPER
1298 Print(
"EEHitBy() | " +
GetDisplayName() +
" hit by " + source.GetDisplayName() +
" to " + dmgZone);
1300 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
1301 if (plugin_remote_server)
1303 plugin_remote_server.OnDamageEvent(
this, damageResult);
1307 if (
g_Game.IsDebugMonitor())
1313 int transferShockToDamageCoef =
g_Game.ConfigGetInt(
string.Format(
"%1 %2 DamageApplied transferShockToDamage",
CFG_AMMO, ammo));
1314 if (transferShockToDamageCoef == 1)
1318 if (dmgZone !=
"Head")
1319 AddHealth(dmgZone,
"Health", -damageResult.
GetDamage(dmgZone,
"Shock"));
1324 if (GetHealth(
"RightLeg",
"Health") <= 1 || GetHealth(
"LeftLeg",
"Health") <= 1 || GetHealth(
"RightFoot",
"Health") <= 1 || GetHealth(
"LeftFoot",
"Health") <= 1)
1333 if (ammo ==
"Bullet_CupidsBolt" && IsAlive())
1335 DamageSystem.ResetAllZones(
this);
1379 g_Game.GetAnalyticsServer().OnEntityHit(source,
this);
1384 super.EEHitByRemote(damageType, source,
component, dmgZone, ammo, modelPos);
1386 if (m_MeleeFightLogic.IsInBlock())
1407 return super.ConvertNonlethalDamage(damage, damageType);
1417 float shakeStrength =
Math.
InverseLerp(0, 500, hitData.m_InSpeed.Length());
1423 m_Bot.CheckForEnemies();
1427 if (hitData.m_AmmoType ==
"Bullet_CupidsBolt")
1428 Ammo_CupidsBolt.PlayOnHitParticle(hitData.m_Position);
1435 if (m_MeleeFightLogic.IsInBlock())
1487 return GetSelectionPositionMS(pSelection);
1504 super.EEItemAttached(item, slot_name);
1508 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1509 item.SwitchItemSelectionTextureEx(EItemManipulationContext.ATTACHING, p);
1516 g_Game.GetAnalyticsClient().OnItemAttachedAtPlayer(item, slot_name);
1520 if (!
g_Game.IsHeadlessOrDedicatedServer())
1522 if (clothing.GetEffectWidgetTypes())
1527 if (clothing.GetGlassesEffectID() > -1)
1535 else if (
g_Game.IsServer())
1537 if (clothing.IsGasMask())
1543 clothing.UpdateNVGStatus(
this,
true);
1553 super.EEItemDetached(item, slot_name);
1557 item.SwitchItemSelectionTextureEx(EItemManipulationContext.DETACHING);
1567 if (!
g_Game.IsHeadlessOrDedicatedServer())
1569 if (clothing.GetEffectWidgetTypes())
1574 if (clothing.GetGlassesEffectID() > -1)
1582 if (clothing.IsGasMask())
1588 clothing.UpdateNVGStatus(
this,
false,
true);
1596 string slot = slot_name;
1598 boo = item.IsWeapon();
1600 if (slot ==
"Melee")
1605 else if (slot ==
"Shoulder")
1614 super.SwitchItemSelectionTexture(item,slot_name);
1617 EntityAI armband = FindAttachmentBySlotName(
"Armband");
1618 if (slot_name ==
"Body" && armband)
1620 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1621 armband.SwitchItemSelectionTextureEx(EItemManipulationContext.UPDATE,p);
1632 for (
int i = 0; i < itemsArray.Count(); i++)
1652 if (ConfigGetBool(
"woman") != 1)
1661 int voice_type = ConfigGetInt(
"voiceType");
1663 if (voice_type == 0)
1699 AddAction(ActionLockedDoors, InputActionMap);
1740 #ifdef DIAG_DEVELOPER
1742 AddAction(ActionDestroyPartInstantDebug);
1743 AddAction(ActionDismantlePartInstantDebug);
1767 if (IsControlledPlayer())
1798 if (IsControlledPlayer())
1808 if (IsControlledPlayer())
1813 actions.InsertAll(bcActions);
1821 typename ai = action.GetInputType();
1833 InputActionMap.Insert(ai, action_array);
1835 action_array.Insert(action);
1846 typename ai = action.GetInputType();
1851 for (
int i = 0; i < action_array.Count(); i++)
1853 if (action == action_array.Get(i))
1855 action_array.Remove(i);
1859 InputActionMap.Insert(ai, action_array);
1861 action_array.Insert(action);
1917 if (gloves && gloves.GetHealthLevel() < 4)
1950 string surface;
int liquid;
1951 g_Game.SurfaceUnderObject(
this, surface, liquid);
1954 if (shoes && shoes.GetHealthLevel() < 4)
1966 if (pUserInt % 2 == 0)
2004 #ifdef DIAG_DEVELOPER
2005 void SetStaminaDisabled(
bool value)
2078 g_Game.GetMission().RemoveActiveInputRestriction(EInputRestrictors.SURRENDER_TRANSITION);
2086 g_Game.GetMission().AddActiveInputRestriction(EInputRestrictors.SURRENDER_TRANSITION);
2087 GetItemAccessor().EnableAutoAnimInstUpdateOnHandsChange(
false);
2104 GetItemAccessor().EnableAutoAnimInstUpdateOnHandsChange(
true);
2122 GetDayZPlayerInventory().CheckFSMState();
2147 if (
g_Game.IsMultiplayer())
2150 ServerDropEntity(item);
2177 if (GetThrowing() && GetThrowing().IsThrowingModeEnabled())
2232 g_Game.GetMission().HideInventory();
2244 g_Game.GetMission().HideInventory();
2255 if (IsControlledPlayer())
2264 return super.CanReleaseAttachment(attachment);
2269 return super.CanReleaseCargo(cargo);
2274 return super.CanReceiveItemIntoCargo(item);
2279 return super.CanSwapItemInCargo(child_entity, new_entity);
2290 return super.CanReceiveItemIntoHands(item_to_hands);
2425 float add_health_coef = 0.33;
2429 AddHealth(
"LeftLeg",
"Health", (GetMaxHealth(
"LeftLeg",
"Health") - GetHealth(
"LeftLeg",
"Health") ) * add_health_coef );
2430 AddHealth(
"RightLeg",
"Health", (GetMaxHealth(
"RightLeg",
"Health") - GetHealth(
"RightLeg",
"Health")) * add_health_coef );
2431 AddHealth(
"RightFoot",
"Health", (GetMaxHealth(
"RightFoot",
"Health") - GetHealth(
"RightFoot",
"Health")) * add_health_coef );
2432 AddHealth(
"LeftFoot",
"Health", (GetMaxHealth(
"LeftFoot",
"Health") - GetHealth(
"LeftFoot",
"Health")) * add_health_coef );
2443 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2541 for (
int att = 0; att < attcount; ++att)
2544 if (attachment.IsItemBase())
2546 item_name = attachment.GetType();
2547 if (
g_Game.IsKindOf(item_name, searched_item))
2560 if (!
g_Game.IsMultiplayer() &&
g_Game.GetPlayer() &&
g_Game.GetPlayer().GetID() ==
this.GetID())
2562 PluginSceneManager scene_editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager));
2563 scene_editor.InitLoad();
2585 if (IsControlledPlayer())
2592 m_Hud.UpdateBloodName();
2594 g_Game.GetUIManager().CloseAll();
2595 mission.SetPlayerRespawning(
false);
2596 mission.OnPlayerRespawned(
this);
2598 m_Hud.ShowQuickbarUI(
true);
2599 m_Hud.UpdateQuickbarGlobalVisibility();
2600 m_Hud.InitHeatBufferUI(
this);
2601 m_Hud.OnPlayerLoaded();
2605 if (!
g_Game.IsHeadlessOrDedicatedServer())
2612 m_CharactersHead = Head_Default.Cast(GetInventory().FindPlaceholderForSlot(slotId));
2622 wpn.DelayedValidateAndRepair();
2626 wpn.ValidateAndRepair();
2685 EntityAI entityInHands = GetEntityInHands();
2696 else if (entityInHands && entityInHands.HasEnergyManager())
2698 if (entityInHands.GetCompEM().IsPlugged())
2699 entityInHands.OnPlacementCancelled(
this);
2711 EntityAI entityInHands = GetEntityInHands();
2712 if (entityInHands && entityInHands.HasEnergyManager())
2714 if (entityInHands.GetCompEM().IsPlugged())
2715 entityInHands.OnPlacementCancelled(
this);
2760 if (IsControlledPlayer())
2762 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2775 if (IsControlledPlayer())
2777 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2800 m_ProcessResetADS =
true;
2803 else if (!
g_Game.IsMultiplayer())
2817 m_ProcessResetADS =
false;
2839 foreach (
string t: disallowedUndergroundTypes)
2841 if (item.IsKindOf(t))
2859 if (
g_Game.IsMultiplayer())
3009 if (!IsPlayerSelected() || !IsAlive())
3027 EntityAI heldEntity = GetEntityInHands();
3028 if (heldEntity && heldEntity.HasEnergyManager() && heldEntity.GetCompEM().IsPlugged())
3031 EntityAI placed_entity = heldEntity;
3034 placed_entity.GetCompEM().UpdatePlugState();
3042 if (!m_DeathSyncSent && m_KillerData)
3045 m_DeathSyncSent =
true;
3058 if (m_PlayerSoundEventHandler)
3059 m_PlayerSoundEventHandler.OnTick(delta_time);
3076 #ifdef DIAG_DEVELOPER
3079 m_WeaponDebug.OnCommandHandlerUpdate();
3092 if (m_ProcessResetADS)
3122 int currentTime =
g_Game.GetTime();
3123 float deltaT = (currentTime -
m_LastTick) * 0.001;
3135 super.EEItemIntoHands(item);
3139 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(item, {
Bolt_Base});
3144 w.ResetWeaponAnimState();
3150 GetMeleeFightLogic().SetBlock(
false);
3155 if (item.IsHeavyBehaviour() && IsRaised())
3170 super.EEItemOutOfHands(item);
3189 GetMovementState(hms);
3206 override void CommandHandler(
float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished)
3208 EvaluateDamageHit(pCurrentCommandID);
3211 super.CommandHandler(pDt,pCurrentCommandID,pCurrentCommandFinished);
3215 vector playerPosition = PhysicsGetPositionWS();
3333 HandleDamageHit(pCurrentCommandID);
3341 mngr.Update(pCurrentCommandID);
3349 m_TransportCache = null;
3352 if (!m_UnconsciousDebug)
3355 if (m_ShouldBeUnconscious && m_IsUnconscious)
3360 m_Swimming.m_bWasSwimming |= hcu.
IsInWater();
3363 if (m_Swimming.m_bWasSwimming)
3371 else if (m_ShouldBeUnconscious)
3380 m_IsUnconscious =
true;
3388 m_LastCommandBeforeUnconscious = pCurrentCommandID;
3396 m_TransportCache = null;
3399 Motorbike motorbike = Motorbike.Cast(m_TransportCache);
3402 motorbike.FallOver();
3406 m_JumpClimb.CheckAndFinishJump();
3407 hcu = StartCommand_Unconscious(0);
3408 SetFallYDiff(playerPosition[1]);
3412 else if (m_IsUnconscious)
3423 if (
false == PhysicsIsFalling(
false))
3428 if (m_Swimming.m_bWasSwimming || m_LastCommandBeforeUnconscious ==
DayZPlayerConstants.COMMANDID_VEHICLE)
3431 hcu.
WakeUp(wakeUpStance);
3433 m_IsUnconscious =
false;
3443 m_IsUnconscious =
false;
3452 if (quickBarSlot && IsAlive())
3480 bool isSwimmingOrClimbing = GetCommand_Swim() || GetCommand_Climb() || GetCommand_Ladder();
3481 bool isStaminaLimitAppliable = hcm || isSwimmingOrClimbing;
3483 if (isStaminaLimitAppliable)
3492 if (!
g_Game.IsDedicatedServer())
3515 m_Bot.OnUpdate(pDt);
3525 TryGetInVehicleDebug();
3532 void SetGetInVehicleDebug(
EntityAI ent)
3534 m_GetInVehicleTransportDebug =
Transport.Cast(ent);
3537 void TryGetInVehicleDebug()
3539 if (m_GetInVehicleTransportDebug)
3541 HumanCommandVehicle vehCommand = StartCommand_Vehicle(m_GetInVehicleTransportDebug, 0, 0);
3544 vehCommand.
SetVehicleType(m_GetInVehicleTransportDebug.GetAnimInstance());
3546 m_GetInVehicleTransportDebug = null;
3579 mission.RemoveActiveInputExcludes({
"map"});
3580 mission.RemoveActiveInputRestriction(EInputRestrictors.MAP);
3582 else if (!
g_Game.IsMultiplayer())
3589 m_hac.InternalCommand(command_ID);
3595 if (!
g_Game.IsHeadlessOrDedicatedServer())
3603 m_Hud.ShowQuickbarPlayer(
true);
3606 mission.RemoveActiveInputExcludes({
"map"});
3607 mission.RemoveActiveInputRestriction(EInputRestrictors.MAP);
3644 if (
GetUApi().GetInputByID(UADefaultAction).LocalPress() ||
GetUApi().GetInputByID(UAUIMenu).LocalPress() ||
GetUApi().GetInputByID(UAGear).LocalPress())
3713 if (super.IsLanded(pCurrentCommandID))
3721 bool wasFalling = m_IsUnconsciousFalling;
3722 m_IsUnconsciousFalling = PhysicsIsFalling(
false);
3723 return wasFalling && !m_IsUnconsciousFalling;
3733 if (super.OnLand(pCurrentCommandID, fallDamageData))
3746 if (super.IsAlreadyInFallingCommand(pCurrentCommandID))
3765 g_Game.GetMission().GetHud().ShowHudUI(
false);
3771 EntityAI entityInHands = GetEntityInHands();
3778 g_Game.GetSoundScene().SetSoundVolume(0,2);
3784 RequestRespawnBot();
3794 if (m_TransportCache)
3795 m_TransportCache.MarkCrewMemberUnconscious(m_TransportCache.CrewMemberIndex(
this));
3799 g_Game.EnableVoN(
this,
false);
3807 if (GetMeleeFightLogic())
3809 GetMeleeFightLogic().SetBlock(
false);
3813 SetMasterAttenuation(
"UnconsciousAttenuation");
3832 g_Game.GetSoundScene().SetSoundVolume(
g_Game.m_volume_sound,1);
3833 PPERequester_UnconEffects requester = PPERequester_UnconEffects.Cast(PPERequesterBank.GetRequester(PPERequester_UnconEffects));
3834 requester.FadeOutEffect();
3856 g_Game.EnableVoN(
this,
true);
3864 SetMasterAttenuation(
"");
3885 PluginAdminLog adm = PluginAdminLog.Cast(
GetPlugin(PluginAdminLog));
3886 adm.PlayerKilledByDrowningUncon(
this);
3888 SetHealth(
"",
"",-100);
3894 g_Game.GetMission().GetHud().ShowQuickbarUI(
false);
3901 float sin_normalized = (sin + 1) / 2;
3902 if (sin_normalized < 0.05)
3908 PPERequesterBank.GetRequester(PPERequester_UnconEffects).Start(
m_UnconParam);
3932 return m_IsUnconscious;
3937 #ifdef DIAG_DEVELOPER
3938 if (!m_CanBeTargetedDebug)
3944 return super.CanBeTargetedByAI(ai) && !
IsUnconscious() && !IsInVehicle();
3949 AddHealth(
"",
"Shock",shock);
3956 g_Game.GetMission().RemoveActiveInputExcludes({
"inventory"},
true);
3957 g_Game.GetMission().RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
4049 if (attachment && attachment.GetType() ==
"Splint_Applied")
4051 attachment.Delete();
4071 hcm = GetCommand_Move();
4080 m_JumpClimb.CheckAndFinishJump();
4089 float avgLegHealth = GetHealth(
"RightLeg",
"") + GetHealth(
"LeftLeg",
"") + GetHealth(
"RightFoot",
"") + GetHealth(
"LeftFoot",
"");
4090 avgLegHealth *= 0.25;
4096 PhysicsGetVelocity(v);
4105 if (IsClimbingLadder())
4133 void MovingShock(
float legHealth,
float highShock,
float midShock,
float lowShock)
4154 Param1<float> damage =
new Param1<float>(0);
4155 damage.param1 = dmg;
4156 g_Game.RPCSingleParam(
this,
ERPCs.RPC_SHOCK, damage,
true, GetIdentity());
4165 return super.CanPickupHeavyItem(item);
4171 SetHealth(
"RightLeg",
"", 0);
4172 SetHealth(
"RightFoot",
"", 0);
4173 SetHealth(
"LeftLeg",
"", 0);
4174 SetHealth(
"LeftFoot",
"", 0);
4180 if (itemInHands && itemInHands.IsHeavyBehaviour())
4188 if (attachment && attachment.GetType() ==
"Splint_Applied")
4199 private void RequestRespawnBot()
4201 bool respawn =
false;
4202 int respawnTime = -1;
4203 m_Bot.GetRespawnData(respawn, respawnTime);
4222 if (itemInHands.IsHeavyBehaviour())
4226 ServerDropEntity(itemInHands);
4233 itemInHands.OnItemInHandsPlayerSwimStart(
this);
4248 g_Game.GetMission().AddActiveInputExcludes({
"swimming"});
4263 g_Game.GetMission().RemoveActiveInputExcludes({
"swimming"});
4277 g_Game.GetMission().AddActiveInputExcludes({
"ladderclimbing"});
4288 g_Game.GetMission().RemoveActiveInputExcludes({
"ladderclimbing"});
4313 m_JumpClimb.CheckAndFinishJump();
4362 EntityAI itemOnHead = FindAttachmentBySlotName(
"Headgear");
4364 if (itemInHand && itemInHand.GetCompEM())
4365 itemInHand.GetCompEM().SwitchOff();
4369 if (itemOnHead && itemOnHead.GetCompEM())
4370 itemOnHead.GetCompEM().SwitchOff();
4372 g_Game.GetMission().AddActiveInputExcludes({
"vehicledriving"});
4381 if (!m_ShouldBeUnconscious)
4386 g_Game.GetMission().RemoveActiveInputExcludes({
"vehicledriving"});
4415 super.OnCommandDeathStart();
4418 RequestRespawnBot();
4454 return ((1 << stance) & stanceMask) != 0;
4482 if (GetThrowing().IsThrowingInProgress() || GetThrowing().IsThrowingAnimationPlaying())
4488 if (
Math.
AbsInt(previousStance - newStance) == 3)
4565 m_Hud.ShowVehicleInfo();
4567#ifdef FEATURE_NETWORK_RECONCILIATION
4574 identity.Possess(pawn);
4581#ifdef FEATURE_NETWORK_RECONCILIATION
4587 identity.Possess(
this);
4593 m_Hud.HideVehicleInfo();
4598 if (change_to_enabled)
4629 int currentTime =
g_Game.GetTime();
4677 #ifdef DIAG_DEVELOPER
4678 DiagOnPostFrame(other, extra);
4682#ifdef DIAG_DEVELOPER
4683 protected void DiagOnPostFrame(
IEntity other,
int extra)
4689 m_WeaponDebug.OnPostFrameUpdate();
4692 if (GetBleedingManagerRemote())
4694 GetBleedingManagerRemote().OnUpdate();
4701 m_MeleeDebug =
true;
4704 else if (!DiagMenu.GetBool(
DiagMenuIDs.MELEE_DEBUG) && m_MeleeDebug)
4706 m_MeleeDebug =
false;
4711 if (DiagMenu.GetBool(
DiagMenuIDs.SOUNDS_ITEM_IMPACT_SOUNDS))
4712 InventoryItem.DrawImpacts();
4716 PluginDrawCheckerboard drawCheckerboard = PluginDrawCheckerboard.Cast(
GetPluginManager().GetPluginByType(PluginDrawCheckerboard));
4717 if (drawCheckerboard && !drawCheckerboard.IsActive())
4719 drawCheckerboard.ShowWidgets(DiagMenu.GetBool(
DiagMenuIDs.MISC_DRAW_CHECKERBOARD));
4723 if (m_PresenceNotifier)
4725 m_PresenceNotifier.EnableDebug(DiagMenu.GetBool(
DiagMenuIDs.MISC_PRESENCE_NOTIFIER_DBG));
4728 if (m_TargetTemperatureDiag)
4730 m_TargetTemperatureDiag.ShowDebug(DiagMenu.GetBool(
DiagMenuIDs.MISC_TARGET_TEMPERATURE));
4733 if (DiagMenu.GetBool(
DiagMenuIDs.TRIGGER_PLAYER_DEBUG))
4736 GetCollisionBox(minmax);
4739 if (m_IsInsideTrigger)
4746 dbgShape.CreateMatrix(mat);
4747 dbgShape.SetMatrix(mat);
4751 if (m_Environment && m_Environment.m_Debug)
4754 EnvDebugData envDebugData = m_Environment.GetEnvDebugData();
4755 g_Game.RPCSingleParam(
this,
ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG_DATA, envDebugData,
false, GetIdentity());
4757 m_Environment.ShowEnvDebugPlayerInfo(DiagMenu.GetBool(
DiagMenuIDs.MISC_ENVIRONMENT_DEBUG));
4761 if (m_FallDamage && m_FallDamage.m_Debug)
4764 FallDamageDebugData fallDamageDebugData = m_FallDamage.GetFallDamageDebugData();
4765 g_Game.RPCSingleParam(
this,
ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG_DATA, fallDamageDebugData,
false, GetIdentity());
4767 m_FallDamage.ShowFallDamageDebugInfo(DiagMenu.GetBool(
DiagMenuIDs.MISC_FALLDAMAGE_DEBUG));
4772 override void OnEnterTrigger(ScriptedEntity trigger)
4774 super.OnEnterTrigger(trigger);
4776 ++m_IsInsideTrigger;
4779 override void OnLeaveTrigger(ScriptedEntity trigger)
4781 super.OnLeaveTrigger(trigger);
4783 --m_IsInsideTrigger;
4790 m_Hud.SetStaminaBarVisibility(show);
4825 override bool CanClimb(
int climbType, SHumanCommandClimbResult climbRes)
4843 return super.CanClimb(climbType,climbRes);
4865 return super.CanJump();
4870 return m_JumpClimb.m_bIsJumpInProgress;
4876 temp =
g_Game.GetMission().GetActiveRefresherLocations();
4877 int count = temp.Count();
4880 vector pos = target.GetPosition();
4881 for (
int i = 0; i < count; i++)
4910 GetItemAccessor().OnItemInHandsChanged(
true);
4911 GetItemAccessor().ResetWeaponInHands();
4925 vector pdir = GetDirection();
4950 if (GetThrowing().IsThrowingModeEnabled() || GetThrowing().IsThrowingAnimationPlaying())
4974 if (!quickBarEntity)
4983 EntityAI inHandEntity = GetEntityInHands();
4985 if (!GetDayZPlayerInventory().
IsIdle())
4989 handInventoryLocation.
SetHands(
this,quickBarEntity);
4993 if (inHandEntity == quickBarEntity)
4995 if (GetHumanInventory().CanRemoveEntityInHands())
4998 PredictiveMoveItemFromHandsToInventory();
5004 quickBarEntity.GetInventory().GetCurrentInventoryLocation(invLocQBItem);
5012 int index = GetHumanInventory().FindUserReservedLocationIndex(inHandEntity);
5014 GetHumanInventory().GetUserReservedLocation(index, inHandEntityFSwapDst);
5044 if (GetInventory().IsInventoryLocked())
5056 if (itemInHands != quickBarItem)
5066 if (IsRaised() || GetCommand_Melee())
5090 if (!action.GetInput().IsActive())
5134 EntityAI entity_in_hands = GetEntityInHands();
5156 mngr_client.Interrupt();
5158 else if (GetEntityInHands()!= magazine)
5196 int last_ammo_magazine_count;
5197 int ammo_magazine_count;
5200 int last_ammo_pile_count;
5201 int ammo_pile_count;
5206 for (
int att_i = 0; att_i < nAttachment; ++att_i)
5209 ref
CargoBase attachment_cargo = attachment.GetInventory().GetCargo();
5211 if (attachment_cargo)
5213 int nAttachmentCargoItem = attachment_cargo.GetItemCount();
5214 for (
int cgo_i = 0; cgo_i < nAttachmentCargoItem; ++cgo_i)
5216 EntityAI cargo_item = attachment_cargo.GetItem(cgo_i);
5219 if (cargo_item.IsMagazine())
5221 Magazine magazine = Magazine.Cast(cargo_item);
5222 ammo_pile_count = magazine.GetAmmoCount();
5227 if (ammo_pile_count > 0)
5229 if (last_ammo_magazine_count == 0)
5231 ammo_magazine = magazine;
5232 last_ammo_magazine_count = ammo_pile_count;
5236 if (last_ammo_magazine_count < ammo_pile_count)
5238 ammo_magazine = magazine;
5239 last_ammo_magazine_count = ammo_pile_count;
5245 else if (weapon_manager.
CanLoadBullet(weapon_base, magazine))
5247 if (ammo_pile_count > 0)
5249 if (last_ammo_pile_count == 0)
5251 ammo_pile = magazine;
5252 last_ammo_pile_count = ammo_pile_count;
5256 if (last_ammo_pile_count > ammo_pile_count)
5258 ammo_pile = magazine;
5259 last_ammo_pile_count = ammo_pile_count;
5272 return ammo_magazine;
5285 g_Game.GetMission().AddDummyPlayerToScheduler(
this);
5292 m_Bot =
new Bot(
this);
5324 override SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
false)
5331 return GetWeightEx();
5341 return GetInventory().HasEntityInInventory(entity);
5346 if (
g_Game.IsMultiplayer())
5362 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
5364 bool cp_owned =
false;
5366 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
5368 bool np_owned =
false;
5370 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
5372 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
5377 Error(
"[syncinv] unsupported instance type t=" + t);
5387 float totalWeight = super.GetWeightSpecialized(forceRecalc);
5392 totalWeight += itemHands.GetWeightEx(forceRecalc);
5395 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
5397 float itemInHandsWeight = totalWeight - super.GetWeightSpecialized(forceRecalc);
5399 dta.
SetCalcDetails(
"TMan: " + (super.GetWeightSpecialized(forceRecalc)+ itemInHandsWeight) +
"(contents weight[includes item in hands])");
5407 const int VISIBILITY_SLOTS_COUNT = 10;
5409 int attcount = GetInventory().AttachmentCount();
5410 float sumVisibility = 0;
5411 float countVisibility = 0;
5412 float visibilityMean = 0;
5416 for (
int att = 0; att < attcount; att++)
5418 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
5419 if (attachment.IsClothing())
5423 sumVisibility += clothing.GetItemVisibility();
5428 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
5457 float health = GetHealth(
"",
"");
5469 float blood = GetHealth(
"",
"Blood");
5497 float immmunity_max = 1;
5504 float health = GetHealth(
"",
"");
5505 float health_max = GetMaxHealth(
"",
"");
5518 float blood = GetHealth(
"",
"Blood");
5519 float blood_max = GetMaxHealth(
"",
"Blood");
5541 if (stat_value <= critical)
5545 if (stat_value <= low)
5549 if (stat_value <= normal)
5553 if (stat_value <= high)
5562 if (stat_value <= critical)
5566 if (stat_value <= low)
5570 if (stat_value <= normal)
5574 if (stat_value <= high)
5594 float max_health = GetMaxHealth(
"GlobalHealth",
"Health") + 0.01;
5595 float max_blood = GetMaxHealth(
"GlobalHealth",
"Blood") + 0.01;
5598 float health_normalized = GetHealth(
"GlobalHealth",
"Health") / max_health;
5599 float blood_normalized = GetHealth(
"GlobalHealth",
"Blood") / max_blood;
5600 immunity = energy_normalized + water_normalized + health_normalized + blood_normalized;
5601 immunity = immunity / 4;
5615 if (IsRaised() || (item && item.IsHeavyBehaviour()))
5621 if (item && GetThrowing() && GetThrowing().IsThrowingModeEnabled())
5647 return GetCommand_Move() && GetCommand_Move().IsInRoll();
5685 if (!m_FightEndBlendTimer)
5686 m_FightEndBlendTimer =
new Timer();
5687 if (!m_FightEndBlendTimer.IsRunning())
5702 if (item && item.GetHierarchyParent() && item.GetHierarchyParent().IsWeapon() && item.IsRuined())
5723 super.RPC(rpc_type, params, guaranteed, recipient);
5729 super.OnRPC(sender, rpc_type, ctx);
5735 case ERPCs.RPC_PLAYER_STAT:
5740 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5747 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5754 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5761 case ERPCs.RPC_SYMPTOM_PARAM_SYNC:
5768 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5773 case ERPCs.RPC_USER_ACTION_MESSAGE:
5785 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5786 ref Param1<float> p_synch =
new Param1<float>(0);
5788 float specialty_level = p_synch.param1;
5792 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5793 ref Param5<float, float, float, float, bool> p_debug_synch =
new Param5<float, float ,float, float, bool>(0, 0, 0, 0,
false);
5794 ctx.
Read(p_debug_synch);
5795 float general_bonus_before = p_debug_synch.param1;
5796 float general_bonus_after = p_debug_synch.param2;
5797 float last_UA_value = p_debug_synch.param3;
5798 float cooldown_value = p_debug_synch.param4;
5799 float cooldown_active = p_debug_synch.param5;
5807 case ERPCs.RPC_WARNING_ITEMDROP:
5812 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5817 case ERPCs.RPC_WARNING_TELEPORT:
5822 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5826 case ERPCs.RPC_INIT_SET_QUICKBAR:
5827 ref Param1<int> count =
new Param1<int>(0);
5828 if (ctx.
Read(count))
5830 for (
int i = 0; i < count.param1 ; i++)
5837 case ERPCs.RPC_SYNC_THERMOMETER:
5840 if (ctx.
Read(value))
5841 m_Hud.SetTemperature(value.
ToString() +
"#degrees_celsius");
5846 case ERPCs.RPC_CHECK_PULSE:
5867 case PlantType.TREE_HARD:
5868 SoundHardTreeFallingPlay();
5871 case PlantType.TREE_SOFT:
5872 SoundSoftTreeFallingPlay();
5875 case PlantType.BUSH_HARD:
5876 SoundHardBushFallingPlay();
5879 case PlantType.BUSH_SOFT:
5880 SoundSoftBushFallingPlay();
5883 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5890 case ERPCs.RPC_DEBUG_MONITOR_STR:
5897 case ERPCs.RPC_ITEM_REPAIR:
5898 PluginInventoryRepair repairPlugin = PluginInventoryRepair.Cast(
GetPlugin(PluginInventoryRepair));
5899 repairPlugin.OnRPC(ctx);
5915 #ifdef DIAG_DEVELOPER
5916 case ERPCs.DEV_RPC_AGENT_RESET:
5924 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5926 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
5927 plugin_remote_server.OnRPC(ctx,
this);
5931 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5933 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
5934 PluginDeveloper plugin_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5935 if (plugin_dev.m_ScriptConsole)
5936 plugin_dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5938 plugin_remote_client.OnRPC(ctx);
5942 case ERPCs.DEV_AGENT_GROW:
5948 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5951 mid.StopWatchRequest(
this);
5956 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5958 PluginUniversalTemperatureSourceServer plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5959 plugin_uts_server.OnRPC(ctx,
this);
5963 case ERPCs.DEV_UTS_DEBUG_DATA:
5965 PluginUniversalTemperatureSourceClient plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5966 plugin_uts_client.OnRPC(ctx);
5973 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5982 bool success =
g_Game.ExecuteEnforceScript(
"void scConsMain() \n{\n" + code +
"\n}\n",
"scConsMain");
5989 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5991 PluginDeveloper dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5992 if (dev.m_ScriptConsole)
5993 dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5997 case ERPCs.DEV_SET_DEV_ITEM:
5999 Param1<EntityAI> ent =
new Param1<EntityAI>(null);
6000 if (ctx.
Read(ent) && ent.param1)
6003 mid2.RegisterDebugItem(ent.param1,
this);
6009 case ERPCs.RPC_ITEM_DIAG:
6011 Param1<EntityAI> p1 =
new Param1<EntityAI>(null);
6015 plgn.OnRPC(p1.param1, ctx);
6022 #ifdef DIAG_DEVELOPER
6023 PluginDeveloper module_rc = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
6025 module_rc.OnRPC(
this, rpc_type, ctx);
6027 PluginDeveloperSync module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
6029 module_rcs.OnRPC(
this, rpc_type, ctx);
6037 if (plugin_diag_menu)
6038 plugin_diag_menu.
OnRPC(
this, rpc_type, ctx);
6044 super.OnGameplayDataHandlerSync();
6091 if (
Class.
CastTo(ppeRequester, PPERequesterBank.GetRequester(ppeIdx)))
6092 ppeRequester.
Start();
6115 PPERequesterBank.GetRequester(ppeIdx).Stop(
new Param1<bool>(
true));
6146 g_Game.GetWeather().GetSnowfall().GetLimits(min,max);
6154 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
6155 if (!
g_Game.IsHeadlessOrDedicatedServer())
6172 super.OnVariablesSynchronized();
6287 item.SetHealthMax(
"",
"");
6288 item.SetWet(item.GetWetInit());
6290 item.SetFrozen(
false);
6301 m_PlayerSelected =
true;
6309#ifdef FEATURE_NETWORK_RECONCILIATION
6313 identity.Possess(
this);
6332 Param1<int> paramCount =
new Param1<int>(count);
6333 params.Insert(paramCount);
6334 for (
int i = 0; i < count; i++)
6340 if (count > 0 &&
g_Game.IsMultiplayer())
6342 g_Game.RPC(
this,
ERPCs.RPC_INIT_SET_QUICKBAR, params,
true, identity);
6352 if (
g_Game.IsMultiplayer())
6357 g_Game.RPCSingleParam(
this,
ERPCs.RPC_WARNING_ITEMDROP, null,
true, identity);
6361 g_Game.GetMission().SyncRespawnModeInfo(identity);
6388 g_Game.GetMission().ResetGUI();
6398 int characterCount =
g_Game.GetMenuData().GetCharactersCount() - 1;
6399 int idx =
g_Game.GetMenuData().GetLastPlayedCharacter();
6405 g_Game.GetMission().EnableAllInputs(
true);
6409 #ifdef DIAG_DEVELOPER
6410 m_TargetTemperatureDiag = PluginTargetTemperature.Cast(
GetPlugin(PluginTargetTemperature));
6411 m_TargetTemperatureDiag.Init(
this);
6416 GetCachedEquipment().UpdateParents();
6421 super.SimulateDeath(state);
6444 BurlapSackCover attachment;
6447 PPERequester_BurlapSackEffects req;
6448 if (
Class.
CastTo(req,PPERequesterBank.GetRequester(PPERequesterBank.REQ_BURLAPSACK)))
6454 else if (req.IsRequesterRunning())
6456 PPERequesterBank.GetRequester(PPERequester_BurlapSackEffects).Stop();
6473 if (item && item.IsObstructingVoice())
6475 item.MutePlayer(
this,
true);
6479 g_Game.SetVoiceEffect(
this, VoiceEffectMumbling,
false);
6480 g_Game.SetVoiceEffect(
this, VoiceEffectObstruction,
false);
6489 float resistance = 0;
6490 if (mask.HasIntegratedFilter() || mask.IsExternalFilterAttached())
6491 resistance = 1 - mask.GetFilterQuantity01();
6523 if (
m_EffectWidgets.m_MaskWidgetUpdateCount < 2 && callback.GetLength() > 2 && playback_time > 0.5 )
6533 if (super.OnInputUserDataProcess(userDataType, ctx))
6560 if (!ctx.
Read(presence))
6573 if (ctx.
Read(uid) && ctx.
Read(mute))
6575 g_Game.MutePlayer(uid, GetIdentity().GetPlainId(), mute);
6594 float blood = GetHealth(
"GlobalHealth",
"Blood");
6596 blood_scale_normalized =
Math.
Clamp(blood_scale_normalized,0,1);
6609 bool use_stack_max =
false;
6614 if (!ctx.
Read(type))
6619 if (!ctx.
Read(item1))
6626 if (!ctx.
Read(dummy))
6631 item1.GetInventory().GetCurrentInventoryLocation(srcIL);
6640 item1.SplitItemToInventoryLocation(dstIL);
6642 item1.SplitIntoStackMaxToInventoryLocation(dstIL);
6648 if (!ctx.
Read(item1))
6650 if (!ctx.
Read(item2))
6652 if (!ctx.
Read(use_stack_max))
6654 if (!ctx.
Read(slot_id))
6660 item1.GetInventory().GetCurrentInventoryLocation(srcIL);
6665 if (type == -1 && item1 && item2)
6667 item2.GetInventory().GetCurrentInventoryLocation(dstIL);
6670 item1.CombineItems(item2, use_stack_max);
6672 else if (type == 1 && item1)
6695 item1.SplitIntoStackMax(item2, slot_id,
this);
6703 item1.SplitItem(
this);
6706 else if (type == 2 && item1 && item2)
6714 dstIL.
SetCargo(item2, item1, slot_id, row, col,
false);
6718 item1.SplitIntoStackMaxCargo(item2, slot_id, row, col);
6720 else if (type == 3 && item1)
6725 item1.SplitIntoStackMaxHands(
this);
6735 return ItemBase.Cast(GetEntityInHands());
6746 float surfaceY =
g_Game.SurfaceY(pos[0], pos[2]);
6747 float roadY =
g_Game.SurfaceRoadY(pos[0], pos[2]);
6748 float diffY = surfaceY - roadY;
6754 if (surfaceY != roadY)
6762 diffY = surfaceY - ownerY;
6766 pos[1] = ownerY + 0.05;
6770 bool is_AI =
g_Game.IsKindOf(object_name,
"DZ_LightAI");
6773 return SpawnAI(object_name, pos);
6785 if (
g_Game.IsKindOf(object_name,
"Boat"))
6797 vector posRandom = MiscGameplayFunctions.GetRandomizedPositionVerifiedPlayer(
this,raycastDistance,radius,
this);
6809 bool is_ai =
g_Game.IsKindOf(object_name,
"DZ_LightAI");
6830 item.SetPosition(pos_spawn);
6831 item.PlaceOnSurface();
6832 return can_be_dropped;
6859 string t = src.GetType();
6863 bool locked =
g_Game.HasInventoryJunctureDestination(
this, loc);
6872 MiscGameplayFunctions.TransferItemProperties(src, dst);
6874 g_Game.RemoteObjectTreeCreate(dst);
6894 dst.PlaceOnSurface();
6895 dst.SetResultOfSplit(markItemAsSplitResult);
6896 MiscGameplayFunctions.TransferItemProperties(src, dst);
6915 g_Game.ChatMP(
this, text, style);
6919 g_Game.Chat(text, style);
6926 Message(text,
"colorStatusChannel");
6938 Message(text,
"colorFriendly");
6944 Message(text,
"colorImportant");
6956 g_Game.GetUIManager().CloseAll();
6957 mission.RemoveActiveInputExcludes({
"inventory"},
false);
6958 mission.RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
6976 if ((
g_Game.IsServer() || !
g_Game.IsMultiplayer()) && inventory)
6980 int nItems = items.Count();
6981 for (
int i = 0; i < nItems; ++i)
6986 g_Game.ObjectDelete(item);
6994 LocalDestroyEntityInHands();
7005 int count = itemsArray.Count();
7007 for (
int i = 0; i < count; ++i)
7013 ServerDropEntity(item);
7021 g_Game.ObjectGetType(
this, type);
7051 super.OnParticleEvent(pEventType ,pUserString, pUserInt);
7053 if (!
g_Game.IsHeadlessOrDedicatedServer())
7055 if (pUserInt == 123456)
7058 int boneIdx = player.GetBoneIndexByName(
"Head");
7074 eff.SetAutodestroy(
true);
7077 player.AddChild(p, boneIdx);
7086 if (!ToDelete() && IsAlive() && !IsSwimming() && !
m_IsDrowning)
7137 vector pos = GetBonePositionWS(index);
7138 float depth =
g_Game.GetWaterDepth(pos);
7155 state_changed =
true;
7190 set<int> ret =
new set<int>;
7191 ret.Insert(EAttExclusions.SHAVING_MASK_ATT_0);
7192 ret.Insert(EAttExclusions.SHAVING_HEADGEAR_ATT_0);
7223 #ifdef DIAG_DEVELOPER
7225 if (IsControlledPlayer())
7264 if (amount > storedValue)
7306 if (IsPlayerSelected() && !IsAlive())
7356 if (
g_Game.SaveVersion() < 102)
7361 super.OnStoreSave(ctx);
7363 GetHumanInventory().OnStoreSave(ctx);
7393 arrowManager.
Save(ctx);
7420 if (!super.OnStoreLoad(ctx, version))
7424 if (!GetHumanInventory().
OnStoreLoad(ctx, version))
7434 Print(
"---- failed to load PlayerStats ----");
7440 Print(
"---- failed to load ModifiersManager, read fail ----");
7446 Print(
"---- failed to load AgentPool, read fail ----");
7452 Print(
"---- failed to load SymptomManager, read fail ----");
7458 Print(
"---- failed to load BleedingManagerServer, read fail ----");
7464 Print(
"---- failed to load PlayerStomach, read fail ----");
7486 Print(
"---- failed to load Persistent Flags, read fail ----");
7493 if (!ctx.
Read(onLadder))
7517 arrowManager.
Load(ctx);
7522 Print(
"---- failed to load ThermalBiasHandler, read fail ----");
7527 Print(
"---- PlayerBase OnStoreLoad SUCCESS ----");
7533 GetHumanInventory().OnAfterStoreLoad();
7546 if (MiscGameplayFunctions.TeleportPlayerToSafeLocation3D(
this,safePos) &&
m_AdminLog)
7547 m_AdminLog.PlayerTeleportedLog(
this,currentPos,safePos,
"Spawning in Player Restricted Area: " + pra.
areaName);
7562 int lifespan_state = 0;
7563 if (!ctx.
Read(lifespan_state))
7567 int last_shaved = 0;
7568 if (!ctx.
Read(last_shaved))
7574 bool bloody_hands_old;
7575 if (!ctx.
Read(bloody_hands_old))
7581 int bloody_hands = 0;
7582 if (!ctx.
Read(bloody_hands))
7588 bool blood_visible =
false;
7589 if (!ctx.
Read(blood_visible))
7594 if (!ctx.
Read(blood_type))
7604 int hour, minute, second;
7628 g_Game.GetAnalyticsServer().OnPlayerConnect(
this);
7654 g_Game.GetAnalyticsServer().OnPlayerDisconnect(
this);
7669 if (sandstormController)
7691 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7694 float temperature = 0;
7700 if (pollution & EPollution.HEAVYMETAL)
7714 if (!edibleItem || !edibleItem.CanBeConsumed())
7720 temperature = edibleItem.GetTemperature();
7725 if (edibleItem.IsLiquidContainer())
7727 int liquidType = edibleItem.GetLiquidType();
7728 string liquidClassName = Liquid.GetLiquidClassname(liquidType);
7729 if (liquidClassName.
Length() == 0)
7730 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edibleItem) +
" data.m_Type=" + data.
m_Type +
" liquid_type=" + liquidType);
7738 foodStageType = edibleItem.
GetFoodStage().GetFoodStageType();
7757 g_Game.GetUIManager().ScreenFadeIn(0,
"You are Unconscious", FadeColors.BLACK, FadeColors.WHITE);
7762 g_Game.GetUIManager().ScreenFadeOut(0);
7810 if (!
g_Game.IsMultiplayer())
7839 if (m_ReplaceSoundEventHandler)
7840 return m_ReplaceSoundEventHandler.PlayReplaceSound(soundEventID, soundType, param);
7852 if (!m_PlayerSoundEventHandler)
7855 return m_PlayerSoundEventHandler.PlayRequestEx(
id, is_from_server, param);
7860 if (!m_PlayerSoundEventHandler)
7863 return m_PlayerSoundEventHandler.StopRequest(
id, is_from_server, param);
7868 return m_PlayerSoundEventHandler;
7877 if (IsControlledPlayer())
7879 if (!
g_Game.IsHeadlessOrDedicatedServer())
7910 if (IsControlledPlayer())
7912 if (!
g_Game.IsHeadlessOrDedicatedServer())
7938 #ifdef DIAG_DEVELOPER
7943 DamageSystem.ResetAllZones(
this);
7999 transport.FixEntity();
8017 if (m_PerformedActionSounds.Count() == 0)
8026 m_PerformedActionSounds.Clear();
8032 if (
g_Game.IsClient())
return;
8078 float dist_check = distance * distance;
8079 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
8083 if (
vector.
DistanceSq(GetWorldPosition(), target.GetWorldPosition()) < dist_check && target !=
this)
8129 int max_count = PluginTransmissionAgents.GetAgentMaxCount(agent_id);
8130 return m_AgentPool.GetSingleAgentCount(agent_id) / max_count;
8166 float min_distance = 0.5;
8169 vector to = from + (
g_Game.GetCurrentCameraDirection() * min_distance);
8172 int contactComponent;
8174 DayZPhysics.
RaycastRV(from, to, contactPos, contactDir, contactComponent, NULL, NULL, NULL,
false,
true);
8183 return (!mask || (mask && mask.AllowFoodConsumption()));
8359 if (m_Bot && action_id >
EActions.PLAYER_BOT_INTERNAL_START && action_id <
EActions.PLAYER_BOT_END)
8361 m_Bot.StartAction(action_id);
8366 if (super.OnAction(action_id, player, ctx))
8402 PluginTransmissionAgents pluginTransmissionAgents = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
8410 map<int, string> agentList = pluginTransmissionAgents.GetSimpleAgentList();
8414 foreach (
int tid,
string tname : agentList)
8416 string injectName =
"Inject " + tname;
8417 string removeName =
"Remove " + tname;
8432 int cnt = e.GetVariableCount();
8435 for (i = 0; i < cnt; i++)
8437 if (!e.GetVariableValue(null, i, val))
8440 if (val <=
EActions.PLAYER_BOT_INTERNAL_START)
8443 if (val ==
EActions.PLAYER_BOT_START)
8449 if (val >=
EActions.PLAYER_BOT_END)
8452 string name = e.GetVariableName(i);
8461 super.GetDebugActions(outputList);
8463 if (Gizmo_IsSupported())
8480 super.OnSyncJuncture(pJunctureID, pCtx);
8497 GetInventory().OnInventoryJunctureFromServer(pCtx);
8500 GetInventory().OnInventoryJunctureFailureFromServer(pCtx);
8522 if (GetAimingModel() && IsFireWeaponRaised())
8524 GetAimingModel().RequestKuruShake(amount);
8557 SetGetInVehicleDebug(vehicle);
8579 item.SetPrepareToDelete();
8586 return !(GetThrowing().IsThrowingAnimationPlaying() || GetDayZPlayerInventory().IsProcessing() || (
GetActionManager() &&
GetActionManager().GetRunningAction()));
8606 for (
int i = count - 1; i >= 0 ; i--)
8609 if (itemToDelete != null)
8611 itemToDelete.GetInventory().GetCurrentInventoryLocation(il);
8622 for (
int j = count - 1; j >= 0 ; j--)
8625 if (itemToDelete == null)
8631 itemToDelete.Delete();
8670 m_fLastHeadingDiff = 0;
8675 return super.HeadingModel(pDt, pModel);
8705 return m_LiftWeapon_player;
8710 return m_ObstructWeapon_player;
8724 if (obstruction <= 0.0)
8729 float penetration = weapon.GetObstructionPenetrationDistance(obstruction);
8730 bool inSights = m_CameraIronsight || m_CameraOptics;
8735 return penetration > 0.040;
8741 return penetration > 0.005;
8771 m_ProcessLiftWeaponState = state;
8772 m_ProcessLiftWeapon =
true;
8773 m_ProcessObstructWeapon = obstruct;
8781 bool liftChange = m_LiftWeapon_player != state;
8782 bool obstructChange =
Math.
AbsFloat(m_ObstructWeapon_player-obstruct) > 0.03;
8785 m_LiftWeapon_player = state;
8786 m_ObstructWeapon_player = obstruct;
8793 if (!liftChange && !obstructChange)
8811 ctx.
Write(obstruct);
8826 bool limited = weap.LiftWeaponCheckEx(
this, obstruct, hitObject);
8827 if (weap.UseWeaponObstruction(
this, obstruct, hitObject))
8836 obstruct =
Math.
Clamp( obstruct, 0, 1 );
8838 if (m_LiftWeapon_player != limited || m_ObstructWeapon_player != obstruct)
8843 else if (m_LiftWeapon_player || m_ObstructWeapon_player > 0)
8852 if (m_ProcessLiftWeapon)
8854 bool liftChange = m_LiftWeapon_player != m_ProcessLiftWeaponState;
8859 m_LiftWeapon_player = m_ProcessLiftWeaponState;
8860 m_ObstructWeapon_player = m_ProcessObstructWeapon;
8861 m_ProcessLiftWeapon =
false;
8870 super.HideClothing(optic, state);
8887 SetInvisibleRecursive(
true,
this,clothingArray);
8897 SetInvisibleRecursive(
false,
this,clothingArray);
8909 super.SetDeathDarknessLevel(duration, tick_time);
8911 if (IsControlledPlayer())
8913 float actual_tick = tick_time;
8922 progress = 1 - ((duration - m_DeathDarkeningCurrentTime) / duration);
8924 m_DeathDarkeningCurrentTime += actual_tick;
8926 if (!IsAlive() && IsPlayerSelected())
8932 if (m_DeathDarkeningCurrentTime >= duration)
8934 StopDeathDarkeningEffect();
8939 StopDeathDarkeningEffect();
8978 OverrideSlidePoseAngle(
Math.
PI2);
8980 else if (!
IsInFBEmoteState() && IsControlledPlayer() && IsPlayerSelected())
8994 isActionPossible =
false;
8995 Magazine mag = Magazine.Cast(item);
9002 isActionPossible =
true;
9020 if (can_detach && target.GetInventory().FindFreeLocationFor(item, flags, il))
9026 return super.PredictiveTakeEntityToTargetInventory(target, flags, item);
9035 if (can_detach && GetInventory().FindFreeLocationFor(item, flags, il))
9041 return super.PredictiveTakeEntityToInventory(flags, item);
9047 Magazine mag = Magazine.Cast(item);
9048 if (parentWpn && mag)
9055 return super.PredictiveTakeEntityToTargetAttachment(target, item);
9061 Magazine mag = Magazine.Cast(item);
9062 if (parentWpn && mag)
9064 if (target.CanReceiveAttachment(item,slot) &&
GetWeaponManager().CanAttachMagazine(parentWpn, mag))
9069 return super.PredictiveTakeEntityToTargetAttachmentEx(target, item,slot);
9084 return super.PredictiveTakeEntityToTargetCargo(target,item);
9095 dst.
SetCargoAuto(cargo, item, row, col, item.GetInventory().GetFlipCargo());
9101 return super.PredictiveTakeEntityToTargetCargoEx (cargo, item, row, col);
9122 return super.PredictiveDropEntity(item);
9128 Magazine swapmag1 = Magazine.Cast(item1);
9129 Magazine swapmag2 = Magazine.Cast(item2);
9131 if (swapmag1 && swapmag2)
9135 if (
Class.
CastTo(parentWpn, swapmag1.GetHierarchyParent()))
9139 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag1=" + swapmag1);
9144 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
9149 if (
Class.
CastTo(parentWpn, swapmag2.GetHierarchyParent()))
9153 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag2=" + swapmag2);
9158 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
9172 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item_hands)))
9177 return super.PredictiveSwapEntities(item1, item2);
9193 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item2)))
9200 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
9205 if (item.IsHeavyBehaviour() && !
m_ActionManager.GetRunningAction() && !item.GetHierarchyParent())
9222 super.PredictiveTakeEntityToHands(item);
9240 return super.PredictiveTakeToDst(src,dst);
9253 item_ground = item1;
9255 item_ground = item2;
9257 return item_hands && item_ground && item_ground.IsHeavyBehaviour();
9268 ErrorEx(
"No valid head detected on character!");
9275 for (
int i = 0; i <
m_CharactersHead.m_HeadHairSelectionArray.Count(); ++i)
9281#ifdef DIAG_DEVELOPER
9294#ifdef DIAG_DEVELOPER
9297 switchState = !diagmenuu.m_HairHidingStateMap.Get(level);
9298 diagmenuu.m_HairHidingStateMap.Set(level, switchState);
9304 switchState = !state;
9327 if (item.HidesSelectionBySlot())
9330 for (i = 0; i < count; ++i)
9332 if (itemInventory.
GetSlotId(i) == slot_id)
9334 str = item.GetHeadHidingSelection().Get(i);
9340 Debug.
Log(
"No valid selection '" + str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
9347 count = item.GetHeadHidingSelection().Count();
9348 for (i = 0; i < count; i++)
9350 str = item.GetHeadHidingSelection().Get(i);
9356 Debug.
Log(
"No valid selection '" + str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
9368 bool exception_hidden =
false;
9380 for (i = 0; i < count; i++)
9385 for (i = 0; i < count; i++)
9399 exception_hidden =
true;
9405 if (exception_hidden)
9417 for (
int i = 0; i < translatedSelectinosArray.Count(); i++)
9419 index = translatedSelectinosArray.Get(i);
9472 Error(
"AddActiveNV | illegal server-side call!");
9487 Error(
"RemoveActiveNV | illegal server-side call!");
9505 string text = super.GetDebugText();
9524 void DEBUGRotateNVG()
9528 if (FindAttachmentBySlotName(
"Eyewear"))
9530 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Eyewear").FindAttachmentBySlotName(
"NVG"));
9532 else if (FindAttachmentBySlotName(
"Headgear"))
9534 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Headgear").FindAttachmentBySlotName(
"NVG"));
9539 nvg.RotateGoggles(nvg.m_IsLowered);
9548 if (slot_name ==
"Headgear")
9550 item.SetSimpleHiddenSelectionState(0,1);
9551 item.SetSimpleHiddenSelectionState(1,0);
9553 else if (slot_name ==
"Mask")
9555 item.SetSimpleHiddenSelectionState(0,0);
9556 item.SetSimpleHiddenSelectionState(1,1);
9565 if (slot_name ==
"Headgear")
9567 item.SetSimpleHiddenSelectionState(0,1);
9568 item.SetSimpleHiddenSelectionState(1,0);
9570 else if (slot_name ==
"Mask")
9572 item.SetSimpleHiddenSelectionState(0,0);
9573 item.SetSimpleHiddenSelectionState(1,1);
9582 if (slot_name ==
"Headgear")
9584 item.SetSimpleHiddenSelectionState(0,1);
9585 item.SetSimpleHiddenSelectionState(1,0);
9587 else if (slot_name ==
"Mask")
9589 item.SetSimpleHiddenSelectionState(0,0);
9590 item.SetSimpleHiddenSelectionState(1,1);
9612 int nBodyparts = bodyparts.Count();
9613 for (
int i = 0; i < nBodyparts; ++i)
9621 path =
"cfgVehicles " + bodypart.GetType();
9622 idx = bodypart.GetHiddenSelectionIndex(
"personality");
9630 path =
"cfgVehicles " + item.GetType();
9631 idx = item.GetHiddenSelectionIndex(
"personality");
9698 int idx = GetHiddenSelectionIndex(
"decay_preload");
9764 legZones.Insert(
"LeftLeg");
9765 legZones.Insert(
"RightLeg");
9766 legZones.Insert(
"RightFoot");
9767 legZones.Insert(
"LeftFoot");
9769 foreach (
string legZone : legZones)
9770 DecreaseHealth(legZone,
"", inputDmg);
9778 if (!hide && ((!IsSwimming() && !IsClimbingLadder() && !IsInVehicle() && !
AnimCommandCheck(HumanMoveCommandID.CommandSwim | HumanMoveCommandID.CommandLadder | HumanMoveCommandID.CommandVehicle)) || force))
9781 GetItemAccessor().HideItemInHands(
false);
9786 GetItemAccessor().HideItemInHands(
true);
9794 if (target.GetInventory().FindFreeLocationFor(item, flags, il))
9804 float stackableTarget = item.GetTargetQuantityMax(slotID);
9805 if (stackableTarget > 0 && stackableTarget < item.GetQuantity())
9808 if (CastTo(itemB, item))
9810 itemB.SplitIntoStackMaxToInventoryLocationClient(il);
9825 return super.TakeEntityToInventoryImpl(mode, flags, item);
9836 super.TakeEntityToHandsImpl(mode, item);
9847 return super.TakeEntityToTargetInventoryImpl(mode, target, flags, item);
9858 return super.TakeEntityToTargetCargoImpl(mode, target, item);
9869 return super.TakeEntityToTargetAttachmentImpl(mode, target, item);
9880 return super.TakeToDstImpl(mode, src, dst);
9894 float playerSpeed = GetCommand_Move().GetCurrentMovementSpeed();
9900 float particleLifetime = 5.25;
9901 float particleSpeed = 0.25;
9902 if (playerSpeed >= 1)
9904 particleLifetime = 3.5;
9905 particleSpeed = 3.25;
9907 if (playerSpeed >= 2)
9909 particleLifetime = 2.5;
9910 particleSpeed = 5.25;
9912 if (playerSpeed >= 3)
9914 particleLifetime = 1.5;
9915 particleSpeed = 8.25;
9924 GetTransform(transform);
9932 if (!IsControlledPlayer())
9960 int pivot = componentIndex;
9976 vector parentTransMat[4];
9979 arrow.GetTransform(arrowTransMat);
9983 GetTransformWS(parentTransMat);
9990 parentTransMat[0] = rotMatrix[0];
9991 parentTransMat[1] = rotMatrix[1];
9992 parentTransMat[2] = rotMatrix[2];
9993 parentTransMat[3] = closeBonePosWS;
9998 arrow.SetTransform(arrowTransMat);
10005 if (bleedingManager)
10007 if (!bleedingManager.AttemptAddBleedingSourceBySelection(compName))
10008 bleedingManager.AttemptAddBleedingSourceBySelection(
"Pelvis");
10030 super.OnFreezeStateChangeClient();
10081 consumeData.
m_Type = consume_type;
10108 [
Obsolete(
"use the GetUndergroundHandler instead")]
10121 [
Obsolete(
"not used but kept in the case of modders needing/using it")]
10127 [
Obsolete(
"1.30: Not used but kept in the case of modders needing/using it")]
10133 [
Obsolete(
"1.30: 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()
bool CanBePerformedWhileChangingStance()
Condition used in PlayerBase::CanChangeStance to check if stance can be changed while action is perfo...
ActionBuildPart ActionContinuousBase ActionBuildPartHandsGeneric()
void ActionDrinkPondContinuous()
ActionEatSnowContinuousCB ActionContinuousBaseCB ActionEatSnowContinuous()
void ActionManagerBase(PlayerBase player)
map< typename, ref array< ActionBase_Basic > > TInputActionMap
ActionStartCarCB ActionContinuousBaseCB ActionStartEngine()
ActionStartEngineBoatCB ActionContinuousBaseCB ActionStartEngineBoat()
ActionStartEngineMotorbikeCB ActionContinuousBaseCB ActionStartEngineMotorbike()
void ActionTarget(Object object, Object parent, int componentIndex, vector cursorHitPos, float utility, string surfaceName="")
ActionUncoverHeadBase ActionContinuousBase ActionUncoverHeadSelf()
ActionWashHandsSnowCB ActionContinuousBaseCB ActionWashHandsSnow()
ActionWashHandsWaterCB ActionContinuousBaseCB ActionWashHandsWater()
ActionWashHeadWaterCB ActionContinuousBaseCB ActionWashHeadWater()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
override ArrowManagerBase GetArrowManager()
const int BREATH_VAPOUR_LEVEL_MAX
void EffectRadial(Param param1, Param param2)
const int ECE_EQUIP_ATTACHMENTS
const int ECE_PLACE_ON_SURFACE
const int ECE_IN_INVENTORY
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
bool OnStoreLoad(ParamsReadContext ctx, int version)
DamageType
exposed from C++ (do not change)
proto native void SetAnimationInstanceByName(string animation_instance_name, int instance_uuid, float duration)
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)
ref InventoryLocation m_HandInventoryLocation
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
bool IsProcessing()
returns true when FP is heating or cooling
proto GizmoApi GetGizmoApi()
override int GetCurrentStateID()
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)
EntityAI SpawnItemOnLocation(string object_name, notnull InventoryLocation loc, bool full_quantity)
static string GetDisplayName(int liquid_type)
void MapNavigationBehaviour(PlayerBase pPlayer, EMapNavigationType pNavigationType=EMapNavigationType.BASIC)
void ModifiersManager(PlayerBase player)
MotorbikeOwnerState TransportOwnerState GetOwnerStateType()
Native class for motorbikes - handles physics simulation.
override event GetMoveType()
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 SymptomManager(PlayerBase player)
void UndergroundHandlerClient(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.
static DustEffectManager GetDustEffectManager()
void Update(float deltaT)
void Init(PlayerBase player)
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 IsRagdoll()
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()
PlayerStat< float > m_StatDiet
bool m_StartedSurrenderTransition
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)
void RestartAllMovement()
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 OnStartTransitionToSurrender()
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< int > m_StatWet
PlayerStat< float > m_StatHeatComfort
ref PlayerAgentPool m_AgentPool
void QueueRemoveEffectWidget(array< int > effects)
bool m_LiquidTendencyDrain
EPulseType GetPulseType()
override bool IsSurrendered()
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
ref ThermalBiasHandler m_ThermalBiasHandler
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()
void OnStartTransitionFromSurrender(bool changeStance=true)
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)
void OnFinishTransitionFromSurrender()
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
ThermalBiasHandler GetThermalBiasHandler()
float m_UnconsciousEndTime
override EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
PlayerStomach GetStomach()
ref PlayerStomach m_PlayerStomach
void OnQuickbarSetEntityRequest(ParamsReadContext ctx)
PlayerStat< float > m_StatHeatBuffer
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()
EUndergroundPresence GetUndergroundPresence()
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()
PlayerStat< float > m_StatSpecialty
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 float m_SurrenderAnimationTransitionTime
ScriptInvoker GetOnPlayerLoadChanged()
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()
ref ScriptInvoker m_OnPlayerLoadChanged
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)
float m_SurrenderTransitionTimer
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)
void OnFinishTransitionToSurrender()
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()
PlayerStat< float > m_StatStamina
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 SetSurrenderState(bool newState)
void NotifyPlayerLoadChanged()
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()
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 CheckShouldCancelSurrender()
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
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()
PlayerStat< int > m_StatBloodType
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 AdjustKeffiyeh(EntityAI item, string slot_name)
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 CheckConnectedPlayers()
void CleanupDisconnectedPlayer(string playerId)
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 float SyncedValue_ID(int action, bool check_focus=true)
Get action state.
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.
void Keffiyeh_ColorBase()
Keffiyeh_LightBlue SetActions
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.
Obsolete Managed PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
class array< Class T > TStringArray
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 bool IsInRangeInt(int v, int min, int max)
Returns if value is between min and max (inclusive)
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.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from 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, bool pChangeAnimationInstance=true)
signalization from script to engine that item in hands changed