6#ifdef FEATURE_NETWORK_RECONCILIATION
7class PlayerBaseOwnerState : DayZPlayerImplementOwnerState
9 protected override event void Write(PawnStateWriter ctx)
14 protected override event void Read(PawnStateReader ctx)
20class PlayerBaseMove : DayZPlayerImplementMove
24 float m_fStaminaValue;
25 float m_fStaminaCapacity;
26 float m_fStaminaDepletion;
28 bool m_bStaminaSynced;
29 float m_fStaminaSyncedValue;
30 float m_fStaminaSyncedCapacity;
32 protected void PlayerBaseMove()
34 m_bStaminaSynced =
false;
37 protected override event void Write(PawnMoveWriter ctx, PawnMove prev)
39 super.Write(ctx, prev);
42 protected override event void Read(PawnMoveReader ctx, PawnMove prev)
44 super.Read(ctx, prev);
225 #ifdef DIAG_DEVELOPER
226 int m_IsInsideTrigger;
227 bool m_CanBeTargetedDebug;
229 bool m_PresetSpawned;
230 ref CameraToolsMenuClient m_CameraToolsMenuClient;
231 protected PluginTargetTemperature m_TargetTemperatureDiag;
238 #ifdef DIAG_DEVELOPER
374 m_PlayerSelected =
false;
401 #ifdef DIAG_DEVELOPER
402 m_CanBeTargetedDebug =
true;
441 if (!
g_Game.IsDedicatedServer())
466 PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(
GetPlugin(PluginConfigDebugProfileFixed));
468 PluginDeveloper m_Developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
475 if (player && default_preset !=
"")
478 m_ConfigDebugProfileFixed.GetPresetItems(default_preset, preset_array);
480 bool is_preset_fixed =
true;
481 if (preset_array.Count() == 0)
484 is_preset_fixed =
false;
487 if (preset_array.Count() > 0)
489 m_Developer.ClearInventory(player);
491 for (
int i = 0; i < preset_array.Count(); i++)
497 health = m_ConfigDebugProfileFixed.GetItemHealth(default_preset, i);
498 quantity = m_ConfigDebugProfileFixed.GetItemQuantity(default_preset, i);
505 m_Developer.SpawnEntityInPlayerInventory(player, preset_array.Get(i), health, quantity);
552 RegisterNetSyncVariableInt(
"m_LifeSpanState", LifeSpanState.BEARD_NONE, LifeSpanState.COUNT);
553 RegisterNetSyncVariableInt(
"m_BloodType", 0, 128);
556 RegisterNetSyncVariableInt(
"m_SoundEventParam", 0, ((EPlayerSoundEventParam.ENUM_COUNT - 1) * 2) - 1);
557 RegisterNetSyncVariableInt(
"m_StaminaState",0, eStaminaState.COUNT - 1);
558 RegisterNetSyncVariableInt(
"m_BleedingBits");
562 RegisterNetSyncVariableInt(
"m_MixedSoundStates", 0,
eMixedSoundStates.COUNT - 1);
564 RegisterNetSyncVariableInt(
"m_RefreshAnimStateIdx",0,3);
565 RegisterNetSyncVariableInt(
"m_BrokenLegState", -
eBrokenLegs.BROKEN_LEGS_SPLINT,
eBrokenLegs.BROKEN_LEGS_SPLINT);
566 RegisterNetSyncVariableInt(
"m_SyncedModifiers", 0, ((
eModifierSyncIDs.LAST_INDEX - 1) * 2) - 1);
567 RegisterNetSyncVariableInt(
"m_HasBloodyHandsVisible", 0,
eBloodyHandsTypes.LAST_INDEX - 1);
568 RegisterNetSyncVariableInt(
"m_ActionSoundCategoryHash");
569 RegisterNetSyncVariableInt(
"m_PerformedAnimActionID", -1, 2048);
570 RegisterNetSyncVariableInt(
"m_ActivePrimarySymptomID", 0, SymptomIDs.LAST_INDEX);
573 RegisterNetSyncVariableFloat(
"m_HeatBufferDynamicMax", 0.0, 1.0, 2);
575 RegisterNetSyncVariableBool(
"m_IsUnconscious");
576 RegisterNetSyncVariableBool(
"m_IsRestrained");
577 RegisterNetSyncVariableBool(
"m_IsInWater");
578 RegisterNetSyncVariableBool(
"m_InsideEffectArea");
580 RegisterNetSyncVariableBool(
"m_HasBloodTypeVisible");
581 RegisterNetSyncVariableBool(
"m_IsRestrainStarted");
582 RegisterNetSyncVariableBool(
"m_IsRestrainPrelocked");
583 RegisterNetSyncVariableBool(
"m_HasHeatBuffer");
584 RegisterNetSyncVariableBool(
"m_IsInColdArea");
586 RegisterNetSyncVariableFloat(
"m_CurrentShock");
621 if(itemInHands.m_LightSourceItem && itemInHands.m_LightSourceItem.GetCompEM())
623 if(state && itemInHands.m_LightSourceItem.GetCompEM().GetPreviousSwitchState())
624 itemInHands.m_LightSourceItem.GetCompEM().SwitchOn();
626 itemInHands.m_LightSourceItem.GetCompEM().SwitchOff();
631 else if(itemInHands.GetCompEM())
633 if(state && itemInHands.GetCompEM().GetPreviousSwitchState())
634 itemInHands.GetCompEM().SwitchOn();
636 itemInHands.GetCompEM().SwitchOff();
642#ifdef FEATURE_NETWORK_RECONCILIATION
643 protected override event typename GetOwnerStateType()
645 return PlayerBaseOwnerState;
648 protected override event typename GetMoveType()
650 return PlayerBaseMove;
653 protected override event void ObtainMove( PawnMove pMove)
655 super.ObtainMove(pMove);
657 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
658 GetStaminaHandler().ObtainMove(move);
661 protected override event bool ReplayMove(PawnMove pMove)
663 if (!super.ReplayMove(pMove))
666 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
667 GetStaminaHandler().ReplayMove(move);
668 UpdateMovementInertia();
673 protected override event void ObtainState( PawnOwnerState pState)
675 super.ObtainState(pState);
677 PlayerBaseOwnerState state = PlayerBaseOwnerState.Cast(pState);
679 GetStaminaHandler().ObtainState(state);
682 protected override event void RewindState(PawnOwnerState pState, PawnMove pMove, inout NetworkRewindType pRewindType)
684 super.RewindState(pState, pMove, pRewindType);
686 PlayerBaseOwnerState state = PlayerBaseOwnerState.Cast(pState);
687 PlayerBaseMove move = PlayerBaseMove.Cast(pMove);
688 GetStaminaHandler().RewindState(state, move);
732 m_ActionSoundCategoryHash = hash;
887 if (waterLevel > 0.5)
890 timeSpent += timeSlice;
904 timeSpent += timeSlice;
952 EntityAI item_EAI = this.GetInventory().FindAttachment(slot_id);
955 if (item_EAI && !item_IB)
957 string str =
"Warning! GetItemOnSlot() >> found item on slot " + slot_type +
" can't be cast to ItemBase! Found item is " + item_EAI.GetType() +
" and the player is " +
GetType() +
"!";
981 if (GetInventory().HasInventoryReservation(item, null))
988 if (GetEntityInHands() == item)
1007 int bit_mask_remove = ~state;
1202 g_Game.EnableVoN(
this,
false);
1203 if (!
g_Game.IsDedicatedServer())
1217 g_Game.GetMission().SyncRespawnModeInfo(GetIdentity());
1221 super.EEKilled(killer);
1226 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
1233 if (damageResult != null && damageResult.
GetDamage(dmgZone,
"Shock") > 0)
1239 if (
g_Game.ConfigIsExisting(
"cfgAmmo " + ammo +
" unconRefillModifier"))
1251 if (damageType ==
DamageType.EXPLOSION && ammo ==
"FlashGrenade_Ammo")
1260 float dmg = damageResult.
GetDamage(dmgZone,
"Blood");
1265 #ifdef DIAG_DEVELOPER
1267 Print(
"EEHitBy() | " +
GetDisplayName() +
" hit by " + source.GetDisplayName() +
" to " + dmgZone);
1269 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
1270 if (plugin_remote_server)
1272 plugin_remote_server.OnDamageEvent(
this, damageResult);
1276 if (
g_Game.IsDebugMonitor())
1282 int transferShockToDamageCoef =
g_Game.ConfigGetInt(
string.Format(
"%1 %2 DamageApplied transferShockToDamage",
CFG_AMMO, ammo));
1283 if (transferShockToDamageCoef == 1)
1287 if (dmgZone !=
"Head")
1288 AddHealth(dmgZone,
"Health", -damageResult.
GetDamage(dmgZone,
"Shock"));
1293 if (GetHealth(
"RightLeg",
"Health") <= 1 || GetHealth(
"LeftLeg",
"Health") <= 1 || GetHealth(
"RightFoot",
"Health") <= 1 || GetHealth(
"LeftFoot",
"Health") <= 1)
1302 if (ammo ==
"Bullet_CupidsBolt" && IsAlive())
1304 DamageSystem.ResetAllZones(
this);
1346 g_Game.GetAnalyticsServer().OnEntityHit(source,
this);
1351 super.EEHitByRemote(damageType, source,
component, dmgZone, ammo, modelPos);
1353 if (m_MeleeFightLogic.IsInBlock())
1374 return super.ConvertNonlethalDamage(damage, damageType);
1384 float shakeStrength =
Math.
InverseLerp(0, 500, hitData.m_InSpeed.Length());
1389 if (hitData.m_AmmoType ==
"Bullet_CupidsBolt")
1390 Ammo_CupidsBolt.PlayOnHitParticle(hitData.m_Position);
1397 if (m_MeleeFightLogic.IsInBlock())
1449 return GetSelectionPositionMS(pSelection);
1466 super.EEItemAttached(item, slot_name);
1470 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1471 item.SwitchItemSelectionTextureEx(EItemManipulationContext.ATTACHING, p);
1478 g_Game.GetAnalyticsClient().OnItemAttachedAtPlayer(item, slot_name);
1482 if (!
g_Game.IsDedicatedServer())
1484 if (clothing.GetEffectWidgetTypes())
1489 if (clothing.GetGlassesEffectID() > -1)
1497 else if (
g_Game.IsServer())
1499 if (clothing.IsGasMask())
1505 clothing.UpdateNVGStatus(
this,
true);
1514 super.EEItemDetached(item, slot_name);
1517 item.SwitchItemSelectionTextureEx(EItemManipulationContext.DETACHING);
1527 if (!
g_Game.IsDedicatedServer())
1529 if (clothing.GetEffectWidgetTypes())
1534 if (clothing.GetGlassesEffectID() > -1)
1542 if (clothing.IsGasMask())
1548 clothing.UpdateNVGStatus(
this,
false,
true);
1556 string slot = slot_name;
1558 boo = item.IsWeapon();
1560 if (slot ==
"Melee")
1565 else if (slot ==
"Shoulder")
1574 super.SwitchItemSelectionTexture(item,slot_name);
1577 EntityAI armband = FindAttachmentBySlotName(
"Armband");
1578 if (slot_name ==
"Body" && armband)
1580 Param1<PlayerBase> p =
new Param1<PlayerBase>(
this);
1581 armband.SwitchItemSelectionTextureEx(EItemManipulationContext.UPDATE,p);
1592 for (
int i = 0; i < itemsArray.Count(); i++)
1612 if (ConfigGetBool(
"woman") != 1)
1621 int voice_type = ConfigGetInt(
"voiceType");
1623 if (voice_type == 0)
1709 if (IsControlledPlayer())
1740 if (IsControlledPlayer())
1750 if (IsControlledPlayer())
1755 actions.InsertAll(bcActions);
1775 InputActionMap.Insert(ai, action_array);
1777 action_array.Insert(action);
1793 for (
int i = 0; i < action_array.Count(); i++)
1795 if (action == action_array.Get(i))
1797 action_array.Remove(i);
1801 InputActionMap.Insert(ai, action_array);
1803 action_array.Insert(action);
1859 if (gloves && gloves.GetHealthLevel() < 4)
1892 string surface;
int liquid;
1893 g_Game.SurfaceUnderObject(
this, surface, liquid);
1896 if (shoes && shoes.GetHealthLevel() < 4)
1908 if (pUserInt % 2 == 0)
1946 #ifdef DIAG_DEVELOPER
1947 void SetStaminaDisabled(
bool value)
2005 if (GetThrowing() && GetThrowing().IsThrowingModeEnabled())
2053 g_Game.GetMission().HideInventory();
2065 g_Game.GetMission().HideInventory();
2076 if (IsControlledPlayer())
2085 return super.CanReleaseAttachment(attachment);
2090 return super.CanReleaseCargo(cargo);
2095 return super.CanReceiveItemIntoCargo(item);
2100 return super.CanSwapItemInCargo(child_entity, new_entity);
2111 return super.CanReceiveItemIntoHands(item_to_hands);
2246 float add_health_coef = 0.33;
2250 AddHealth(
"LeftLeg",
"Health", (GetMaxHealth(
"LeftLeg",
"Health") - GetHealth(
"LeftLeg",
"Health") ) * add_health_coef );
2251 AddHealth(
"RightLeg",
"Health", (GetMaxHealth(
"RightLeg",
"Health") - GetHealth(
"RightLeg",
"Health")) * add_health_coef );
2252 AddHealth(
"RightFoot",
"Health", (GetMaxHealth(
"RightFoot",
"Health") - GetHealth(
"RightFoot",
"Health")) * add_health_coef );
2253 AddHealth(
"LeftFoot",
"Health", (GetMaxHealth(
"LeftFoot",
"Health") - GetHealth(
"LeftFoot",
"Health")) * add_health_coef );
2263 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2360 for (
int att = 0; att < attcount; ++att)
2363 if (attachment.IsItemBase())
2365 item_name = attachment.GetType();
2366 if (
g_Game.IsKindOf(item_name, searched_item))
2379 if (!
g_Game.IsMultiplayer() &&
g_Game.GetPlayer() &&
g_Game.GetPlayer().GetID() ==
this.GetID())
2381 PluginSceneManager scene_editor = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager));
2382 scene_editor.InitLoad();
2404 if (IsControlledPlayer())
2411 m_Hud.UpdateBloodName();
2413 g_Game.GetUIManager().CloseAll();
2414 mission.SetPlayerRespawning(
false);
2415 mission.OnPlayerRespawned(
this);
2417 m_Hud.ShowQuickbarUI(
true);
2418 m_Hud.UpdateQuickbarGlobalVisibility();
2419 m_Hud.InitHeatBufferUI(
this);
2420 m_Hud.OnPlayerLoaded();
2424 if (!
g_Game.IsDedicatedServer())
2431 m_CharactersHead = Head_Default.Cast(GetInventory().FindPlaceholderForSlot(slotId));
2441 wpn.DelayedValidateAndRepair();
2445 wpn.ValidateAndRepair();
2504 EntityAI entityInHands = GetEntityInHands();
2515 else if (entityInHands && entityInHands.HasEnergyManager())
2517 if (entityInHands.GetCompEM().IsPlugged())
2518 entityInHands.OnPlacementCancelled(
this);
2530 EntityAI entityInHands = GetEntityInHands();
2531 if (entityInHands && entityInHands.HasEnergyManager())
2533 if (entityInHands.GetCompEM().IsPlugged())
2534 entityInHands.OnPlacementCancelled(
this);
2578 if (IsControlledPlayer())
2580 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2591 if (IsControlledPlayer())
2593 PPERequester_Drowning req = PPERequester_Drowning.Cast(PPERequesterBank.GetRequester(PPERequesterBank.REQ_DROWNING));
2615 m_ProcessResetADS =
true;
2618 else if (!
g_Game.IsMultiplayer())
2632 m_ProcessResetADS =
false;
2654 foreach (
string t: disallowedUndergroundTypes)
2656 if (item.IsKindOf(t))
2808 if (!IsPlayerSelected() || !IsAlive())
2824 EntityAI heldEntity = GetEntityInHands();
2825 if (heldEntity && heldEntity.HasEnergyManager() && heldEntity.GetCompEM().IsPlugged())
2828 EntityAI placed_entity = heldEntity;
2831 placed_entity.GetCompEM().UpdatePlugState();
2839 if (!m_DeathSyncSent && m_KillerData)
2842 m_DeathSyncSent =
true;
2855 if (m_PlayerSoundEventHandler)
2856 m_PlayerSoundEventHandler.OnTick(delta_time);
2873 #ifdef DIAG_DEVELOPER
2876 m_WeaponDebug.OnCommandHandlerUpdate();
2889 if (m_ProcessResetADS)
2919 int currentTime =
g_Game.GetTime();
2920 float deltaT = (currentTime -
m_LastTick) * 0.001;
2932 super.EEItemIntoHands(item);
2936 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(item, {
Bolt_Base});
2941 w.ResetWeaponAnimState();
2947 GetMeleeFightLogic().SetBlock(
false);
2952 if (item.IsHeavyBehaviour() && IsRaised())
2961 SurrenderDummyItem dummyItem;
2971 super.EEItemOutOfHands(item);
2978 SurrenderDummyItem dummyItem;
2990 override void CommandHandler(
float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished)
2992 EvaluateDamageHit(pCurrentCommandID);
2995 super.CommandHandler(pDt,pCurrentCommandID,pCurrentCommandFinished);
2997 vector playerPosition = PhysicsGetPositionWS();
3098 HandleDamageHit(pCurrentCommandID);
3102 mngr.Update(pCurrentCommandID);
3107 if (!m_UnconsciousDebug)
3110 if (m_ShouldBeUnconscious && m_IsUnconscious)
3115 m_Swimming.m_bWasSwimming |= hcu.
IsInWater();
3118 if (m_Swimming.m_bWasSwimming)
3126 else if (m_ShouldBeUnconscious)
3135 m_IsUnconscious =
true;
3143 m_LastCommandBeforeUnconscious = pCurrentCommandID;
3151 m_TransportCache = null;
3155 m_JumpClimb.CheckAndFinishJump();
3156 StartCommand_Unconscious(0);
3157 SetFallYDiff(playerPosition[1]);
3161 else if (m_IsUnconscious)
3174 if (m_Swimming.m_bWasSwimming || m_LastCommandBeforeUnconscious ==
DayZPlayerConstants.COMMANDID_VEHICLE)
3177 hcu.
WakeUp(wakeUpStance);
3179 m_IsUnconscious =
false;
3188 m_IsUnconscious =
false;
3197 if (quickBarSlot && IsAlive())
3225 bool isSwimmingOrClimbing = GetCommand_Swim() || GetCommand_Climb() || GetCommand_Ladder();
3226 bool isStaminaLimitAppliable = hcm || isSwimmingOrClimbing;
3228 if (isStaminaLimitAppliable)
3237 if (!
g_Game.IsDedicatedServer())
3258 #ifdef DIAG_DEVELOPER
3260 m_Bot.OnUpdate(pDt);
3270 TryGetInVehicleDebug();
3277 void SetGetInVehicleDebug(
EntityAI ent)
3279 m_GetInVehicleTransportDebug =
Transport.Cast(ent);
3282 void TryGetInVehicleDebug()
3284 if (m_GetInVehicleTransportDebug)
3286 HumanCommandVehicle vehCommand = StartCommand_Vehicle(m_GetInVehicleTransportDebug, 0, 0);
3289 vehCommand.
SetVehicleType(m_GetInVehicleTransportDebug.GetAnimInstance());
3291 m_GetInVehicleTransportDebug = null;
3324 mission.RemoveActiveInputExcludes({
"map"});
3325 mission.RemoveActiveInputRestriction(EInputRestrictors.MAP);
3327 else if (!
g_Game.IsMultiplayer())
3334 m_hac.InternalCommand(command_ID);
3340 if (!
g_Game.IsDedicatedServer())
3348 m_Hud.ShowQuickbarPlayer(
true);
3351 mission.RemoveActiveInputExcludes({
"map"});
3352 mission.RemoveActiveInputRestriction(EInputRestrictors.MAP);
3389 if (
GetUApi().GetInputByID(UADefaultAction).LocalPress() ||
GetUApi().GetInputByID(UAUIMenu).LocalPress() ||
GetUApi().GetInputByID(UAGear).LocalPress())
3458 if (super.IsLanded(pCurrentCommandID))
3466 bool wasFalling = m_IsUnconsciousFalling;
3467 m_IsUnconsciousFalling = PhysicsIsFalling(
false);
3468 return wasFalling && !m_IsUnconsciousFalling;
3478 if (super.OnLand(pCurrentCommandID, fallDamageData))
3491 if (super.IsAlreadyInFallingCommand(pCurrentCommandID))
3509 g_Game.GetMission().GetHud().ShowHudUI(
false);
3513 EntityAI entity_in_hands = GetEntityInHands();
3519 g_Game.GetSoundScene().SetSoundVolume(0,2);
3529 if (m_TransportCache)
3530 m_TransportCache.MarkCrewMemberUnconscious(m_TransportCache.CrewMemberIndex(
this));
3534 g_Game.EnableVoN(
this,
false);
3542 if (GetMeleeFightLogic())
3544 GetMeleeFightLogic().SetBlock(
false);
3548 SetMasterAttenuation(
"UnconsciousAttenuation");
3566 g_Game.GetSoundScene().SetSoundVolume(
g_Game.m_volume_sound,1);
3567 PPERequester_UnconEffects requester = PPERequester_UnconEffects.Cast(PPERequesterBank.GetRequester(PPERequester_UnconEffects));
3568 requester.FadeOutEffect();
3587 g_Game.EnableVoN(
this,
true);
3595 SetMasterAttenuation(
"");
3616 PluginAdminLog adm = PluginAdminLog.Cast(
GetPlugin(PluginAdminLog));
3617 adm.PlayerKilledByDrowningUncon(
this);
3619 SetHealth(
"",
"",-100);
3624 g_Game.GetMission().GetHud().ShowQuickbarUI(
false);
3630 float sin_normalized = (sin + 1) / 2;
3631 if (sin_normalized < 0.05)
3637 PPERequesterBank.GetRequester(PPERequester_UnconEffects).Start(
m_UnconParam);
3661 return m_IsUnconscious;
3666 #ifdef DIAG_DEVELOPER
3667 if (!m_CanBeTargetedDebug)
3673 return super.CanBeTargetedByAI(ai) && !
IsUnconscious() && !IsInVehicle();
3678 AddHealth(
"",
"Shock",shock);
3685 g_Game.GetMission().RemoveActiveInputExcludes({
"inventory"},
true);
3686 g_Game.GetMission().RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
3778 if (attachment && attachment.GetType() ==
"Splint_Applied")
3780 attachment.Delete();
3800 hcm = GetCommand_Move();
3809 m_JumpClimb.CheckAndFinishJump();
3818 float avgLegHealth = GetHealth(
"RightLeg",
"") + GetHealth(
"LeftLeg",
"") + GetHealth(
"RightFoot",
"") + GetHealth(
"LeftFoot",
"");
3819 avgLegHealth *= 0.25;
3825 PhysicsGetVelocity(v);
3834 if (IsClimbingLadder())
3862 void MovingShock(
float legHealth,
float highShock,
float midShock,
float lowShock)
3883 Param1<float> damage =
new Param1<float>(0);
3884 damage.param1 = dmg;
3885 g_Game.RPCSingleParam(
this,
ERPCs.RPC_SHOCK, damage,
true, GetIdentity());
3894 return super.CanPickupHeavyItem(item);
3900 SetHealth(
"RightLeg",
"", 0);
3901 SetHealth(
"RightFoot",
"", 0);
3902 SetHealth(
"LeftLeg",
"", 0);
3903 SetHealth(
"LeftFoot",
"", 0);
3909 if (itemInHands && itemInHands.IsHeavyBehaviour())
3917 if (attachment && attachment.GetType() ==
"Splint_Applied")
3932 if (itemInHands.IsHeavyBehaviour())
3936 ServerDropEntity(itemInHands);
3943 itemInHands.OnItemInHandsPlayerSwimStart(
this);
3958 g_Game.GetMission().AddActiveInputExcludes({
"swimming"});
3973 g_Game.GetMission().RemoveActiveInputExcludes({
"swimming"});
3987 g_Game.GetMission().AddActiveInputExcludes({
"ladderclimbing"});
3998 g_Game.GetMission().RemoveActiveInputExcludes({
"ladderclimbing"});
4023 m_JumpClimb.CheckAndFinishJump();
4072 EntityAI itemOnHead = FindAttachmentBySlotName(
"Headgear");
4074 if (itemInHand && itemInHand.GetCompEM())
4075 itemInHand.GetCompEM().SwitchOff();
4079 if (itemOnHead && itemOnHead.GetCompEM())
4080 itemOnHead.GetCompEM().SwitchOff();
4082 g_Game.GetMission().AddActiveInputExcludes({
"vehicledriving"});
4091 if (!m_ShouldBeUnconscious)
4094 g_Game.GetMission().RemoveActiveInputExcludes({
"vehicledriving"});
4123 super.OnCommandDeathStart();
4158 return ((1 << stance) & stanceMask) != 0;
4186 if (GetThrowing().IsThrowingInProgress() || GetThrowing().IsThrowingAnimationPlaying())
4192 if (
Math.
AbsInt(previousStance - newStance) == 3)
4263 g_Game.SurfaceUnderObject(
this, surfaceType, liquidType);
4274 m_Hud.ShowVehicleInfo();
4276#ifdef FEATURE_NETWORK_RECONCILIATION
4283 identity.Possess(pawn);
4290#ifdef FEATURE_NETWORK_RECONCILIATION
4294 if (identity && !m_ShouldBeUnconscious)
4297 identity.Possess(
this);
4303 m_Hud.HideVehicleInfo();
4308 if (change_to_enabled)
4339 int currentTime =
g_Game.GetTime();
4387 #ifdef DIAG_DEVELOPER
4388 DiagOnPostFrame(other, extra);
4392#ifdef DIAG_DEVELOPER
4393 protected void DiagOnPostFrame(
IEntity other,
int extra)
4399 m_WeaponDebug.OnPostFrameUpdate();
4402 if (GetBleedingManagerRemote())
4404 GetBleedingManagerRemote().OnUpdate();
4411 m_MeleeDebug =
true;
4414 else if (!DiagMenu.GetBool(
DiagMenuIDs.MELEE_DEBUG) && m_MeleeDebug)
4416 m_MeleeDebug =
false;
4421 if (DiagMenu.GetBool(
DiagMenuIDs.SOUNDS_ITEM_IMPACT_SOUNDS))
4422 InventoryItem.DrawImpacts();
4426 PluginDrawCheckerboard drawCheckerboard = PluginDrawCheckerboard.Cast(
GetPluginManager().GetPluginByType(PluginDrawCheckerboard));
4427 if (drawCheckerboard && !drawCheckerboard.IsActive())
4429 drawCheckerboard.ShowWidgets(DiagMenu.GetBool(
DiagMenuIDs.MISC_DRAW_CHECKERBOARD));
4433 if (m_PresenceNotifier)
4435 m_PresenceNotifier.EnableDebug(DiagMenu.GetBool(
DiagMenuIDs.MISC_PRESENCE_NOTIFIER_DBG));
4438 if (m_TargetTemperatureDiag)
4440 m_TargetTemperatureDiag.ShowDebug(DiagMenu.GetBool(
DiagMenuIDs.MISC_TARGET_TEMPERATURE));
4443 if (DiagMenu.GetBool(
DiagMenuIDs.TRIGGER_PLAYER_DEBUG))
4446 GetCollisionBox(minmax);
4449 if (m_IsInsideTrigger)
4456 dbgShape.CreateMatrix(mat);
4457 dbgShape.SetMatrix(mat);
4461 if (m_Environment && m_Environment.m_Debug)
4464 EnvDebugData envDebugData = m_Environment.GetEnvDebugData();
4465 g_Game.RPCSingleParam(
this,
ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG_DATA, envDebugData,
false, GetIdentity());
4467 m_Environment.ShowEnvDebugPlayerInfo(DiagMenu.GetBool(
DiagMenuIDs.MISC_ENVIRONMENT_DEBUG));
4471 if (m_FallDamage && m_FallDamage.m_Debug)
4474 FallDamageDebugData fallDamageDebugData = m_FallDamage.GetFallDamageDebugData();
4475 g_Game.RPCSingleParam(
this,
ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG_DATA, fallDamageDebugData,
false, GetIdentity());
4477 m_FallDamage.ShowFallDamageDebugInfo(DiagMenu.GetBool(
DiagMenuIDs.MISC_FALLDAMAGE_DEBUG));
4482 override void OnEnterTrigger(ScriptedEntity trigger)
4484 super.OnEnterTrigger(trigger);
4486 ++m_IsInsideTrigger;
4489 override void OnLeaveTrigger(ScriptedEntity trigger)
4491 super.OnLeaveTrigger(trigger);
4493 --m_IsInsideTrigger;
4500 m_Hud.SetStaminaBarVisibility(show);
4535 override bool CanClimb(
int climbType, SHumanCommandClimbResult climbRes)
4553 return super.CanClimb(climbType,climbRes);
4575 return super.CanJump();
4580 return m_JumpClimb.m_bIsJumpInProgress;
4586 temp =
g_Game.GetMission().GetActiveRefresherLocations();
4587 int count = temp.Count();
4590 vector pos = target.GetPosition();
4591 for (
int i = 0; i < count; i++)
4620 GetItemAccessor().OnItemInHandsChanged(
true);
4621 GetItemAccessor().ResetWeaponInHands();
4635 vector pdir = GetDirection();
4660 if (GetThrowing().IsThrowingModeEnabled() || GetThrowing().IsThrowingAnimationPlaying())
4684 if (!quickBarEntity)
4693 EntityAI inHandEntity = GetEntityInHands();
4695 if (!GetDayZPlayerInventory().
IsIdle())
4699 handInventoryLocation.
SetHands(
this,quickBarEntity);
4703 if (inHandEntity == quickBarEntity)
4705 if (GetHumanInventory().CanRemoveEntityInHands())
4708 PredictiveMoveItemFromHandsToInventory();
4714 quickBarEntity.GetInventory().GetCurrentInventoryLocation(invLocQBItem);
4722 int index = GetHumanInventory().FindUserReservedLocationIndex(inHandEntity);
4724 GetHumanInventory().GetUserReservedLocation(index, inHandEntityFSwapDst);
4754 if (GetInventory().IsInventoryLocked())
4766 if (itemInHands != quickBarItem)
4776 if (IsRaised() || GetCommand_Melee())
4844 EntityAI entity_in_hands = GetEntityInHands();
4866 mngr_client.Interrupt();
4868 else if (GetEntityInHands()!= magazine)
4906 int last_ammo_magazine_count;
4907 int ammo_magazine_count;
4910 int last_ammo_pile_count;
4911 int ammo_pile_count;
4916 for (
int att_i = 0; att_i < nAttachment; ++att_i)
4919 ref
CargoBase attachment_cargo = attachment.GetInventory().GetCargo();
4921 if (attachment_cargo)
4923 int nAttachmentCargoItem = attachment_cargo.GetItemCount();
4924 for (
int cgo_i = 0; cgo_i < nAttachmentCargoItem; ++cgo_i)
4926 EntityAI cargo_item = attachment_cargo.GetItem(cgo_i);
4929 if (cargo_item.IsMagazine())
4931 Magazine magazine = Magazine.Cast(cargo_item);
4932 ammo_pile_count = magazine.GetAmmoCount();
4937 if (ammo_pile_count > 0)
4939 if (last_ammo_magazine_count == 0)
4941 ammo_magazine = magazine;
4942 last_ammo_magazine_count = ammo_pile_count;
4946 if (last_ammo_magazine_count < ammo_pile_count)
4948 ammo_magazine = magazine;
4949 last_ammo_magazine_count = ammo_pile_count;
4955 else if (weapon_manager.
CanLoadBullet(weapon_base, magazine))
4957 if (ammo_pile_count > 0)
4959 if (last_ammo_pile_count == 0)
4961 ammo_pile = magazine;
4962 last_ammo_pile_count = ammo_pile_count;
4966 if (last_ammo_pile_count > ammo_pile_count)
4968 ammo_pile = magazine;
4969 last_ammo_pile_count = ammo_pile_count;
4982 return ammo_magazine;
4995 g_Game.GetMission().AddDummyPlayerToScheduler(
this);
4999#ifdef DIAG_DEVELOPER
5002 m_Bot =
new Bot(
this);
5034 override SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
false)
5041 return GetWeightEx();
5068 return GetInventory().HasEntityInInventory(entity);
5073 if (
g_Game.IsMultiplayer())
5089 bool i_owned = GetHumanInventory().HasEntityInInventory(item);
5091 bool cp_owned =
false;
5093 cp_owned = GetHumanInventory().HasEntityInInventory(currParent);
5095 bool np_owned =
false;
5097 np_owned = GetHumanInventory().HasEntityInInventory(newParent);
5099 bool all_owned = i_owned && cp_owned && (np_owned || (newParent == null));
5104 Error(
"[syncinv] unsupported instance type t=" + t);
5114 float totalWeight = super.GetWeightSpecialized(forceRecalc);
5119 totalWeight += itemHands.GetWeightEx(forceRecalc);
5122 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
5124 float itemInHandsWeight = totalWeight - super.GetWeightSpecialized(forceRecalc);
5126 dta.
SetCalcDetails(
"TMan: " + (super.GetWeightSpecialized(forceRecalc)+ itemInHandsWeight) +
"(contents weight[includes item in hands])");
5134 const int VISIBILITY_SLOTS_COUNT = 10;
5136 int attcount = GetInventory().AttachmentCount();
5137 float sumVisibility = 0;
5138 float countVisibility = 0;
5139 float visibilityMean = 0;
5143 for (
int att = 0; att < attcount; att++)
5145 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
5146 if (attachment.IsClothing())
5150 sumVisibility += clothing.GetItemVisibility();
5155 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
5184 float health = GetHealth(
"",
"");
5196 float blood = GetHealth(
"",
"Blood");
5224 float immmunity_max = 1;
5231 float health = GetHealth(
"",
"");
5232 float health_max = GetMaxHealth(
"",
"");
5245 float blood = GetHealth(
"",
"Blood");
5246 float blood_max = GetMaxHealth(
"",
"Blood");
5268 if (stat_value <= critical)
5272 if (stat_value <= low)
5276 if (stat_value <= normal)
5280 if (stat_value <= high)
5289 if (stat_value <= critical)
5293 if (stat_value <= low)
5297 if (stat_value <= normal)
5301 if (stat_value <= high)
5321 float max_health = GetMaxHealth(
"GlobalHealth",
"Health") + 0.01;
5322 float max_blood = GetMaxHealth(
"GlobalHealth",
"Blood") + 0.01;
5325 float health_normalized = GetHealth(
"GlobalHealth",
"Health") / max_health;
5326 float blood_normalized = GetHealth(
"GlobalHealth",
"Blood") / max_blood;
5327 immunity = energy_normalized + water_normalized + health_normalized + blood_normalized;
5328 immunity = immunity / 4;
5342 if (IsRaised() || (item && item.IsHeavyBehaviour()))
5348 if (item && GetThrowing() && GetThrowing().IsThrowingModeEnabled())
5374 return GetCommand_Move() && GetCommand_Move().IsInRoll();
5412 if (!m_FightEndBlendTimer)
5413 m_FightEndBlendTimer =
new Timer();
5414 if (!m_FightEndBlendTimer.IsRunning())
5429 if (item && item.GetHierarchyParent() && item.GetHierarchyParent().IsWeapon() && item.IsRuined())
5450 super.RPC(rpc_type, params, guaranteed, recipient);
5456 super.OnRPC(sender, rpc_type, ctx);
5462 case ERPCs.RPC_PLAYER_STAT:
5467 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5474 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5481 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5488 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5493 case ERPCs.RPC_USER_ACTION_MESSAGE:
5505 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5506 ref Param1<float> p_synch =
new Param1<float>(0);
5508 float specialty_level = p_synch.param1;
5512 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5513 ref Param5<float, float, float, float, bool> p_debug_synch =
new Param5<float, float ,float, float, bool>(0, 0, 0, 0,
false);
5514 ctx.
Read(p_debug_synch);
5515 float general_bonus_before = p_debug_synch.param1;
5516 float general_bonus_after = p_debug_synch.param2;
5517 float last_UA_value = p_debug_synch.param3;
5518 float cooldown_value = p_debug_synch.param4;
5519 float cooldown_active = p_debug_synch.param5;
5527 case ERPCs.RPC_WARNING_ITEMDROP:
5532 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5537 case ERPCs.RPC_WARNING_TELEPORT:
5542 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5546 case ERPCs.RPC_INIT_SET_QUICKBAR:
5547 ref Param1<int> count =
new Param1<int>(0);
5548 if (ctx.
Read(count))
5550 for (
int i = 0; i < count.param1 ; i++)
5557 case ERPCs.RPC_SYNC_THERMOMETER:
5560 if (ctx.
Read(value))
5561 m_Hud.SetTemperature(value.
ToString() +
"#degrees_celsius");
5566 case ERPCs.RPC_CHECK_PULSE:
5587 case PlantType.TREE_HARD:
5588 SoundHardTreeFallingPlay();
5591 case PlantType.TREE_SOFT:
5592 SoundSoftTreeFallingPlay();
5595 case PlantType.BUSH_HARD:
5596 SoundHardBushFallingPlay();
5599 case PlantType.BUSH_SOFT:
5600 SoundSoftBushFallingPlay();
5603 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5610 case ERPCs.RPC_DEBUG_MONITOR_STR:
5617 case ERPCs.RPC_ITEM_REPAIR:
5618 PluginInventoryRepair repairPlugin = PluginInventoryRepair.Cast(
GetPlugin(PluginInventoryRepair));
5619 repairPlugin.OnRPC(ctx);
5635 #ifdef DIAG_DEVELOPER
5636 case ERPCs.DEV_RPC_AGENT_RESET:
5644 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5646 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
5647 plugin_remote_server.OnRPC(ctx,
this);
5651 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5653 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
5654 PluginDeveloper plugin_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5655 if (plugin_dev.m_ScriptConsole)
5656 plugin_dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5658 plugin_remote_client.OnRPC(ctx);
5662 case ERPCs.DEV_AGENT_GROW:
5668 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5671 mid.StopWatchRequest(
this);
5676 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5678 PluginUniversalTemperatureSourceServer plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5679 plugin_uts_server.OnRPC(ctx,
this);
5683 case ERPCs.DEV_UTS_DEBUG_DATA:
5685 PluginUniversalTemperatureSourceClient plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5686 plugin_uts_client.OnRPC(ctx);
5693 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5702 bool success =
g_Game.ExecuteEnforceScript(
"void scConsMain() \n{\n" + code +
"\n}\n",
"scConsMain");
5709 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5711 PluginDeveloper dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5712 if (dev.m_ScriptConsole)
5713 dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5717 case ERPCs.DEV_SET_DEV_ITEM:
5719 Param1<EntityAI> ent =
new Param1<EntityAI>(null);
5720 if (ctx.
Read(ent) && ent.param1)
5723 mid2.RegisterDebugItem(ent.param1,
this);
5729 case ERPCs.RPC_ITEM_DIAG:
5731 Param1<EntityAI> p1 =
new Param1<EntityAI>(null);
5735 plgn.OnRPC(p1.param1, ctx);
5742 #ifdef DIAG_DEVELOPER
5743 PluginDeveloper module_rc = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5745 module_rc.OnRPC(
this, rpc_type, ctx);
5747 PluginDeveloperSync module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
5749 module_rcs.OnRPC(
this, rpc_type, ctx);
5757 if (plugin_diag_menu)
5758 plugin_diag_menu.
OnRPC(
this, rpc_type, ctx);
5764 super.OnGameplayDataHandlerSync();
5811 if (
Class.
CastTo(ppeRequester, PPERequesterBank.GetRequester(ppeIdx)))
5812 ppeRequester.
Start();
5835 PPERequesterBank.GetRequester(ppeIdx).Stop(
new Param1<bool>(
true));
5866 g_Game.GetWeather().GetSnowfall().GetLimits(min,max);
5874 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
5875 if (!
g_Game.IsDedicatedServer())
5892 super.OnVariablesSynchronized();
6007 item.SetHealthMax(
"",
"");
6008 item.SetWet(item.GetWetInit());
6010 item.SetFrozen(
false);
6021 m_PlayerSelected =
true;
6029#ifdef FEATURE_NETWORK_RECONCILIATION
6033 identity.Possess(
this);
6052 Param1<int> paramCount =
new Param1<int>(count);
6053 params.Insert(paramCount);
6054 for (
int i = 0; i < count; i++)
6060 if (count > 0 &&
g_Game.IsMultiplayer())
6062 g_Game.RPC(
this,
ERPCs.RPC_INIT_SET_QUICKBAR, params,
true, identity);
6072 if (
g_Game.IsMultiplayer())
6077 g_Game.RPCSingleParam(
this,
ERPCs.RPC_WARNING_ITEMDROP, null,
true, identity);
6081 g_Game.GetMission().SyncRespawnModeInfo(identity);
6108 g_Game.GetMission().ResetGUI();
6118 int characterCount =
g_Game.GetMenuData().GetCharactersCount() - 1;
6119 int idx =
g_Game.GetMenuData().GetLastPlayedCharacter();
6125 g_Game.GetMission().EnableAllInputs(
true);
6129 #ifdef DIAG_DEVELOPER
6130 m_TargetTemperatureDiag = PluginTargetTemperature.Cast(
GetPlugin(PluginTargetTemperature));
6131 m_TargetTemperatureDiag.Init(
this);
6137 m_Bot =
new Bot(
this);
6144 super.SimulateDeath(state);
6167 BurlapSackCover attachment;
6170 PPERequester_BurlapSackEffects req;
6171 if (
Class.
CastTo(req,PPERequesterBank.GetRequester(PPERequesterBank.REQ_BURLAPSACK)))
6177 else if (req.IsRequesterRunning())
6179 PPERequesterBank.GetRequester(PPERequester_BurlapSackEffects).Stop();
6196 if (item && item.IsObstructingVoice())
6198 item.MutePlayer(
this,
true);
6202 g_Game.SetVoiceEffect(
this, VoiceEffectMumbling,
false);
6203 g_Game.SetVoiceEffect(
this, VoiceEffectObstruction,
false);
6212 float resistance = 0;
6213 if (mask.HasIntegratedFilter() || mask.IsExternalFilterAttached())
6214 resistance = 1 - mask.GetFilterQuantity01();
6246 if (
m_EffectWidgets.m_MaskWidgetUpdateCount < 2 && callback.GetLength() > 2 && playback_time > 0.5 )
6256 if (super.OnInputUserDataProcess(userDataType, ctx))
6284 if (ctx.
Read(uid) && ctx.
Read(mute))
6286 g_Game.MutePlayer(uid, GetIdentity().GetPlainId(), mute);
6305 float blood = GetHealth(
"GlobalHealth",
"Blood");
6307 blood_scale_normalized =
Math.
Clamp(blood_scale_normalized,0,1);
6320 bool use_stack_max =
false;
6325 if (!ctx.
Read(type))
6330 if (!ctx.
Read(item1))
6337 if (!ctx.
Read(dummy))
6342 item1.GetInventory().GetCurrentInventoryLocation(srcIL);
6351 item1.SplitItemToInventoryLocation(dstIL);
6353 item1.SplitIntoStackMaxToInventoryLocation(dstIL);
6359 if (!ctx.
Read(item1))
6361 if (!ctx.
Read(item2))
6363 if (!ctx.
Read(use_stack_max))
6365 if (!ctx.
Read(slot_id))
6368 item1.GetInventory().GetCurrentInventoryLocation(srcIL);
6373 if (type == -1 && item1 && item2)
6375 item2.GetInventory().GetCurrentInventoryLocation(dstIL);
6378 item1.CombineItems(item2, use_stack_max);
6380 else if (type == 1 && item1)
6403 item1.SplitIntoStackMax(item2, slot_id,
this);
6411 item1.SplitItem(
this);
6414 else if (type == 2 && item1 && item2)
6422 dstIL.
SetCargo(item2, item1, slot_id, row, col,
false);
6426 item1.SplitIntoStackMaxCargo(item2, slot_id, row, col);
6428 else if (type == 3 && item1)
6433 item1.SplitIntoStackMaxHands(
this);
6443 return ItemBase.Cast(GetEntityInHands());
6453 bool is_AI =
g_Game.IsKindOf(object_name,
"DZ_LightAI");
6456 return SpawnAI(object_name, pos);
6468 if (
g_Game.IsKindOf(object_name,
"Boat"))
6480 vector posRandom = MiscGameplayFunctions.GetRandomizedPositionVerifiedPlayer(
this,raycastDistance,radius,
this);
6492 bool is_ai =
g_Game.IsKindOf(object_name,
"DZ_LightAI");
6513 item.SetPosition(pos_spawn);
6514 item.PlaceOnSurface();
6515 return can_be_dropped;
6542 string t = src.GetType();
6546 bool locked =
g_Game.HasInventoryJunctureDestination(
this, loc);
6555 MiscGameplayFunctions.TransferItemProperties(src, dst);
6557 g_Game.RemoteObjectTreeCreate(dst);
6577 dst.PlaceOnSurface();
6578 dst.SetResultOfSplit(markItemAsSplitResult);
6579 MiscGameplayFunctions.TransferItemProperties(src, dst);
6598 g_Game.ChatMP(
this, text, style);
6602 g_Game.Chat(text, style);
6609 Message(text,
"colorStatusChannel");
6621 Message(text,
"colorFriendly");
6627 Message(text,
"colorImportant");
6639 g_Game.GetUIManager().CloseAll();
6640 mission.RemoveActiveInputExcludes({
"inventory"},
false);
6641 mission.RemoveActiveInputRestriction(EInputRestrictors.INVENTORY);
6659 if ((
g_Game.IsServer() || !
g_Game.IsMultiplayer()) && inventory)
6663 int nItems = items.Count();
6664 for (
int i = 0; i < nItems; ++i)
6669 g_Game.ObjectDelete(item);
6677 LocalDestroyEntityInHands();
6688 int count = itemsArray.Count();
6690 for (
int i = 0; i < count; ++i)
6696 ServerDropEntity(item);
6704 g_Game.ObjectGetType(
this, type);
6734 super.OnParticleEvent(pEventType ,pUserString, pUserInt);
6736 if (!
g_Game.IsDedicatedServer())
6738 if (pUserInt == 123456)
6741 int boneIdx = player.GetBoneIndexByName(
"Head");
6757 eff.SetAutodestroy(
true);
6760 player.AddChild(p, boneIdx);
6769 if (!ToDelete() && IsAlive() && !IsSwimming() && !
m_IsDrowning)
6820 vector pos = GetBonePositionWS(index);
6821 float depth =
g_Game.GetWaterDepth(pos);
6838 state_changed =
true;
6873 set<int> ret =
new set<int>;
6874 ret.Insert(EAttExclusions.SHAVING_MASK_ATT_0);
6875 ret.Insert(EAttExclusions.SHAVING_HEADGEAR_ATT_0);
6906 #ifdef DIAG_DEVELOPER
6908 if (IsControlledPlayer())
6947 if (amount > storedValue)
6989 if (IsPlayerSelected() && !IsAlive())
7039 if (
g_Game.SaveVersion() < 102)
7044 super.OnStoreSave(ctx);
7046 GetHumanInventory().OnStoreSave(ctx);
7076 arrowManager.
Save(ctx);
7101 if (!super.OnStoreLoad(ctx, version))
7105 if (!GetHumanInventory().
OnStoreLoad(ctx, version))
7115 Print(
"---- failed to load PlayerStats ----");
7121 Print(
"---- failed to load ModifiersManager, read fail ----");
7127 Print(
"---- failed to load AgentPool, read fail ----");
7133 Print(
"---- failed to load SymptomManager, read fail ----");
7139 Print(
"---- failed to load BleedingManagerServer, read fail ----");
7145 Print(
"---- failed to load PlayerStomach, read fail ----");
7167 Print(
"---- failed to load Persistent Flags, read fail ----");
7174 if (!ctx.
Read(onLadder))
7182 if (!ctx.
Read(position))
7198 arrowManager.
Load(ctx);
7202 Print(
"---- PlayerBase OnStoreLoad SUCCESS ----");
7208 GetHumanInventory().OnAfterStoreLoad();
7221 if (MiscGameplayFunctions.TeleportPlayerToSafeLocation3D(
this,safePos) &&
m_AdminLog)
7222 m_AdminLog.PlayerTeleportedLog(
this,currentPos,safePos,
"Spawning in Player Restricted Area: " + pra.
areaName);
7237 int lifespan_state = 0;
7238 if (!ctx.
Read(lifespan_state))
7242 int last_shaved = 0;
7243 if (!ctx.
Read(last_shaved))
7249 bool bloody_hands_old;
7250 if (!ctx.
Read(bloody_hands_old))
7256 int bloody_hands = 0;
7257 if (!ctx.
Read(bloody_hands))
7263 bool blood_visible =
false;
7264 if (!ctx.
Read(blood_visible))
7269 if (!ctx.
Read(blood_type))
7279 int hour, minute, second;
7303 g_Game.GetAnalyticsServer().OnPlayerConnect(
this);
7329 g_Game.GetAnalyticsServer().OnPlayerDisconnect(
this);
7350 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7353 float temperature = 0;
7359 if (pollution & EPollution.HEAVYMETAL)
7373 if (!edibleItem || !edibleItem.CanBeConsumed())
7379 temperature = edibleItem.GetTemperature();
7384 if (edibleItem.IsLiquidContainer())
7386 int liquidType = edibleItem.GetLiquidType();
7387 string liquidClassName = Liquid.GetLiquidClassname(liquidType);
7388 if (liquidClassName.
Length() == 0)
7389 Error(
"Error! Trying to add unknown liquid to stomach with item=" +
Object.GetDebugName(edibleItem) +
" data.m_Type=" + data.
m_Type +
" liquid_type=" + liquidType);
7397 foodStageType = edibleItem.
GetFoodStage().GetFoodStageType();
7416 g_Game.GetUIManager().ScreenFadeIn(0,
"You are Unconscious", FadeColors.BLACK, FadeColors.WHITE);
7421 g_Game.GetUIManager().ScreenFadeOut(0);
7469 if (!
g_Game.IsMultiplayer())
7498 if (m_ReplaceSoundEventHandler)
7499 return m_ReplaceSoundEventHandler.PlayReplaceSound(soundEventID, soundType, param);
7511 if (!m_PlayerSoundEventHandler)
7514 return m_PlayerSoundEventHandler.PlayRequestEx(
id, is_from_server, param);
7519 if (!m_PlayerSoundEventHandler)
7522 return m_PlayerSoundEventHandler.StopRequest(
id, is_from_server, param);
7527 return m_PlayerSoundEventHandler;
7536 if (IsControlledPlayer())
7538 if (!
g_Game.IsDedicatedServer())
7569 if (IsControlledPlayer())
7571 if (!
g_Game.IsDedicatedServer())
7597 #ifdef DIAG_DEVELOPER
7602 DamageSystem.ResetAllZones(
this);
7654 transport.FixEntity();
7672 if (m_PerformedActionSounds.Count() == 0)
7681 m_PerformedActionSounds.Clear();
7687 if (
g_Game.IsClient())
return;
7733 float dist_check = distance * distance;
7734 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
7738 if (
vector.
DistanceSq(GetWorldPosition(), target.GetWorldPosition()) < dist_check && target !=
this)
7784 int max_count = PluginTransmissionAgents.GetAgentMaxCount(agent_id);
7785 return m_AgentPool.GetSingleAgentCount(agent_id) / max_count;
7816 float min_distance = 0.5;
7819 vector to = from + (
g_Game.GetCurrentCameraDirection() * min_distance);
7822 int contactComponent;
7824 DayZPhysics.
RaycastRV(from, to, contactPos, contactDir, contactComponent, NULL, NULL, NULL,
false,
true);
7833 return (!mask || (mask && mask.AllowFoodConsumption()));
7916 return m_StatStamina;
7925 return m_StatSpecialty;
7934 return m_StatBloodType;
7943 return m_StatHeatBuffer;
8008#ifdef DIAG_DEVELOPER
8009 if (m_Bot && action_id >
EActions.PLAYER_BOT_INTERNAL_START && action_id <
EActions.PLAYER_BOT_END)
8011 m_Bot.StartAction(action_id);
8016 if (super.OnAction(action_id, player, ctx))
8052 PluginTransmissionAgents pluginTransmissionAgents = PluginTransmissionAgents.Cast(
GetPlugin(PluginTransmissionAgents));
8054#ifdef DIAG_DEVELOPER
8060 map<int, string> agentList = pluginTransmissionAgents.GetSimpleAgentList();
8064 foreach (
int tid,
string tname : agentList)
8066 string injectName =
"Inject " + tname;
8067 string removeName =
"Remove " + tname;
8077#ifdef DIAG_DEVELOPER
8082 int cnt = e.GetVariableCount();
8085 for (i = 0; i < cnt; i++)
8087 if (!e.GetVariableValue(null, i, val))
8090 if (val <=
EActions.PLAYER_BOT_INTERNAL_START)
8093 if (val ==
EActions.PLAYER_BOT_START)
8099 if (val >=
EActions.PLAYER_BOT_END)
8102 string name = e.GetVariableName(i);
8111 super.GetDebugActions(outputList);
8113 if (Gizmo_IsSupported())
8130 super.OnSyncJuncture(pJunctureID, pCtx);
8147 GetInventory().OnInventoryJunctureFromServer(pCtx);
8150 GetInventory().OnInventoryJunctureFailureFromServer(pCtx);
8172 if (GetAimingModel() && IsFireWeaponRaised())
8174 GetAimingModel().RequestKuruShake(amount);
8207 SetGetInVehicleDebug(vehicle);
8229 item.SetPrepareToDelete();
8236 return !(GetThrowing().IsThrowingAnimationPlaying() || GetDayZPlayerInventory().IsProcessing() || (
GetActionManager() &&
GetActionManager().GetRunningAction()));
8256 for (
int i = count - 1; i >= 0 ; i--)
8259 if (itemToDelete != null)
8261 itemToDelete.GetInventory().GetCurrentInventoryLocation(il);
8272 for (
int j = count - 1; j >= 0 ; j--)
8275 if (itemToDelete == null)
8281 itemToDelete.Delete();
8320 m_fLastHeadingDiff = 0;
8325 return super.HeadingModel(pDt, pModel);
8355 return m_LiftWeapon_player;
8360 return m_ObstructWeapon_player;
8374 if (obstruction <= 0.0)
8379 float penetration = weapon.GetObstructionPenetrationDistance(obstruction);
8380 bool inSights = m_CameraIronsight || m_CameraOptics;
8385 return penetration > 0.040;
8391 return penetration > 0.005;
8421 m_ProcessLiftWeaponState = state;
8422 m_ProcessLiftWeapon =
true;
8423 m_ProcessObstructWeapon = obstruct;
8431 bool liftChange = m_LiftWeapon_player != state;
8432 bool obstructChange =
Math.
AbsFloat(m_ObstructWeapon_player-obstruct) > 0.03;
8435 m_LiftWeapon_player = state;
8436 m_ObstructWeapon_player = obstruct;
8443 if (!liftChange && !obstructChange)
8461 ctx.
Write(obstruct);
8476 bool limited = weap.LiftWeaponCheckEx(
this, obstruct, hitObject);
8477 if (weap.UseWeaponObstruction(
this, obstruct, hitObject))
8486 obstruct =
Math.
Clamp( obstruct, 0, 1 );
8488 if (m_LiftWeapon_player != limited || m_ObstructWeapon_player != obstruct)
8493 else if (m_LiftWeapon_player || m_ObstructWeapon_player > 0)
8502 if (m_ProcessLiftWeapon)
8504 bool liftChange = m_LiftWeapon_player != m_ProcessLiftWeaponState;
8509 m_LiftWeapon_player = m_ProcessLiftWeaponState;
8510 m_ObstructWeapon_player = m_ProcessObstructWeapon;
8511 m_ProcessLiftWeapon =
false;
8520 super.HideClothing(optic, state);
8537 SetInvisibleRecursive(
true,
this,clothingArray);
8547 SetInvisibleRecursive(
false,
this,clothingArray);
8559 super.SetDeathDarknessLevel(duration, tick_time);
8561 if (IsControlledPlayer())
8563 float actual_tick = tick_time;
8572 progress = 1 - ((duration - m_DeathDarkeningCurrentTime) / duration);
8574 m_DeathDarkeningCurrentTime += actual_tick;
8576 if (!IsAlive() && IsPlayerSelected())
8582 if (m_DeathDarkeningCurrentTime >= duration)
8584 StopDeathDarkeningEffect();
8589 StopDeathDarkeningEffect();
8630 OverrideSlidePoseAngle(
Math.
PI2);
8632 else if (!
IsInFBEmoteState() && IsControlledPlayer() && IsPlayerSelected())
8646 isActionPossible =
false;
8647 Magazine mag = Magazine.Cast(item);
8654 isActionPossible =
true;
8672 if (can_detach && target.GetInventory().FindFreeLocationFor(item, flags, il))
8678 return super.PredictiveTakeEntityToTargetInventory(target, flags, item);
8687 if (can_detach && GetInventory().FindFreeLocationFor(item, flags, il))
8693 return super.PredictiveTakeEntityToInventory(flags, item);
8699 Magazine mag = Magazine.Cast(item);
8700 if (parentWpn && mag)
8707 return super.PredictiveTakeEntityToTargetAttachment(target, item);
8713 Magazine mag = Magazine.Cast(item);
8714 if (parentWpn && mag)
8716 if (target.CanReceiveAttachment(item,slot) &&
GetWeaponManager().CanAttachMagazine(parentWpn, mag))
8721 return super.PredictiveTakeEntityToTargetAttachmentEx(target, item,slot);
8736 return super.PredictiveTakeEntityToTargetCargo(target,item);
8747 dst.
SetCargoAuto(cargo, item, row, col, item.GetInventory().GetFlipCargo());
8753 return super.PredictiveTakeEntityToTargetCargoEx (cargo, item, row, col);
8774 return super.PredictiveDropEntity(item);
8780 Magazine swapmag1 = Magazine.Cast(item1);
8781 Magazine swapmag2 = Magazine.Cast(item2);
8783 if (swapmag1 && swapmag2)
8787 if (
Class.
CastTo(parentWpn, swapmag1.GetHierarchyParent()))
8791 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag1=" + swapmag1);
8796 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
8801 if (
Class.
CastTo(parentWpn, swapmag2.GetHierarchyParent()))
8805 Print(
"[inv] PlayerBase.PredictiveSwapEntities: swapping mag1=" + swapmag1 +
" to parent wpn=" + parentWpn +
" of mag2=" + swapmag2);
8810 Print(
"[inv] PlayerBase.PredictiveSwapEntities: can not swap magazines");
8824 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item_hands)))
8829 return super.PredictiveSwapEntities(item1, item2);
8845 if (mngr_client.GetAction(ActionSwapItemToHands).Can(
this,atrg,
ItemBase.Cast(item2)))
8852 return super.PredictiveForceSwapEntities(item1, item2, item2_dst);
8857 if (item.IsHeavyBehaviour() && !
m_ActionManager.GetRunningAction() && !item.GetHierarchyParent())
8874 super.PredictiveTakeEntityToHands(item);
8892 return super.PredictiveTakeToDst(src,dst);
8905 item_ground = item1;
8907 item_ground = item2;
8909 return item_hands && item_ground && item_ground.IsHeavyBehaviour();
8920 ErrorEx(
"No valid head detected on character!");
8927 for (
int i = 0; i <
m_CharactersHead.m_HeadHairSelectionArray.Count(); ++i)
8933#ifdef DIAG_DEVELOPER
8946#ifdef DIAG_DEVELOPER
8949 switchState = !diagmenuu.m_HairHidingStateMap.Get(level);
8950 diagmenuu.m_HairHidingStateMap.Set(level, switchState);
8956 switchState = !state;
8979 if (item.HidesSelectionBySlot())
8982 for (i = 0; i < count; ++i)
8984 if (itemInventory.
GetSlotId(i) == slot_id)
8986 str = item.GetHeadHidingSelection().Get(i);
8992 Debug.
Log(
"No valid selection '" + str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
8999 count = item.GetHeadHidingSelection().Count();
9000 for (i = 0; i < count; i++)
9002 str = item.GetHeadHidingSelection().Get(i);
9008 Debug.
Log(
"No valid selection '" + str +
"' found on head of " +
GetType() +
". Verify the p3d, model config, and the 'HAIR_HIDING_SELECTIONS' macro in basicDefines.");
9020 bool exception_hidden =
false;
9032 for (i = 0; i < count; i++)
9037 for (i = 0; i < count; i++)
9051 exception_hidden =
true;
9057 if (exception_hidden)
9069 for (
int i = 0; i < translatedSelectinosArray.Count(); i++)
9071 index = translatedSelectinosArray.Get(i);
9124 Error(
"AddActiveNV | illegal server-side call!");
9139 Error(
"RemoveActiveNV | illegal server-side call!");
9157 string text = super.GetDebugText();
9174 void DEBUGRotateNVG()
9178 if (FindAttachmentBySlotName(
"Eyewear"))
9180 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Eyewear").FindAttachmentBySlotName(
"NVG"));
9182 else if (FindAttachmentBySlotName(
"Headgear"))
9184 nvg = NVGoggles.Cast(FindAttachmentBySlotName(
"Headgear").FindAttachmentBySlotName(
"NVG"));
9189 nvg.RotateGoggles(nvg.m_IsLowered);
9198 if (slot_name ==
"Headgear")
9200 item.SetSimpleHiddenSelectionState(0,1);
9201 item.SetSimpleHiddenSelectionState(1,0);
9203 else if (slot_name ==
"Mask")
9205 item.SetSimpleHiddenSelectionState(0,0);
9206 item.SetSimpleHiddenSelectionState(1,1);
9215 if (slot_name ==
"Headgear")
9217 item.SetSimpleHiddenSelectionState(0,1);
9218 item.SetSimpleHiddenSelectionState(1,0);
9220 else if (slot_name ==
"Mask")
9222 item.SetSimpleHiddenSelectionState(0,0);
9223 item.SetSimpleHiddenSelectionState(1,1);
9245 int nBodyparts = bodyparts.Count();
9246 for (
int i = 0; i < nBodyparts; ++i)
9254 path =
"cfgVehicles " + bodypart.GetType();
9255 idx = bodypart.GetHiddenSelectionIndex(
"personality");
9263 path =
"cfgVehicles " + item.GetType();
9264 idx = item.GetHiddenSelectionIndex(
"personality");
9327 int idx = GetHiddenSelectionIndex(
"decay_preload");
9393 legZones.Insert(
"LeftLeg");
9394 legZones.Insert(
"RightLeg");
9395 legZones.Insert(
"RightFoot");
9396 legZones.Insert(
"LeftFoot");
9398 foreach (
string legZone : legZones)
9399 DecreaseHealth(legZone,
"", inputDmg);
9407 if (!hide && ((!IsSwimming() && !IsClimbingLadder() && !IsInVehicle() && !
AnimCommandCheck(HumanMoveCommandID.CommandSwim | HumanMoveCommandID.CommandLadder | HumanMoveCommandID.CommandVehicle)) || force))
9410 GetItemAccessor().HideItemInHands(
false);
9415 GetItemAccessor().HideItemInHands(
true);
9423 if (target.GetInventory().FindFreeLocationFor(item, flags, il))
9433 float stackableTarget = item.GetTargetQuantityMax(slotID);
9434 if (stackableTarget > 0 && stackableTarget < item.GetQuantity())
9437 if (CastTo(itemB, item))
9439 itemB.SplitIntoStackMaxToInventoryLocationClient(il);
9454 return super.TakeEntityToInventoryImpl(mode, flags, item);
9465 return super.TakeEntityToCargoImpl(mode, item);
9476 return super.TakeEntityAsAttachmentImpl(mode, item);
9487 super.TakeEntityToHandsImpl(mode, item);
9498 return super.TakeEntityToTargetInventoryImpl(mode, target, flags, item);
9509 return super.TakeEntityToTargetCargoImpl(mode, target, item);
9520 return super.TakeEntityToTargetAttachmentImpl(mode, target, item);
9531 return super.TakeToDstImpl(mode, src, dst);
9545 float playerSpeed = GetCommand_Move().GetCurrentMovementSpeed();
9551 float particleLifetime = 5.25;
9552 float particleSpeed = 0.25;
9553 if (playerSpeed >= 1)
9555 particleLifetime = 3.5;
9556 particleSpeed = 3.25;
9558 if (playerSpeed >= 2)
9560 particleLifetime = 2.5;
9561 particleSpeed = 5.25;
9563 if (playerSpeed >= 3)
9565 particleLifetime = 1.5;
9566 particleSpeed = 8.25;
9575 GetTransform(transform);
9583 if (!IsControlledPlayer())
9611 int pivot = componentIndex;
9627 vector parentTransMat[4];
9630 arrow.GetTransform(arrowTransMat);
9634 GetTransformWS(parentTransMat);
9641 parentTransMat[0] = rotMatrix[0];
9642 parentTransMat[1] = rotMatrix[1];
9643 parentTransMat[2] = rotMatrix[2];
9644 parentTransMat[3] = closeBonePosWS;
9649 arrow.SetTransform(arrowTransMat);
9656 if (bleedingManager)
9658 if (!bleedingManager.AttemptAddBleedingSourceBySelection(compName))
9659 bleedingManager.AttemptAddBleedingSourceBySelection(
"Pelvis");
9681 super.OnFreezeStateChangeClient();
9730 consumeData.
m_Type = consume_type;
9757 [
Obsolete(
"use the GetUndergroundHandler instead")]
9770 [
Obsolete(
"not used but kept in the case of modders needing/using it")]
Param4< int, int, string, int > TSelectableActionInfoWithColor
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
eBleedingSourceType GetType()
void ActionDrinkPondContinuous()
override bool CanBePerformedWhileChangingStance()
Prevent this action from beeing performed while changing stance.
ActionEatSnowContinuousCB ActionContinuousBaseCB ActionEatSnowContinuous()
void ActionManagerBase(PlayerBase player)
map< typename, ref array< ActionBase_Basic > > TInputActionMap
ActionStartCarCB ActionContinuousBaseCB ActionStartEngine()
ActionStartEngineBoatCB ActionContinuousBaseCB ActionStartEngineBoat()
class ActionTargets ActionTarget
ActionUncoverHeadBase ActionContinuousBase ActionUncoverHeadSelf()
ActionWashHandsSnowCB ActionContinuousBaseCB ActionWashHandsSnow()
ActionWashHandsWaterCB ActionContinuousBaseCB ActionWashHandsWater()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
override ArrowManagerBase GetArrowManager()
const int BREATH_VAPOUR_LEVEL_MAX
void EffectRadial(Param param1, Param param2)
override event void Read(PawnStateReader ctx)
override event void Write(PawnStateWriter ctx)
const int ECE_EQUIP_ATTACHMENTS
const int ECE_PLACE_ON_SURFACE
const int ECE_IN_INVENTORY
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
bool IsFullBody(PlayerBase player)
static string GetPulseMessage(EPulseType pulse_type, int blood_level)
const int TARGET_IRREGULAR_PULSE_BIT
Vector2 GetCameraLRAngle()
bool IsCameraLockOnPerform()
void PerformActionStart(ActionBase action, ActionTarget target, ItemBase item, Param extra_data=NULL)
override void RequestEndAction()
void PerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
bool CanPerformActionFromQuickbar(ItemBase mainItem, ItemBase targetItem)
override void EndActionInput()
override void RequestInterruptAction()
client requests action interrupt
void ForceTarget(Object targetObject)
static void PlayerDisconnected(StatsEventDisconnectedData data)
static void PlayerMeasures(StatsEventMeasuresData data)
const string STAT_DISTANCE
const string STAT_PLAYTIME
bool Load(ParamsReadContext ctx)
bool Save(ParamsWriteContext 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 Param2< float, float > PARAM2_FLOAT_FLOAT
static ref Param1< string > PARAM1_STRING
static ref Param1< int > PARAM1_INT
represents base for cargo storage for entities
static bool GetAllowStaminaAffectInertia()
static bool GetUse3DMap()
static bool GetHitIndicationPPEEnabled()
static int GetLightingConfig()
static bool GetDisableRespawnDialog()
static TStringSet GetDisallowedTypesInUnderground()
static bool IsPointInPlayerRestrictedArea(vector point, out PlayerRestrictedAreaInstance hitArea)
static bool IsInitialized()
Super root of all classes in Enforce script.
static void AddPlayerBase(Man player)
static void RemovePlayerBase(Man player)
Client only - manage set up crafting on client.
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
this is main camera class
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
This HeadingModel - Clamps heading.
static bool RestrictHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff, HeadingRestrictData restrictData)
static void SendDeleteItem(DayZPlayer pPlayer, EntityAI item)
static const int SJ_STAMINA
static const int SJ_PLAYER_STATES
static bool ReadBrokenLegsParamsEx(ParamsReadContext pCtx, out int currentState)
static const int SJ_PLAYER_ADD_MODIFIER
static const int SJ_WEAPON_LIFT
static const int SJ_GESTURE_REQUEST
static const int SJ_INVENTORY
static bool ReadInjuryParams(ParamsReadContext pCtx, out bool pEnable, out eInjuryHandlerLevels level)
static const int SJ_ADS_RESET
static const int SJ_WEAPON_ACTION_ACK_REJECT
static const int SJ_KURU_REQUEST
static const int SJ_ACTION_ACK_ACCEPT
static const int SJ_STAMINA_MISC
static bool ReadPlayerUnconsciousnessParams(ParamsReadContext pCtx, out bool enable)
static const int SJ_ACTION_INTERRUPT
static void SendPlayerUnconsciousness(DayZPlayer pPlayer, bool enable)
Conscious / Unconscious.
static const int SJ_INVENTORY_FAILURE
static void SendBrokenLegsEx(DayZPlayer pPlayer, int currentState)
static const int SJ_UNCONSCIOUSNESS
static const int SJ_WEAPON_ACTION_ACK_ACCEPT
static const int SJ_BROKEN_LEGS
static const int SJ_ACTION_ACK_REJECT
static const int SJ_QUICKBAR_SET_SHORTCUT
static const int SJ_DELETE_ITEM
static const int SJ_SHOCK
static const int SJ_INJURY
static const int SJ_WEAPON_SET_JAMMING_CHANCE
static bool ReadShockParams(ParamsReadContext pCtx, out float shockValue)
static bool ReadKuruRequest(ParamsReadContext pCtx, out float amount)
Kuru Disease Shake.
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.
bool Consume(float amount, PlayerBase consumer)
override FoodStage GetFoodStage()
int FilterAgents(int agentsIn)
Filter agents from the item (override on higher implementations).
Wrapper class for managing particles through SEffectManager.
void SetDecalOwner(Object o)
Particle GetParticle()
Gets the main particle which this Effect is managing.
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
script counterpart to engine's class Inventory
static proto native EntityAI LocationCreateLocalEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
static proto native bool HasInventoryReservation(EntityAI item, InventoryLocation dst)
Internally: HasInventoryReservationEx(item, dst, FindInventoryReservationMode.LEGACY,...
proto native bool IsInventoryLocked()
const float c_MaxItemDistanceRadius
anti-cheats
proto native EntityAI GetAttachmentFromIndex(int index)
proto native bool EnumerateInventory(InventoryTraversalType tt, out array< EntityAI > items)
proto native int GetSlotIdCount()
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
proto native bool FindFreeLocationFor(notnull EntityAI item, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFreeLocationFor.
proto native int AttachmentCount()
Returns count of attachments attached to this item.
proto native int GetSlotId(int index)
proto native EntityAI FindPlaceholderForSlot(int slot)
Returns placeholder entity for slot (naked arms, legs etc).
static proto native bool PrepareDropEntityPos(EntityAI owner, notnull EntityAI item, out vector mat[4], bool useValuesInMatrix=false, int conflictCheckDepth=-1)
proto native bool FindFirstFreeLocationForNewEntity(string item_type, FindInventoryLocationType flags, out notnull InventoryLocation loc)
FindFirstFreeLocationForNewEntity.
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)...
proto native void UnlockInventory(int lockType)
bool LocalDestroyEntity(notnull EntityAI item)
bool CanAddEntityIntoHands(notnull EntityAI item)
Test if entity can be put into hands.
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.
proto native void LockInventory(int lockType)
proto void SelectPhysics(Physics physics)
Applies impulses to set the position when dynamic, otherwise sets the transform in the physics scene.
proto void SelectObject(Object object)
Sets the transform of the object directly.
const int NUMBER_OF_STAGES
proto native bool CharacterIsLoginPositionChanged(Man player)
Only valid during login.
proto native void CharacterKill(Man player)
proto native void CharacterSave(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()
returns the safe logout position in worldspace the position is closest to the last possible exit poin...
proto native void SetDirectionSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fDirFilterSprintTimeout
proto native void SetRunSprintFilterModifier(float value)
sets the multiplier for SHumanCommandMoveSettings::m_fRunSpringTimeout
proto native void ForceStance(int pStanceIdx)
pStanceIds is one of STANCEIDX_ERECT,STANCEIDX_CROUCH,STANCEIDX_PRONE,STANCEIDX_RAISEDERECT,...
proto native void SetMeleeBlock(bool pBlock)
this enables/disables block
proto native void SetTurnSpanSprintModifier(float value)
sets the multiplier for HumanItemBehaviorCfg::m_fMoveHeadingSprintFilterSpan
proto native void WakeUp(int targetStance=-1)
proto native bool IsInWater()
proto native Transport GetTransport()
proto native bool IsGettingIn()
proto native bool IsSwitchSeat()
proto native bool IsGettingOut()
proto native void SetVehicleType(int pVehicleType)
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
Internal ancestor of all Entity implementations.
Client only - manage set up crafting on client.
proto native int GetSlot()
returns slot id if current type is Attachment
proto native bool IsValid()
verify current set inventory location
proto native int GetType()
returns type of InventoryLocation
proto native void SetCargoAuto(notnull CargoBase cargo, EntityAI e, int row, int col, bool flip)
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)
proto native void SetHands(notnull EntityAI parent, EntityAI e)
bool ReadFromContext(ParamsReadContext ctx)
proto native void SetCargo(notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip)
proto native void SetGround(EntityAI e, vector mat[4])
static string DumpToStringNullSafe(InventoryLocation loc)
provides access to slot configuration
static proto native int GetSlotIdFromString(string slot_name)
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()
void SetLastMapInfo(float scale, vector pos)
ref ScriptInvoker m_OnUnconsciousStop
void PlayAttachmentDropSound()
void SetModifiers(bool enable)
PlayerBase m_CheckPulseLastTarget
void AdjustBandana(EntityAI item, string slot_name)
bool GetLiquidTendencyDrain()
void RemoveMedicalDrugsInUse(EMedicalDrugsType drugType)
void SendSoundEvent(EPlayerSoundEventID id)
ref Timer m_DeathCheckTimer
float GetTemporaryResistanceToAgent(int agent)
int m_AnimCommandStarting
bool CanManipulateInventory()
override bool IsInventoryVisible()
void SetBleedingBits(int bits)
override void OnPlayerRecievedHit()
override bool IsAlreadyInFallingCommand(int pCurrentCommandID)
EffectTrigger m_CurrentEffectTrigger
bool TogglePlacingServer(int userDataType, ParamsReadContext ctx)
ref HeadingRestrictData m_HeadingRestrictData
void SetHairLevelToHide(int level, bool state, bool was_debug=false)
Dynamic hair hiding.
ItemBase m_CheckMeleeItem
override void CommandHandler(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void ShockRefill(float pDt)
functionality moved to ShockMdfr::OnTick
bool GetDrowningWaterLevelCheck()
void SetLastShavedSeconds(int last_shaved_seconds)
ref Hologram m_HologramLocal
ref InjuryAnimationHandler m_InjuryHandler
PluginConfigEmotesProfile m_ConfigEmotesProfile
void SetLastFirePointIndex(int last_fire_point_index)
ref EmoteManager m_EmoteManager
void ToggleHeatBufferVisibility(bool show)
void SetShakesForced(int value)
float GetBordersImmunity()
float GetFeetDamageMoveModifier()
const int SIMPLIFIED_SHOCK_CAP
bool TakeToDstImpl(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
ref Param2< float, float > m_UAProgressParam
ref DebugMonitorValues m_DebugMonitorValues
ref ArrowManagerPlayer m_ArrowManager
void MapNavigationItemNotInPossession(EntityAI item)
void dmgDebugPrint(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
void RemoveCurrentEffectTrigger()
float GetStatBordersWater()
void OnContaminatedAreaEnterServer()
EntityAI SpawnEntityOnGroundOnCursorDir(string object_name, float distance)
static ref array< string > m_BleedingSourcesUp
void OnRestrainChangeClient()
override void DepleteStaminaEx(EStaminaModifiers modifier, float dT=-1, float coef=1.0)
static Particle m_ContaminatedAroundPlayerTiny
EntityAI CreateInInventory(string item_name, string cargo_type="", bool full_quantity=false)
/brief Creates ItemBase in players inventory.
bool m_CanPlayBrokenLegSound
bool TakeEntityToTargetCargoImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
vector GetLastFirePoint()
float GetStatBordersEnergy()
void ForceUpdateInjuredState()
update injured state immediately
void BrokenLegWalkShock()
void IncreaseAntibioticsCount()
void CloseMap()
DEPRECATED; terminates map animation callback and re-enables controls.
ref array< int > m_ProcessRemoveGlassesEffects
bool m_CanDisplayHitEffectPPE
override array< string > GetSuitableFinisherHitComponents()
returns list of suitable finisher hit components (defined on base entity/entity type)
float m_UnconsciousVignetteTarget
void StaminaHUDNotifier(bool show)
override bool IsUnconsciousStateOnly()
ref UndergroundBunkerHandlerClient m_UndergroundBunkerHandler
const int SHAKE_LEVEL_MAX
float m_UnconRefillModifier
void SetFlagTendencyRaise(bool state)
DEPRECATED.
void SetDecayEffects(int effect=-1)
ref PlayerStats m_PlayerStats
override void OnCommandDeathStart()
override void EEItemIntoHands(EntityAI item)
void SetBloodyHandsPenaltyChancePerAgent(eAgents type, float amount)
increments the chances per agents
void FixAllInventoryItems()
UndergroundHandlerClient GetUndergroundHandler()
override void SwitchItemSelectionTexture(EntityAI item, string slot_name)
override bool IsSelfAdjustingTemperature()
void ToggleHeatBufferVisibility(int heatbufferStage)
void SetLastFirePoint(vector last_fire_point)
bool TakeEntityToCargoImpl(InventoryMode mode, notnull EntityAI item)
int GetBleedingSourceCount()
EntityAI SpawnAI(string object_name, vector pos)
void PlacingStartServer(ItemBase item)
EntityAI SpawnEntityOnGroundRaycastDispersed(string object_name, float raycastDistance=DEFAULT_SPAWN_DISTANCE, float radius=UAItemsSpreadRadius.DEFAULT)
bool Consume(ItemBase source, float amount, EConsumeType consume_type)
void IncreaseContaminatedAreaCount()
void SaveAreaPersistenceFlag(ParamsWriteContext ctx)
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
void CheckSendSoundEvent()
override bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void TogglePlacingLocal(ItemBase item=null)
float m_UnconsciousEndTime
override void OnCommandClimbFinish()
void CheckHairClippingOnCharacterLoad()
helper method for re-checking hairhiding on character load
void CalculateVisibilityForAI()
bool CheckMeleeItemDamage(ItemBase item)
vector m_DirectionToCursor
override void InsertAgent(int agent, float count=1)
override void SetDeathDarknessLevel(float duration, float tick_time)
bool HasStaminaRemaining()
void GiveShock(float shock)
void SetContaminatedEffect(bool enable, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, bool partDynaUpdate=false, int newBirthRate=0)
ref EffectSound m_SoundFliesEffect
SoftSkillsManager GetSoftSkillsManager()
ref StanceIndicator m_StanceIndicator
ref Environment m_Environment
void SendSoundEventEx(EPlayerSoundEventID id, int param=0)
override void EOnPostFrame(IEntity other, int extra)
vector SetDefaultHitPosition(string pSelection)
void SetEnergyManagerState(ItemBase itemInHands, bool state)
ModifiersManager GetModifiersManager()
bool CheckAndExecuteStackSplitToInventoryLocation(InventoryLocation il, notnull EntityAI item)
ref array< int > m_ProcessAddGlassesEffects
void SetPulseType(EPulseType pulse_type)
ref VirtualHud m_VirtualHud
override void OnStanceChange(int previousStance, int newStance)
ref map< EEffectAreaType, float > m_EffectAreaTimeToTick
void HandleGlassesEffect()
void ShowUnconsciousScreen(bool show)
void ProcessADDModifier()
PlayerStat< float > GetStatEnergy()
ItemBase CreateCopyOfItemInInventoryOrGroundEx(ItemBase src, bool markItemAsSplitResult=false)
void SwitchItemTypeAttach(EntityAI item, string slot)
override void HideClothing(ItemOptics optic, bool state)
state 'true' == hide
override void RequestSoundEventStop(EPlayerSoundEventID id, bool from_server_and_client=false, int param=EPlayerSoundEventParam.STOP_PLAYBACK)
void BrokenLegForceProne(bool forceOverride=false)
override bool CanDropEntity(notnull EntityAI item)
PlayerStat< float > m_StatToxicity
void MovingShock(float legHealth, float highShock, float midShock, float lowShock)
void OnRestrainStartedChangeClient()
void PlacingCancelLocal()
override void OnCommandVehicleFinish()
int GetLastShavedSeconds()
void SpawnDrowningBubbles()
int m_HasBloodyHandsVisible
void SetNVGLowered(bool state)
PlayerStat< int > GetStatBloodType()
void AddToEnvironmentTemperature(float pTemperature)
override void OnStoreSave(ParamsWriteContext ctx)
void OnSpawnedFromConsole()
bool IsPlayerDisconnected()
void ProcessADSSyncResetRequest()
ref array< EntityAI > m_ItemsToDelete
override void RPC(int rpc_type, array< ref Param > params, bool guaranteed, PlayerIdentity recipient=NULL)
void SetActionEndInput(ActionBase action)
int m_BleedingSourceCount
bool ResetADSPlayerSync(int userDataType, ParamsReadContext ctx)
server only
DamageDealtEffect GetDamageDealtEffect()
override string GetHitComponentForAI()
Melee helpers.
void AddActiveNV(int type)
override bool IsInventorySoftLocked()
void SetActivePrimarySymptomID(SymptomIDs id)
bool IsTargetInActiveRefresherRange(EntityAI target)
int GetLastFirePointIndex()
Head_Default m_CharactersHead
ref array< int > m_Recipes
PlayerStat< float > GetStatSpecialty()
bool m_MapCloseRequestProcessed
void ClearLastUAMessage()
ref InventoryActionHandler m_InventoryActionHandler
override bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
bool m_IsRestrainPrelocked
bool IsItemInInventory(EntityAI entity)
override bool CanReceiveItemIntoCargo(EntityAI item)
void UpdateTranslatedSelections(SelectionTranslation stt)
int m_RefreshAnimStateIdx
EStatLevels GetImmunityLevel()
override bool PredictiveDropEntity(notnull EntityAI item)
void RequestUnconsciousness(bool enable)
ref Param2< int, int > m_UAParam
const string CONTAMINATED_AREA_AMBIENT
override bool IsHoldingBreath()
override void OnCommandClimbStart()
override bool PredictiveForceSwapEntities(notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
void OnPlayerIsNowInsideEffectAreaEndServer()
void DealShock(float dmg)
PlayerStat< float > GetStatStamina()
vector m_CraftingInitialPos
static Particle m_ContaminatedAroundPlayer
void SetPlayerLoad(float load)
bool GetLastMapInfo(out float scale, out vector pos)
EStatLevels GetStatLevelHealth()
void QueueRemoveEffectWidget(array< int > effects)
void AddPossibleCoverFaceForShave()
DEPRECATED!
ref WeaponManager m_WeaponManager
bool m_MapClosingSyncSent
override void OnRollFinish()
ref TInputActionMap m_InputActionMapAsTarget
override void SetProcessUIWarning(bool state)
int m_SyncedModifiersPrev
void ProcessHoldBreath(float dT)
void SpawnShockEffect(float intensity_max)
override void JunctureDeleteItem(EntityAI item)
int m_PerformedAnimActionID
void RadialQuickBarSingleUse(int slotClicked)
bool ReadLiftWeaponRequest(int userDataType, ParamsReadContext ctx)
override void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
void OnInventoryMenuClose()
override bool PredictiveTakeEntityToTargetAttachmentEx(notnull EntityAI target, notnull EntityAI item, int slot)
ref TInputActionMap m_InputActionMap
void DecreaseContaminatedAreaCount()
ref SoundParams m_SaySoundParams
bool GetMapClosingSyncSent()
vector GetLocalProjectionOrientation()
bool m_MeleeDebug
melee stats
void QueueRemoveGlassesEffect(int id)
bool m_FlagRaisingTendency
bool m_IsVehicleSeatDriver
override void RemoveAgent(int agent_id)
void ImmuneSystemTick(float value, float deltaT)
void MessageStatus(string text)
override void EEKilled(Object killer)
override bool CanBeTargetedByAI(EntityAI ai)
PluginAdminLog m_AdminLog
EmoteManager GetEmoteManager()
void OnUnconsciousUpdate(float pDt, int last_command)
override void OnParticleEvent(string pEventType, string pUserString, int pUserInt)
ref MapNavigationBehaviour m_MapNavigationBehaviour
void Message(string text, string style)
colorStatusChannel colorAction colorFriendly colorImportant
void RemoveQuickBarEntityShortcut(EntityAI entity)
ref PlayerStomach m_PlayerStomach
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
override EntityAI SpawnEntityOnGroundPos(string object_name, vector pos)
void DecreaseEffectAreaCount()
void AddAction(typename actionName)
override void RemoveAllAgents()
void OnQuickBarContinuousUseStart(int slotClicked)
bool CheckAndExecuteStackSplit(FindInventoryLocationType flags, notnull EntityAI item, notnull EntityAI target)
TransferValues GetTransferValues()
bool IsFacingTarget(Object target)
float m_CameraSwayModifier
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
vector m_DefaultHitPosition
override bool PredictiveTakeEntityToTargetCargoEx(notnull CargoBase cargo, notnull EntityAI item, int row, int col)
void OnQuickBarContinuousUseEnd(int slotClicked)
array< int > GetNVTypesArray()
void SetRestrained(bool is_restrained)
override void TakeEntityToHandsImpl(InventoryMode mode, EntityAI item)
VirtualHud GetVirtualHud()
void SetNVGWorking(bool state)
override bool PlaySoundEventType(ESoundEventType soundType, int soundEventID, int param=0)
PlayerStomach GetStomach()
void OnContaminatedAreaExitServer()
override void SpawnDamageDealtEffect()
ref EffectRadial m_EffectRadial
void OnUpdateEffectAreaServer(float timeSlice)
override void OnReceivedHit(ImpactEffectsData hitData)
Call only on client or single player PlayerBase (as g_Game.GetPlayer()).
ref array< int > m_ProcessAddEffectWidgets
void SetLiftWeapon(int pJunctureID, ParamsReadContext ctx)
void MessageImportant(string text)
void SetActionsRemoteTarget()
EntityAI GetQuickBarEntity(int index)
UndergroundBunkerHandlerClient GetUndergroundBunkerHandler()
ref HiddenSelectionsData m_EmptyGloves
void UpdatePlayerMeasures()
float GetHeatBufferDynamicMax()
override void AddItemToDelete(EntityAI item)
void RequestHandAnimationStateRefresh()
override ArrowManagerBase GetArrowManager()
void DecreaseDiseaseCount()
SymptomManager GetSymptomManager()
override bool PredictiveTakeEntityToInventory(FindInventoryLocationType flags, notnull EntityAI item)
override bool PhysicalPredictiveDropItem(EntityAI entity, bool heavy_item_only=true)
void SetLoadedQuickBarItemBind(EntityAI entity, int index)
void OnPlayerIsNowInsideEffectAreaBeginClient()
DayZPlayerCameraBase m_CurrentCamera
PluginRecipesManager m_ModuleRecipesManager
ref Hologram m_HologramServer
void DecreaseHealingsCount()
void UpdateMaskBreathWidget(notnull MaskBase mask, bool is_start=false)
int m_ActivePrimarySymptomID
ref Param1< float > m_UnconParam
ItemBase CreateCopyOfItemInInventoryOrGround(ItemBase src)
float GetSimplifiedShockNormalized()
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
void SetUnderground(EUndergroundPresence presence)
override string GetDefaultHitComponent()
returns default hit component (fallback)
float m_HeatBufferDynamicMax
override bool IsRestrained()
ref EffectParticle m_FliesEff
NotifiersManager GetNotifiersManager()
override void OnCommandMelee2Finish()
string m_CachedPlayerName
void SetActions(out TInputActionMap InputActionMap)
void SetInWater(bool pState)
water contact (driven by Environment)
ref ConstructionActionData m_ConstructionActionData
void IncreaseEffectAreaCount()
PlayerStat< float > m_StatHeatComfort
bool Consume(PlayerConsumeData data)
void OnStoreSaveLifespan(ParamsWriteContext ctx)
void SetSoundCategoryHash(int hash)
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
void PlacingCompleteLocal()
override void CheckAnimationOverrides()
static ref array< string > m_BleedingSourcesLow
EMedicalDrugsType m_MedicalDrugsActive
void TryHideItemInHands(bool hide, bool force=false)
tries to hide item in player's hands, some exceptions for various movement states
void OnUnconsciousStart()
void SetTemporaryResistanceToAgent(int agent, float time)
void SwitchItemTypeDetach(EntityAI item, string slot)
void OnPlayerReceiveFlashbangHitEnd()
void UnsetMixedSoundState(eMixedSoundStates state)
override bool CanPlaceItem(EntityAI item)
ref PlayerSoundManagerClient m_PlayerSoundManagerClient
PlayerSoundManagerServer GetPlayerSoundManagerServer()
EStatLevels GetStatLevel(float stat_value, float critical, float low, float normal, float high)
override bool CanSwapItemInCargo(EntityAI child_entity, EntityAI new_entity)
void RequestResetADSSync()
ref SoundObject m_SaySoundObject
ActionManagerBase GetActionManager()
void SetPersistentFlag(PersistentFlag bit, bool enable)
void UpdateQuickBarEntityVisibility(EntityAI entity)
override void OnRollStart(bool isToTheRight)
void SetCheckMeleeItem(ItemBase item=null)
bool m_HasBloodTypeVisible
float GetHealthRegenSpeed()
PluginLifespan m_ModuleLifespan
ConstructionActionData GetConstructionActionData()
int m_DebugMonitorEnabled
override vector GetDefaultHitPosition()
override bool CanReleaseAttachment(EntityAI attachment)
void RemovePossibleCoverFaceForShave()
DEPRECATED!
ref EffectSound m_BrokenLegSound
bool m_ContaminatedAreaEffectEnabled
void QueueAddEffectWidget(array< int > effects)
override bool CanPickupHeavyItem(notnull EntityAI item)
override bool CanReleaseCargo(EntityAI cargo)
void OnBleedingSourceRemovedEx(ItemBase item)
FlashbangEffect GetFlashbangEffect()
float GetBloodyHandsPenaltyChancePerAgent(eAgents type)
override void RequestSoundEventEx(EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
override void OnCommandLadderStart()
override void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
void SpawnFlashbangEffect(PlayerBase player, bool visual)
eMixedSoundStates GetMixedSoundStates()
void SetBloodTypeVisible(bool show)
void ContaminatedParticleAdjustment()
void SetEnableQuickBarEntityShortcut(EntityAI entity, bool value)
void SetRestrainPrelocked(bool restrain_prelock)
ref TransferValues m_TrasferValues
bool IsSyncedModifierActive(eModifierSyncIDs modifier)
Checks whether modifier (which has syncing enabled) is currently active, works on both Client and Ser...
float GetImmunity()
returns player's immunity strength between 0..1
float GetLastFirePointRot()
vector GetLocalProjectionPosition()
void RunFightBlendTimer()
PlayerStat< float > m_StatTremor
void ClearBloodyHandsPenaltyChancePerAgent(eAgents type)
bool m_IsRestrainStartedLocal
override void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
override void EEDelete(EntityAI parent)
override void OnJumpEnd(int pLandType=0)
override void OnCommandVehicleStart()
override bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
void UnsetInEffectAreaTypeFlag(EEffectAreaType flag)
void PlacingCancelServer()
PlayerStat< float > GetStatHeatComfort()
Hologram GetHologramServer()
ref HeatComfortAnimHandler m_HCAnimHandler
override void EEItemDetached(EntityAI item, string slot_name)
ItemBase CreateCopyOfItemInInventory(ItemBase src)
ref TInputActionMap m_InputActionMapControled
int GetCraftingRecipeID()
ref NotifiersManager m_NotifiersManager
StaminaHandler GetStaminaHandler()
void SpawnDamageDealtEffect2(Param param1=null, Param param2=null)
float GetStatBordersToxicity()
PlayerStats GetPlayerStats()
void SetLiftWeapon(bool state, float obstruct=0)
override bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
SymptomIDs GetActivePrimarySymptomID()
void AdjustShemag(EntityAI item, string slot_name)
void OnCommandHandlerTick(float delta_time, int pCurrentCommandID)
void ResetPlayer(bool set_max)
override bool PredictiveTakeToDst(notnull InventoryLocation src, notnull InventoryLocation dst)
PlayerStat< float > GetStatHeatBuffer()
float GetVisibilityCoef()
override bool IsInFBEmoteState()
void ProcessHandDamage(float delta_time, HumanMovementState pState)
PlayerSoundEventHandler GetPlayerSoundEventHandler()
ref Timer m_AnalyticsTimer
override SoundOnVehicle PlaySound(string sound_name, float range, bool create_local=false)
ref FlashbangEffect m_FlashbangEffect
bool IsPersistentFlag(PersistentFlag bit)
void EndSurrenderRequest(SurrenderData data=null)
ends surrender, originally intended for surrender->restrained transitioning
void AddPlayerLoad(float addedload)
PlayerStat< float > GetStatToxicity()
void PlacingCompleteServer()
void PreloadDecayTexture()
override void OnVehicleSeatDriverLeft()
static ref array< CargoBase > SPREAD_AGENTS_PROXY_CARGOS
override void AfterStoreLoad()
EStatLevels GetStatLevelEnergy()
override void OnFreezeStateChangeClient()
bool m_PlayerDisconnectProcessed
ref ShockDealtEffect m_ShockDealtEffect
override int GetQuickBarBonus()
override void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
void SetInEffectAreaTypeFlag(EEffectAreaType flag)
ref PlayerSoundManagerServer m_PlayerSoundManagerServer
void OnQuickBarSingleUse(int slotClicked)
override void SimulateDeath(bool state)
int GetBreathVapourLevel()
void DropAllItems()
Drops all clothes/wearables this character is carrying on themselves.
void RemoveActiveNV(int type)
PluginPresenceNotifier m_PresenceNotifier
ref UndergroundHandlerClient m_UndergroundHandler
void CloseInventoryMenu()
static set< int > GetFaceCoverageShaveValues()
returns a set of face covering values
float m_OriginalSlidePoseAngle
bool CanSpawnBreathVaporEffect()
EUndergroundPresence m_UndergroundPresence
void OnVoiceEventPlayback(PlayerSoundEventBase voice_event, AbstractWave callback, float playback_time)
called every cmd handler tick during a playback of PlayerSoundEvent, m_ProcessPlaybackEvent needs to ...
PlayerStat< int > GetStatWet()
override bool CanStartConsumingStamina(EStaminaConsumers consumer)
override void OnJumpStart()
BleedingSourcesManagerServer GetBleedingManagerServer()
override bool IsIgnoredByConstruction()
bool IsRestrainPrelocked()
ShockDealtEffect GetShockEffect()
const int ACT_STORE_SAVE_VERSION
int m_ContaminatedAreaCount
ref BleedingSourcesManagerServer m_BleedingManagerServer
override void SetInventorySoftLock(bool status)
'soft lock' meaning inventory screen cannot be displayed, but mechanically, inventory operations are ...
void MessageFriendly(string text)
void DecreaseAntibioticsCount()
float GetSingleAgentCountNormalized(int agent_id)
void SetDrowning(bool enable)
EffectSound m_AmbientContamination
void AddMedicalDrugsInUse(EMedicalDrugsType drugType)
override void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
SyncJunctures.
override void OnCommandSwimFinish()
void SetBloodyHandsEx(eBloodyHandsTypes type)
void UpdateQuickBarExtraSlots()
override void EEHitByRemote(int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
override void OnCommandSwimStart()
ref DamageDealtEffect m_DamageDealtEffect
vector m_LocalProjectionOrientation
ref ModifiersManager m_ModifiersManager
void OnBleedingSourceRemoved()
override bool IsWeaponObstructionBlockingADS()
void SetQuickRestrain(bool enable)
bool TakeEntityToInventoryImpl(InventoryMode mode, FindInventoryLocationType flags, notnull EntityAI item)
override void OnCommandFallFinish()
ref Timer m_UALastMessageTimer
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
float GetStatBordersBlood()
PlayerStat< float > m_StatEnergy
static ref array< Object > SPREAD_AGENTS_OBJECTS
bool TakeEntityToTargetAttachmentImpl(InventoryMode mode, notnull EntityAI target, notnull EntityAI item)
ref StaminaHandler m_StaminaHandler
void ResetActionEndInput()
PlayerStat< float > GetStatTremor()
void SetBrokenLegs(int stateId)
bool HandleRemoteItemManipulation(int userDataType, ParamsReadContext ctx)
void ProcessDrowning(float dT)
PlayerStat< float > m_StatWater
EPulseType GetPulseType()
eBrokenLegs GetBrokenLegs()
override void OnCommandMelee2Start()
int m_FaceCoveredForShaveLayers
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
void OnBleedingSourceAdded()
ref Param1< string > m_UAParamMessage
ref array< int > m_ProcessRemoveEffectWidgets
void IncreaseDiseaseCount()
override void ClearInventory()
/brief Delete all items in inventory
override bool IsFighting()
override bool OnStoreLoad(ParamsReadContext ctx, int version)
void OnHoldBreathExhausted()
override bool IsRefresherSignalingViable()
void SetLiquidTendencyDrain(bool state)
ref ScriptInvoker m_OnUnconsciousStart
invokers
override WeaponManager GetWeaponManager()
vector m_LocalProjectionPosition
void UpdateBrokenLegs(int stateId)
EntityAI GetMagazineToReload(EntityAI weapon)
void LockHandsUntilItemHeld()
int m_InventorySoftLockCount
void OnQuickbarSetEntityRequest(ParamsReadContext ctx)
int GetBloodyHandsPenaltyAgents()
void SetStaminaState(eStaminaState state)
bool TakeEntityAsAttachmentImpl(InventoryMode mode, notnull EntityAI item)
string m_SaySoundLastSetName
bool IsSwapBetweenHandsAndGroundLargeItem(notnull EntityAI item1, notnull EntityAI item2, out EntityAI item_hands, out EntityAI item_ground)
int GetPerformedActionID()
void SetHeatBufferDynamicMax(float value)
void SetStamina(int value, int range)
override void CheckLiftWeapon()
float GetWeightSpecialized(bool forceRecalc=false)
string GetLastUAMessage()
UA Last Message.
override bool CanChangeStance(int previousStance, int newStance)
override bool CanConsumeStamina(EStaminaConsumers consumer)
void UpdateHairSelectionVisibility(bool was_debug=false)
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)
override bool NeedInventoryJunctureFromServer(notnull EntityAI item, EntityAI currParent, EntityAI newParent)
void SpreadAgentsEx(float distance=3, float chance=0.25)
chance between [0..1] , distance in meters
ref map< eAgents, float > m_BloodyHandsPenaltyChancePerAgent
void UpdateCorpseStateVisual()
void RemoveAction(typename actionName, out TInputActionMap InputActionMap)
PlayerStat< float > GetStatDiet()
bool CanRedirectToWeaponManager(notnull EntityAI item, out bool isActionPossible)
int GetStoreLoadVersion()
override void EEItemAttached(EntityAI item, string slot_name)
EStatLevels GetStatLevelWater()
void CloseMapEx(bool cancelled)
bool IsMapCallbackCancelInput()
RandomGeneratorSyncManager m_RGSManager
eBloodyHandsTypes HasBloodyHandsEx()
void IncreaseHealingsCount()
void KillUndergroundHandler()
void OnVoiceEvent(PlayerSoundEventBase voice_event)
ref SymptomManager m_SymptomManager
bool IsMapCallbackEndInput()
void SetVisibilityCoef(float pVisibility)
override bool IsLiftWeapon()
void SetPerformedActionID(int id)
override vector GetCenter()
void SetCraftingRecipeID(int recipeID)
void SetBloodyHands(bool show)
void HideHairSelections(ItemBase item, bool state)
bool m_InsideEffectAreaPrev
ItemBase GetItemOnHead()
Returns item on player's head. For an example, a headtorch.
DayZPlayerCamera GetCurrentPlayerCamera()
void SetLastFirePointRot(float last_fire_point_rot)
ref CraftingManager m_CraftingManager
override bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
void DamageAllLegs(float inputDmg)
void QueueAddGlassesEffect(int id)
void SetRestrainStarted(bool restrain_started)
bool m_BrokenLegsJunctureReceived
bool HasBloodTypeVisible()
void SetPlayerDisconnected(bool state)
bool CanConsumeFood(ConsumeConditionData data=null)
override void OnVehicleSeatDriverEnter()
float ConvertNonlethalDamage(float damage, DamageType damageType)
override void OnThrowingModeChange(bool change_to_enabled)
ref Param1< float > m_DeathDarkeningParam
int FindQuickBarEntityIndex(EntityAI entity)
void SetContaminatedEffectEx(bool enable, int ppeIdx=-1, int aroundId=ParticleList.CONTAMINATED_AREA_GAS_AROUND, int tinyId=ParticleList.CONTAMINATED_AREA_GAS_TINY, string soundset="", bool partDynaUpdate=false, int newBirthRate=0)
void SetLifeSpanStateVisible(int show_state)
bool HasCoveredFaceForShave()
void OnPlayerReceiveFlashbangHitStart(bool visual)
EEffectAreaType m_InEffectAreaType
override void OnCommandMoveStart()
override bool StopSoundEvent(EPlayerSoundEventID id, bool is_from_server=false, int param=0)
override void EEItemOutOfHands(EntityAI item)
override bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
float GetStatLevelBorders(float stat_value, float critical, float low, float normal, float high, float max)
override void OnVariablesSynchronized()
void MapNavigationItemInPossession(EntityAI item)
void CheckZeroSoundEvent()
void SendLiftWeaponSync(bool state, float obstruct=0)
Client-side only.
override bool CanClimb(int climbType, SHumanCommandClimbResult climbRes)
void SetImmunityBoosted(bool boosted)
ScriptInvoker GetOnUnconsciousStop()
ref map< EEffectAreaType, int > m_EffectAreaOverlap
void RadialQuickBarCombine(int slotClicked)
void SetQuickBarEntityShortcut(EntityAI entity, int index, bool force=false)
bool AnimCommandCheck(HumanMoveCommandID mask)
Returns whether the specified movement command(s) are starting the next frame.
bool IsStance(int stance, int stanceMask)
override void PredictiveTakeEntityToHands(EntityAI item)
bool IsAntibioticsActive()
override bool IsLanded(int pCurrentCommandID)
bool m_LiquidTendencyDrain
GameplayEffectWidgets_base m_EffectWidgets
effect widgets
const string SOUND_BREAK_LEG
void SetActionsRemoteTarget(out TInputActionMap InputActionMap)
void SetLastUAMessage(string pMsg)
void AntibioticsAttack(float value)
ScriptInvoker GetOnUnconsciousStart()
static bool DEBUG_INVENTORY_ACCESS
void SetBloodType(int blood_type)
void QuickReloadWeapon(EntityAI weapon)
void MessageAction(string text)
ref array< string > m_DbgOptions
void SetLocalProjectionPosition(vector local_position)
Hologram GetHologramLocal()
ref Param3< float, float, bool > m_StaminaParam
override bool PredictiveTakeEntityToTargetInventory(notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
override bool IsManagingArrows()
void OnCameraChanged(DayZPlayerCameraBase new_camera)
void SetMixedSoundState(eMixedSoundStates state)
ref BleedingSourcesManagerRemote m_BleedingManagerRemote
static ref array< Man > m_ServerPlayers
void UpdateMovementInertia()
Update movement inertia based on stamina available.
override void ProcessLiftWeapon()
override bool PredictiveTakeEntityToTargetCargo(notnull EntityAI target, notnull EntityAI item)
int m_ForceInjuryAnimMask
int GetSingleAgentCount(int agent_id)
AbstractWave SaySoundSet(string name)
ref array< int > m_ActiveNVTypes
ItemBase GetItemInHands()
bool OnStoreLoadLifespan(ParamsReadContext ctx, int version)
ref ShockHandler m_ShockHandler
ActionManagerBase m_ActionManager
override bool IsUnconscious()
void OnPlayerIsNowInsideEffectAreaBeginServer()
void SetLocalProjectionOrientation(vector local_orientation)
BleedingSourcesManagerRemote GetBleedingManagerRemote()
bool m_InventorySoftLocked
void UpdateShoulderProxyVisibility(EntityAI item, string slot_name)
void AddAction(typename actionName, out TInputActionMap InputActionMap)
void SetMapClosingSyncSet(bool state)
void ReloadWeapon(EntityAI weapon, EntityAI magazine)
string m_UALastMessage
user actions & symptoms
EStatLevels GetStatLevelBlood()
PlayerStat< float > GetStatWater()
void OnInventoryMenuOpen()
override void ProcessFeetDamageServer(int pUserInt)
bool DropItem(ItemBase item)
override float GetWeaponObstruction()
void OnJumpOutVehicleFinish(float carSpeed)
void SetToDelete(ParamsReadContext pCtx)
RandomGeneratorSyncManager GetRandomGeneratorSyncManager()
ref array< ref Param2< EntityAI, int > > m_aQuickBarLoad
bool GetFlagTendencyRaise()
DEPRECATED.
void RefreshHandAnimationState(int delay=0)
void RemoveAction(typename actionName)
override bool CanReceiveItemIntoHands(EntityAI item_to_hands)
EntityAI FindCargoByBaseType(string searched_item)
bool m_IsHeadingRestricted
override void OnCommandFallStart()
float GetTotalAgentCount()
void SetInColdArea(bool state)
void SetQuickFishing(bool enable)
ref SoftSkillsManager m_SoftSkillsManager
void OnUnconsciousStop(int pCurrentCommandID)
ItemBase GetItemOnSlot(string slot_type)
Returns item that's on this player's attachment slot. Parameter slot_type should be a string from con...
bool m_AllowQuickRestrain
DebugMonitorValues GetDebugMonitorValues()
override void EOnFrame(IEntity other, float timeSlice)
int m_LocalRefreshAnimStateIdx
void OnPlayerIsNowInsideEffectAreaEndClient()
PluginPlayerStatus m_ModulePlayerStatus
bool IsCurrentCameraAimedAtGround()
void SetBloodyHandsPenalty()
CraftingManager GetCraftingManager()
void SetBloodyHandsBase(int type)
EStatLevels GetStatLevelToxicity()
bool IsInEffectArea(EEffectAreaType area)
int GetNoisePresenceInAI()
Return actual noise presence of player.
static ref TStringArray m_QBarItems
void SetMapOpen(bool state)
ref SoundObjectBuilder m_SaySoundBuilder
override void OnCommandLadderFinish()
bool TakeEntityToTargetInventoryImpl(InventoryMode mode, notnull EntityAI target, FindInventoryLocationType flags, notnull EntityAI item)
void HandleBrokenLegsSync()
QuickBarBase m_QuickBarBase
float m_LastPostFrameTickTime
void SpawnBreathVaporEffect()
MapNavigationBehaviour GetMapNavigationBehaviour()
override void OnGameplayDataHandlerSync()
void ResetConstructionActionData()
float GetStatBordersHealth()
ref PlayerAgentPool m_AgentPool
void PlacingStartLocal(ItemBase item)
void SetHitPPEEnabled(bool enabled)
void OnScheduledTick(float deltaTime)
void OnVehicleSwitchSeat(int seatIndex)
Static component of PPE manager, used to hold the instance.
static PPEManager GetPPEManager()
Returns the manager instance singleton.
void Start(Param par=null)
Base Param Class with no parameters.
Legacy way of using particles in the game.
static const int DROWNING_BUBBLES
static const int BREATH_VAPOUR_MEDIUM
static const int CONTAMINATED_AREA_GAS_TINY
static const int CONTAMINATED_AREA_GAS_AROUND
static const int BREATH_VAPOUR_HEAVY
static const int BREATH_VAPOUR_LIGHT
Keeps track of agents and their simulation.
override void OnGameplayDataHandlerSync()
static const float SL_HEALTH_HIGH
static const float BROKEN_LEGS_ROLL_SHOCK
static const float BROKEN_LEGS_HIGH_SHOCK_WALK
static const float SL_BLOOD_LOW
static const int LAST_UA_MSG_LIFETIME
static const float IMMUNITY_THRESHOLD_LEVEL_LOW
static const float UNCONSCIOUS_IN_WATER_TIME_LIMIT_TO_DEATH
static const float THRESHOLD_HEAT_COMFORT_MINUS_WARNING
static const int DROWNING_BUBBLE_FREQUENCY_MIN
static const float DROWNING_SWIMMING_THRESHOLD
static const float BROKEN_CROUCH_MODIFIER
static const float BAREFOOT_MOVEMENT_BLEED_MODIFIER
static const float MELEE2_MOVEMENT_BLEND_DELAY
static const float SL_BLOOD_CRITICAL
static const float SL_ENERGY_NORMAL
static const float IMMUNITY_THRESHOLD_LEVEL_NORMAL
static const float SL_HEALTH_CRITICAL
static const float HEALTH_REGEN_MIN
static const float SL_ENERGY_CRITICAL
static const float SL_WATER_MAX
static const float SL_ENERGY_HIGH
static const float SHOES_MOVEMENT_DAMAGE_PER_STEP
static const float BROKEN_LEGS_SHOCK_SWIM
static const float IMMUNITY_THRESHOLD_LEVEL_HIGH
static const float BROKEN_LEGS_HIGH_HEALTH_THRESHOLD
static const float BROKEN_LEGS_MID_SHOCK_WALK
static const float BROKEN_LEGS_INITIAL_SHOCK
static const int CHECK_EVERY_N_STEP
static const int CORPSE_STATE_DECAYED
static const float CHANCE_TO_BLEED_SLIDING_LADDER_PER_SEC
static const float FULL_SPRINT_DELAY_FROM_PRONE
[seconds]
static const float HEALTH_REGEN_MAX
static const float BROKEN_LEGS_LOW_HEALTH_THRESHOLD
static const float SL_ENERGY_LOW
static const float FULL_SPRINT_DELAY_FROM_CROUCH
[seconds]
static const float SL_WATER_HIGH
static const float SL_BLOOD_HIGH
static const float DROWNING_DEFAULT_THRESHOLD
static const float THRESHOLD_HEAT_COMFORT_MINUS_CRITICAL
static const float SL_ENERGY_MAX
static const float SL_HEALTH_NORMAL
static const float BROKEN_LEGS_STAND_SHOCK
static const int BLOOD_THRESHOLD_FATAL
static const float IMMUNITY_THRESHOLD_LEVEL_CRITICAL
static const float SL_WATER_CRITICAL
static const float GLOVES_DAMAGE_SLIDING_LADDER_PER_SEC
static const float SL_WATER_LOW
static const float CAMERA_THRESHOLD_PITCH
static const float BROKEN_LEGS_LOW_SHOCK_WALK
static const int DROWNING_BUBBLE_FREQUENCY_MAX
static const float DROWNING_UNCONSCIOUS_THRESHOLD
static const float SL_BLOOD_NORMAL
static const float SL_WATER_NORMAL
static const int CORPSE_STATE_MEDIUM
static const float SL_HEALTH_LOW
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()
Manager class for managing Effect (EffectParticle, EffectSound).
static int PlayInWorld(notnull Effect eff, vector pos)
Play an Effect.
static int PlayOnObject(notnull Effect eff, Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_relative_to_world=false)
Play an Effect.
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
static bool IsEffectExist(int effect_id)
Checks whether an Effect ID is registered in SEffectManager.
ScriptInvoker Class provide list of callbacks usage:
void SetSelectionState(bool state)
ref array< int > GetTranslatedSelections()
proto bool Write(void value_out)
proto bool Read(void value_in)
string m_CharacterId
character ID
string m_Reason
reason of disconnect (quit, kick, ban, sign-out...)
int m_DaytimeHour
current daytime in gameplay (hour in 24h format)
vector m_PositionEnd
player world position at the end of interval
int m_TimeInterval
amount of real time in seconds covered by this event
vector m_PositionStart
player world position at the start of interval
float m_DistanceOnFoot
traveled distance on foot (meters) during interval
string m_CharacterId
character ID
static float GetParamFloat(string surface_name, string param_name)
static void SendEntityKilled(EntityAI victim, EntityAI killer, EntityAI source, bool is_headshot)
proto native float GetDamage(string zoneName, string healthType)
Native class for boats - handles physics simulation.
proto native float SyncedValue_ID(int action, bool check_focus=true)
Get action state.
proto native void CloseDialog()
UIScriptedMenu FindMenu(int id)
Returns menu with specific ID if it is open (see MenuID).
proto native bool IsDialogVisible()
bool IsMenuOpen(int id)
Returns true if menu with specific ID is opened (see MenuID).
static void ApplyEffects(PlayerBase player)
static const float HEAT_DAMAGE_TICK_TIME
bool CanAttachMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
bool CanSwapMagazine(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
bool CanLoadBullet(Weapon_Base wpn, Magazine mag, bool reservationCheck=true)
void SetCalcDetails(string details)
Keeps information about currently loaded world, like temperature.
float GetLiquidTypeEnviroTemperature(int liquidType)
void SetGlobalLighting(int lightingID)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool simple=true)
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
proto float Normalize()
Normalizes vector.
proto native float LengthSq()
Returns squared length (magnitudeSqr).
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
DamageType
exposed from C++ (do not change)
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
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)
ref HumanMovementState m_MovementState
movement state
void DayZPlayerCameraOptics(DayZPlayer pPlayer, HumanInputController pInput)
override bool OnInventoryCheck(int userDataType, ParamsReadContext ctx)
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
void DayZPlayerUtils()
cannot be instantiated
DisplayElementBase GetElement(eDisplayElements element_id)
void VirtualHud(PlayerBase player)
bool Consume(float amount, PlayerBase consumer)
void EmoteManager(PlayerBase player)
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void Environment(PlayerBase pPlayer)
bool IsProcessing()
returns true when FP is heating or cooling
proto native float GetMax()
Serializer ParamsReadContext
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal
Serializer ParamsWriteContext
proto GizmoApi GetGizmoApi()
const int AGT_UACTION_CONSUME
const int AGT_AIRBOURNE_BIOLOGICAL
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
proto native void SetPosition(vector position)
Set the world position of the Effect.
const float DZPLAYER_CAMERA_FOV_IRONSIGHTS
const int INVENTORY_ENTITY_DROP_OVERLAP_DEPTH
const int DEFAULT_CHARACTER_MENU_ID
const float REFRESHER_RADIUS
const float NL_DAMAGE_FIREARM_CONVERSION_PLAYERS
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
void Obsolete(string msg="")
class array< Class T > PrintString
EntityEvent
Entity events for event-mask, or throwing event from code.
static const float ITEM_TEMPERATURE_NEUTRAL_ZONE_MIDDLE
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float AbsFloat(float f)
Returns absolute value.
static const float RAD2DEG
static proto float Sin(float angle)
Returns sinus of angle in radians.
static proto int AbsInt(int i)
Returns absolute value.
const int SAT_DEBUG_ACTION
SetSoundControllerOverride(string controllerName, float value, SoundControllerAction action)
Overrides or limits soundmap value for a sound cotroller.
vector GetPosition()
Get the world position of the Effect.
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class SoundObject SoundParams(string name)
proto native int Length()
Returns length of string.
proto void GetHourMinuteSecond(out int hour, out int minute, out int second)
Returns system time.
proto native bool IsCLIParam(string param)
Returns if command line argument is present.
proto native Hive GetHive()
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native bool IsModifierActive()
is modifier active
proto native bool IsInWater()
proto native float GetWeaponObstruction()
return obstruction value
class HumanCommandMelee2 HumanCommandFall()
class HumanCommandWeapons HumanCommandAdditives()
class HumanItemBehaviorCfg OnItemInHandsChanged(bool pInstant=false)
signalization from script to engine that item in hands changed
void InjuryAnimationHandler(PlayerBase player)
FindInventoryLocationType
flags for searching locations in inventory
InventoryLocationType
types of Inventory Location
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override void InsertAgent(int agent, float count=1)
class ItemBase extends InventoryItem SpawnItemOnLocation(string object_name, notnull InventoryLocation loc, bool full_quantity)
static string GetDisplayName(int liquid_type)
void MapNavigationBehaviour(PlayerBase pPlayer, EMapNavigationType pNavigationType=EMapNavigationType.BASIC)
bool OnStoreLoad(ParamsReadContext ctx, int version)
void ModifiersManager(PlayerBase player)
void NotifiersManager(PlayerBase player)
VirtualHud GetVirtualHud()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor).
void PlayerSoundEventHandler(PlayerBase player)
void PlayerSoundManagerClient(PlayerBase player)
void PlayerStat(T min, T max, T init, string label, int flags)
bool LoadStats(ParamsReadContext ctx, int version)
void PlayerStats(Man player)
void PlayerStomach(PlayerBase player)
PluginConfigDebugProfile m_ConfigDebugProfile
void PluginItemDiagnostic()
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
PluginBase GetPlugin(typename plugin_type)
void PluginPresenceNotifier()
EPresenceNotifierNoiseEventType
void QuickBarBase(PlayerBase player)
void RandomGeneratorSyncManager(DayZPlayer player)
const float DEFAULT_SPAWN_DISTANCE
void ReplaceSoundEventHandler(PlayerBase player)
StaminaHandler m_StaminaHandler
void UndergroundHandlerClient(PlayerBase player)