72 static const int DEAD_SCREEN_DELAY = 1000;
73 static const float DEFAULT_DYING_TIME = 2.5;
74 static const float DYING_PROGRESSION_TIME = 0.05;
132 protected bool m_RaiseStarted =
false;
133 protected bool m_AimingFinisherStarted =
false;
140 protected bool m_PullPlayerOutOfVehicleKeepsInLocalSpace =
false;
141 protected int m_PullPlayerOutOfVehicleState = -1;
149 m_SprintFull =
false;
159 m_ADSAutomationTimer =
new Timer();
161 m_WeaponRaiseCompleted =
false;
163 m_IsShootingFromCamera =
true;
164 m_ProcessFirearmMeleeHit =
false;
165 m_ContinueFirearmMelee =
false;
166 m_WasIronsight =
true;
167#ifdef PLATFORM_CONSOLE
168 m_Camera3rdPerson = !
GetGame().GetWorld().Is3rdPersonDisabled();
170 m_LastSurfaceUnderHash = (
"cp_gravel").Hash();
171 m_NextVoNNoiseTime = 0;
173 m_CurrentWaterLevel = 0;
174 m_WeaponRaiseTime = 0;
176 RegisterNetSyncVariableBoolSignal(
"m_TriggerPullPlayerOutOfVehicleSynch");
181 return m_AimingModel;
191 return m_MeleeFightLogic;
216 return m_CameraEyeZoomLevel;
221 return m_IsShootingFromCamera;
226 m_IsShootingFromCamera =
pState;
231 return m_CameraIronsight;
236 return m_CameraOptics;
241 return m_Camera3rdPerson;
246 m_Camera3rdPerson =
state;
260 return m_IsTryingHoldBreath;
273 m_WeaponDebug =
null;
278 return m_WeaponDebug !=
null;
288 return m_CurrentWaterLevel;
300 m_WasIronsight = m_CameraIronsight;
302 m_CameraIronsight =
value;
314 m_CameraOptics =
value;
320 hcw.SetADS(!IsHandheldOpticsInUse());
334 SetIronsights(
false);
338 SwitchOptics(
optics,
false);
351 if (
optic.HasEnergyManager())
352 optic.GetCompEM().SwitchOn();
354 optic.OnOpticEnter();
360 if (
optic.HasEnergyManager())
361 optic.GetCompEM().SwitchOff();
365 if (m_CameraOptics !=
state)
371 m_ClimbingLadderType =
value;
400 return m_isFBsymptomPlaying;
413 int m_DeathAnimType = -2;
414 float m_DeathHitDir = 0;
415 bool m_DeathJuctureSent =
false;
421 text +=
"IsSimulationDisabled: " + GetIsSimulationDisabled() +
"\n";
455 TriggerPullPlayerOutOfVehicleImpl();
466 DisableSimulation(
false);
474 m_PullPlayerOutOfVehicleState = 0;
475 m_TriggerPullPlayerOutOfVehicleSynch =
true;
482 if (m_TriggerPullPlayerOutOfVehicleSynch && !
GetGame().IsDedicatedServer())
483 TriggerPullPlayerOutOfVehicleImpl();
485 super.OnVariablesSynchronized();
492 switch (m_PullPlayerOutOfVehicleState)
497 m_PullPlayerOutOfVehicleState = -1;
511 if (m_DeathAnimType != -2 &&
g_Game.GetMissionState() ==
g_Game.MISSION_STATE_GAME)
513 if (!CommitedSuicide())
515 int type = m_DeathAnimType;
519 m_WasInVehicle =
false;
523 m_TransportCache =
hcv.GetTransport();
524 m_WasInVehicle = !
hcv.IsGettingIn() && !
hcv.IsGettingOut();
528 if (IsUnconscious() || m_WasInVehicle)
530 if (m_TransportCache)
532 m_TransportCache.CrewDeath(m_TransportCache.CrewMemberIndex(
this));
533 m_TransportCache.MarkCrewMemberDead(m_TransportCache.CrewMemberIndex(
this));
538 if (m_TransportCache)
540 m_TransportCache.CrewGetOut(m_TransportCache.CrewMemberIndex(
this));
541 m_TransportCache.MarkCrewMemberDead(m_TransportCache.CrewMemberIndex(
this));
547 DisableSimulation(
false);
549 m_TransportCache =
null;
559 GetGame().GetWorld().SetVoiceOn(
false,
false);
598 if (m_DeathJuctureSent)
602 m_DeathJuctureSent =
true;
607 SendDeathJuncture(-1, 0);
615 if (show && IsPlayerSelected())
622 if (!
GetGame().GetMission().IsPlayerRespawning())
623 message =
"#dayz_implement_dead";
625#ifdef PLATFORM_CONSOLE
645 if (m_DeathEffectTimer && m_DeathEffectTimer.IsRunning())
647 m_DeathEffectTimer.Stop();
648 m_DeathEffectTimer =
null;
654 if (
g_Game.GetMissionState() != DayZGame.MISSION_STATE_GAME)
661 float duration = DEFAULT_DYING_TIME;
662 if (m_KilledByHeadshot)
665 if (
duration > DYING_PROGRESSION_TIME && !m_IsUnconscious)
667 if (!m_DeathEffectTimer)
671 m_DeathEffectTimer.Run(DYING_PROGRESSION_TIME,
this,
"SetDeathDarknessLevel",
par,
true);
676 GetGame().GetSoundScene().SetSoundVolume(0, 0);
677 GetGame().GetSoundScene().SetSpeechExVolume(0, 0);
678 GetGame().GetSoundScene().SetMusicVolume(0, 0);
679 GetGame().GetSoundScene().SetVOIPVolume(0, 0);
680 GetGame().GetSoundScene().SetRadioVolume(0, 0);
684 StopDeathDarkeningEffect();
685 ShowDeadScreen(
state, 0);
699 GetGame().GetUIManager().ShowUICursor(
true);
700 if (
GetGame().GetUIManager().IsDialogVisible())
701 GetGame().GetUIManager().CloseDialog();
712 if (
GetGame().GetUIManager().GetMenu())
713 GetGame().GetUIManager().ShowUICursor(
true);
715 GetGame().GetUIManager().ShowUICursor(
false);
726 m_WeaponRaiseTime = 0;
727 m_WeaponRaiseCompleted =
true;
732 m_WeaponRaiseTime = 0;
733 m_WeaponRaiseCompleted =
false;
738 return m_WeaponRaiseCompleted;
752 Error(
"DayZPlayer: OnInputForRemote - cannot read input type");
759 GetDayZPlayerInventory().OnEventForRemoteWeapon(
ctx);
762 GetDayZPlayerInventory().OnHandEventForRemote(
ctx);
765 GetDayZPlayerInventory().OnInputUserDataForRemote(
ctx);
778 Error(
"DayZPlayer: OnInputFromServer - cannot read input type");
785 GetDayZPlayerInventory().OnServerInventoryCommand(
ctx);
832 m_IsTryingHoldBreath =
true;
834 m_IsTryingHoldBreath =
false;
836 if (
pInputs.IsFireModeChange())
837 GetWeaponManager().SetNextMuzzleMode();
840 if (
optic && (
optic.IsInOptics() ||
optic.IsUsingWeaponIronsightsOverride()))
841 optic.StepZeroingUp();
843 weapon.StepZeroingUpAllMuzzles();
847 if (
optic && (
optic.IsInOptics() ||
optic.IsUsingWeaponIronsightsOverride()))
848 optic.StepZeroingDown();
850 weapon.StepZeroingDownAllMuzzles();
853 if (!m_LiftWeapon_player && (m_CameraIronsight || !
weapon.CanEnterIronsights() || m_CameraOptics))
861 m_IsFireWeaponRaised =
false;
865 ResetWeaponRaiseProgress();
871 m_IsFireWeaponRaised =
true;
872 if (!IsWeaponRaiseCompleted())
873 m_WeaponRaiseTime +=
pDt;
876 CompleteWeaponRaise();
880 if (GetWeaponManager().CanFire(
weapon))
887 if (
pInputs.IsAttackButtonDown() && GetInputInterface().
SyncedValue(
"UAWeaponMeleeAttack") == 0 && GetInputInterface().
SyncedValue(
"UAHeavyMeleeAttack") == 0)
888 GetWeaponManager().Fire(
weapon);
897 if (
pInputs.IsAttackButton() && GetInputInterface().
SyncedValue(
"UAWeaponMeleeAttack") == 0 && GetInputInterface().
SyncedValue(
"UAHeavyMeleeAttack") == 0)
900 GetWeaponManager().Fire(
weapon);
911 GetWeaponManager().Fire(
weapon);
916 GetWeaponManager().Fire(
weapon);
923#ifdef PLATFORM_CONSOLE
924 if (
GetGame().
GetInput().LocalRelease(
"UAFire",
false) || m_ShouldReload)
926 if (!
weapon.IsWaitingForActionFinish() && !IsFighting())
932 if (
weapon.CanProcessWeaponEvents())
934 if (GetWeaponManager().CanEjectBullet(
weapon))
936 GetWeaponManager().EjectBullet();
938 m_ShouldReload =
false;
944 m_ShouldReload =
true;
966 if (
weapon && m_CameraIronsight && !m_CameraOptics)
968 SetIronsights(
false);
969 SwitchOptics(
optic,
true);
970 optic.SetStepFOVIndex(0);
972 else if (m_CameraOptics)
976 if (!
optic.StepFOVUp())
980 optic.SetStepFOVIndex(0);
985 SwitchOptics(
optic,
false);
1003 if (!
optic.StepFOVDown())
1015 SwitchOptics(
optic,
false);
1016 pInputs.ResetFreeLookToggle();
1017 SetIronsights(
true);
1023 SwitchOptics(
optic,
true);
1037 bool m_DamageHitFullbody =
false;
1038 int m_DamageHitAnimType = -1.0;
1039 float m_DamageHitDir = 0.0;
1040 float m_DamageHealth = 0.0;
1042 const float HIT_INTERVAL_MIN = 0.3;
1043 float m_HitElapsedTime = HIT_INTERVAL_MIN;
1054 m_DamageHitAnimType = -1;
1056 if (!m_SyncedHitDataArray || m_SyncedHitDataArray.Count() == 0)
1062 for (
int i = 0;
i < m_SyncedHitDataArray.Count();
i++)
1064 data = m_SyncedHitDataArray[
i];
1065 m_DamageHitDir =
data.m_HitDir;
1071 m_DamageHealth =
data.m_HealthDamage;
1072 if (m_DamageHealth > 0.0)
1075 GetGame().GetMission().GetHud().SpawnHitDirEffect(
this, m_DamageHitDir,
rel);
1083 else if (
data.m_Fullbody)
1087 m_SyncedHitDataArray.Clear();
1088 m_DamageHealth = 0.0;
1106 if (m_HitElapsedTime < HIT_INTERVAL_MIN)
1108 m_HitElapsedTime += m_dT;
1109 ResetDamageHitState(
false);
1115 if (m_DamageHitAnimType != -1 && m_TransportCache ==
null && !CommitedSuicide())
1121 ResetDamageHitState(
true);
1127 ResetDamageHitState(
false);
1137 m_DamageHitAnimType = -1;
1138 m_DamageHitFullbody =
false;
1141 m_HitElapsedTime = 0;
1191 if (!IsUnconscious() &&
pAnimType == 1 && !m_MeleeFightLogic.IsInBlock())
1198 if (!IsUnconscious() && GetHealth(
"",
"Shock") > 25)
1256 m_TransportHitRegistered =
false;
1265 if (!m_DeathSyncSent)
1272 m_KillerData.m_Killer =
killer;
1273 m_KillerData.m_MurderWeapon =
source;
1281 m_KilledByHeadshot =
true;
1282 if (m_KillerData.m_Killer ==
killer)
1283 m_KillerData.m_KillerHiTheBrain =
true;
1319 float m_fLastHeadingDiff = 0;
1332 m_fLastHeadingDiff = 0;
1338 if (
hmv.IsGettingOut() ||
hmv.IsGettingIn())
1341 m_fLastHeadingDiff = 0;
1347 if (!
hcu.IsWakingUp())
1349 m_fLastHeadingDiff = 0;
1357 m_fLastHeadingDiff = 0;
1372 m_fLastHeadingDiff = 0;
1380 if (
hcm.IsStandingFromBack())
1382 m_fLastHeadingDiff = 0;
1408 if (
hcm.IsFinisher())
1410 if (!m_AimingFinisherStarted)
1412 m_AimingModel.OnFinisherBegin(
pModel.m_fCurrentAimY);
1413 m_AimingFinisherStarted =
true;
1415 m_AimingModel.ProcessStealthFilters(
pDt,
pModel);
1423 if (!m_RaiseStarted)
1425 m_AimingModel.OnRaiseBegin(
this);
1426 m_RaiseStarted =
true;
1433 m_RaiseStarted =
false;
1434 m_AimingFinisherStarted =
false;
1448 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1454 if (
IsRaised() && GetInputInterface().SyncedPress(
"UAGetOverControllerHelper"))
1458 if (!
hibcfg.m_bJumpAllowed)
1467 if (
hcm.IsChangingStance())
1476 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1482 if (
IsRaised() && GetInputInterface().SyncedPress(
"UAGetOverControllerHelper"))
1486 if (!
hibcfg.m_bJumpAllowed)
1514 GetDayZPlayerInventory().CancelHandEvent();
1519 GetDayZPlayerInventory().CancelWeaponEvent();
1524 GetDayZPlayerInventory().AbortWeaponEvent();
1535 if (m_CameraIronsight || m_CameraOptics)
1551 if (m_ResetADS || !
hia.IsItemInHandsWeapon())
1559 ResetWeaponRaiseProgress();
1564 if (m_bADS !=
hic.WeaponADS())
1566 m_bADS =
hic.WeaponADS();
1570 if (m_bADS && !m_CameraIronsight && !m_CameraOptics)
1573 if (!IsWeaponRaiseCompleted())
1585 if (
hia.IsItemInHandsWeapon() &&
playerPB.GetItemInHands() &&
playerPB.GetItemInHands().IsWeapon() &&
playerPB.GetWeaponManager() && !
playerPB.GetWeaponManager().IsRunning())
1603 if (IsLiftWeapon() || !
IsRaised() || GetDayZPlayerInventory().
IsProcessing() || !IsWeaponRaiseCompleted() || IsFighting())
1609 m_WasIronsight =
false;
1611 m_WasIronsight =
true;
1615 hic.ResetFreeLookToggle();
1616 SwitchOptics(
optic,
false);
1617 SetIronsights(
true);
1621 SetIronsights(
false);
1622 SwitchOptics(
optic,
true);
1627 if (
hcw && (m_CameraOptics))
1644 if (m_CameraIronsight || m_CameraOptics)
1660 if (
GetGame().GetWorld().Is3rdPersonDisabled())
1661 m_Camera3rdPerson =
false;
1663 m_Camera3rdPerson = !m_Camera3rdPerson;
1666 if (m_LiftWeapon_player && (m_CameraOptics || m_CameraIronsight))
1670 GetDayZPlayerType().SetVerticalMinimumAimLimit(DayZPlayerCameraIronsights.CONST_UD_MIN_BACK);
1672 GetDayZPlayerType().SetVerticalMinimumAimLimit(DayZPlayerCameraIronsights.CONST_UD_MIN);
1679 else if (!IsClimbingLadder() && !IsSwimming() && !IsInVehicle())
1719 if (m_SoundOffset > 0.25)
1720 m_SoundOffset = 0.25;
1722 string soundSetName =
"Cloth_Body_longmove_TShirt_Soundset";
1731 string path =
"CfgSoundTables CfgAttachmentSoundTables Cloth_Body_Longmove_LookupTable";
1762 wave.SetStartOffset(m_SoundOffset);
1765 m_LastBackSoundTime =
GetGame().GetTime();
1778 if (m_SoundOffset < 0.1)
1779 m_SoundOffset = 0.1;
1780 if (m_SoundOffset > 0.3)
1781 m_SoundOffset = 0.3;
1783 string soundSetName2 =
"walkProne_noHS_asphalt_ext_Char_SoundSet";
1790 string path2 =
"CfgSoundTables CfgStepSoundTables walkProne_noHS_Char_LookupTable";
1821 wave2.SetStartOffset(m_SoundOffset);
1824 m_LastBackSoundTime2 =
GetGame().GetTime();
1901 GetUApi().ActivateModificator(
"aiming");
1903 GetUApi().DeactivateModificator(
"aiming");
1913 if (
isWeapon && (!m_ProcessFirearmMeleeHit || !m_ContinueFirearmMelee))
1915 m_ProcessFirearmMeleeHit =
false;
1919 else if (IsHandheldOpticsInUse() && m_CameraOptics &&
opticInHands)
1931 OnMovementChanged();
1946 int crew_index = m_TransportCache.CrewMemberIndex(
this);
1949 m_TransportCache =
null;
1964 if (m_Swimming.m_bWasSwimming)
1972 if (GetHumanInventory().GetEntityInHands())
1991 if (
hcv.WasGearChange())
1994 cb.SetVehicleCommand(
hcv);
2005 m_SprintedTime +=
pDt;
2006 if (m_SprintedTime > m_SprintedTimePerStanceMin)
2008 m_SprintFull =
true;
2012 m_SprintFull =
false;
2016 m_SprintedTime = 0.0;
2017 m_SprintFull =
false;
2024 m_JumpClimb.CheckAndFinishJump();
2059 npar = type.GetNoiseParamsLandLight();
2070 npar = type.GetNoiseParamsLandLight();
2077 npar = type.GetNoiseParamsLandHeavy();
2084 npar = type.GetNoiseParamsLandHeavy();
2089 OnPlayerRecievedHit();
2119 hcls.m_fFwMaxDistance = 3;
2121 hcls.m_fFwMaxDistance = 1.2;
2133 if (
hic.IsJumpClimb())
2135 m_JumpClimb.JumpOrClimb();
2137 if (m_JumpClimb.WasSuccessful())
2155 ad.SetTalking(
true);
2161 if (
now >= m_NextVoNNoiseTime)
2163 m_NextVoNNoiseTime =
now + 1000;
2173 vonpar =
pt.GetNoiseParamsWhisper();
2189 ad.SetTalking(
false);
2204 if (m_MeleeFightLogic.CanFight())
2208 m_ProcessFirearmMeleeHit =
isWeapon && (
hic.IsMeleeWeaponAttack() || m_ProcessFirearmMeleeHit) || m_ContinueFirearmMelee;
2227 float m_TestDamageCounter = -1;
2228 float m_DebugDirectionVal = -180;
2229 bool m_DebugTypeVal =
false;
2231 int m_DebugWeaponChangeStage = 0;
2246 if (m_DebugWeaponChangeStage == 0)
2252 if (
playerDebug.IsWeaponChange(m_DebugWeaponChangeItem,
hideSlot, m_DebugWeaponChangeShowSlot))
2259 m_DebugWeaponChangeStage = 1;
2262 else if (m_DebugWeaponChangeStage == 1)
2279 if (m_DebugWeaponChangeItem !=
"")
2289 m_DebugWeaponChangeStage = 2;
2293 else if (m_DebugWeaponChangeStage == 2)
2296 if (
w3 &&
w3.IsActionFinished())
2297 m_DebugWeaponChangeStage = 0;
2304 if (m_TestDamageCounter >= 0)
2306 if (m_TestDamageCounter > 3)
2308 m_DebugDirectionVal = m_DebugDirectionVal + 90;
2309 m_TestDamageCounter = 0;
2311 if (m_DebugDirectionVal > 90)
2313 m_DebugDirectionVal = -180;
2314 m_DebugTypeVal = !m_DebugTypeVal;
2331 m_TestDamageCounter +=
pDt;
2345 ad.SetInjured(
v,
true);
2350 ad.SetExhaustion(
v,
true);
2365 if (!m_LiftWeapon_player)
2375 if (m_CameraOptics &&
optics)
2377 else if (m_CameraIronsight &&
weapon)
2385 if (m_Camera3rdPerson && m_IsWeapon && m_IsRaised &&
hic &&
hic.WeaponADS())
2394 if (!m_Camera3rdPerson)
2407 return transport.Get3rdPersonCameraType();
2424 if (m_JumpClimb.m_bIsJumpInProgress)
2561 Error(
"DayZPlayerImplement: cannot read input type");
2608 if (m_DeathAnimType == -2)
2615 m_SyncedHitDataArray.Insert(
data);
2625 switch (
boots.GetAttachmentSoundType())
2653 case "LeatherJacket":
2657 case "ChemlonDress":
2674 switch (
back.GetAttachmentSoundType())
2792 if (surface.
Length() == 0)
2798 if (surface.
Length() == 0)
2802 if (surface.
Length() != 0)
2803 m_LastSurfaceUnderHash = surface.
Hash();
2809 string surface2 = GetSurfaceType();
2811 m_LastSurfaceUnderHash =
surface2.Hash();
2831 for (
int j = 0;
j < type.GetVegetationSounds().
Count(); ++
j)
2879 Debug.
Log(
string.Format(
"Wrong stance, id: %1 using backup with stand stance (id: 0)",
state.m_iStanceIdx));
2935 if (
item.HasQuantity())
2949 if (!
GetGame().IsDedicatedServer())
2955 builder.AddVariable(
"interior", IsSoundInsideBuilding());
3008 if (m_ClimbingLadderType ==
"wood")
3045 if (!
GetGame().IsDedicatedServer())
3170 return CheckForTakeItem(
item);
3183 if (!IsAlive() ||
player.IsUnconscious())
3197 Print(
"ERPCs.RPC_DAYZPLAYER_DEBUGSERVERWALK");
3217 return fall.PhysicsLanded();
3247 if (!m_MoveSettings)
3249 if (m_MoveSettings.m_fSlidingPoseAngle !=
value)
3251 m_MoveSettings.m_fSlidingPoseAngle =
value;
3267 return m_PlayerSelected;
3322 m_HandheldOpticsInUse =
state;
3327 return m_HandheldOpticsInUse;
3347 return CanPickupHeavyItem(
item1) && CanPickupHeavyItem(
item2);
3350#ifdef DIAG_DEVELOPER
3353 return Weapon_Base.Cast(GetHumanInventory().CreateInHands(type));
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
proto native CEApi GetCEApi()
Get the CE API.
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DamageType
exposed from C++ (do not change)
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
proto native void ResetDeathCooldown()
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
ref HumanMovementState m_MovementState
movement state
class DeathEffectTimer extends Timer OnSimulationEnd
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
void DayZPlayerMeleeFightLogic_LightHeavy(DayZPlayerImplement player)
void DayZPlayerUtils()
cannot be instantiated
void OnRPC(ParamsReadContext ctx)
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
proto void AddNoise(EntityAI source_entity, NoiseParams noise_params, float external_strenght_multiplier=1.0)
class NoiseSystem NoiseParams()
void PlayerSoundEventHandler(PlayerBase player)
void PluginDayzPlayerDebug()
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
class SoundObjectBuilder SoundObject(SoundParams soundParams)
void SoundObjectBuilder(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
Super root of all classes in Enforce script.
static const int DAYZCAMERA_OPTICS
optics
static const int DAYZCAMERA_1ST
1st person camera
static const int DAYZCAMERA_3RD_PRO_RAISED
3rd - laying raised
static const int DAYZCAMERA_3RD_CLIMB
climb / vault
static const int DAYZCAMERA_3RD_CRO_RAISED
3rd - crouch
static const int DAYZCAMERA_3RD_ERC_SPR
3rd - standing sprint
static const int DAYZCAMERA_3RD_PRO
3rd - laying
static const int DAYZCAMERA_3RD_ERC
3rd - standing
static const int DAYZCAMERA_IRONSIGHTS
ironsights camera
static const int DAYZCAMERA_3RD_CRO
3rd - crouch
static const int DAYZCAMERA_3RD_ERC_RAISED
3rd - standing raised
static const int DAYZCAMERA_1ST_UNCONSCIOUS
unconscious
static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE
3rd - laying raised
static const int DAYZCAMERA_1ST_VEHICLE
vehicle 1st person
static const int DAYZCAMERA_3RD_JUMP
jump
override void OnSimulationEnd()
override bool ShouldSimulationBeDisabled()
void ProcessSoundEvent(string pEventType, string pUserString, int pUserInt)
void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
bool IsWeaponDebugEnabled()
void ResetWeaponRaiseProgress()
void SendSoundEventEx(EPlayerSoundEventID id, int param=0)
DayZPlayerImplementThrowing GetThrowing()
void LockControls(bool state)
override void StopDeathDarkeningEffect()
override bool IsShootingFromCamera()
bool m_IsUnconsciousFalling
bool m_HandheldOpticsInUse
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
void OverrideShootFromCamera(bool pState)
WeaponManager GetWeaponManager()
void SendCompleteWeaponRaiseJuncture()
AnimBackType GetBackAttachmentType()
void ShowDeadScreen(bool show, float duration)
void OverrideSlidePoseAngle(float value)
movement sliding override, originally for FB gestures
bool IsWeaponRaiseCompleted()
ref DayZPlayerImplementJumpClimb m_JumpClimb
bool m_WeaponRaiseCompleted
measures time from the weapon raise start to complete raise (once per)
bool IsTryingHoldBreath()
void ResetDamageHitState(bool resetTimer)
void SetFallYDiff(float value)
bool IsLanded(int pCurrentCommandID)
void CompleteWeaponRaise()
float m_SprintedTimePerStanceMin
void OnSoundEvent(string pEventType, string pUserString, int pUserInt)
void ShowWeaponDebug(bool show)
bool m_ShouldBeUnconscious
void SetIronsights(bool value)
void TriggerPullPlayerOutOfVehicle()
ref Timer m_ADSAutomationTimer
bool IsFBSymptomPlaying()
AbstractWave ProcessVoiceEvent(string pEventType, string pUserString, int pUserInt)
bool CheckForRespawn(EntityAI item)
override bool IsEyeZoom()
Legacy.
bool m_IsShootingFromCamera
void ProcessAttachmentEvent(string pEventType, string pUserString, int pUserInt)
void RequestSoundEventEx(EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
float GetSlidePoseAngle()
void OnParticleEvent(string pEventType, string pUserString, int pUserInt)
void ~DayZPlayerImplement()
bool HandleDamageHit(int pCurrentCommandID)
void SetIsInThirdPerson(bool state)
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void SetSuicide(bool state)
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void HandleWeapons(float pDt, Entity pInHands, HumanInputController pInputs, out bool pExitIronSights)
ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
void EOnContact(IEntity other, Contact extra)
void CheckAnimationOverrides()
AbstractWave PlaySound(SoundObject so, SoundObjectBuilder sob)
bool m_IsFireWeaponRaised
ref DayZPlayerImplementAiming m_AimingModel
void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
bool m_ProcessLiftWeaponState
string GetSurfaceType(SurfaceAnimationBone limbType)
ref DeathEffectTimer m_DeathEffectTimer
void SetClimbingLadderType(string value)
ref DayZPlayerImplementThrowing m_Throwing
override float GetCurrentWaterLevel()
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void HideClothing(ItemOptics optic, bool state)
bool CanPickupHeavyItemSwap(notnull EntityAI item1, notnull EntityAI item2)
override void SetCurrentWaterLevel(float pWaterLevel)
void TriggerPullPlayerOutOfVehicleImpl()
bool m_ContinueFirearmMelee
bool m_TriggerPullPlayerOutOfVehicleSynch
bool IsAlreadyInFallingCommand(int pCurrentCommandID)
int m_LastCommandBeforeUnconscious
bool IsInFBEmoteState()
Checks if fullbody animation or specific locked state is active in emote manager.
bool CanConsumeStamina(EStaminaConsumers consumer)
Implementations only! - used on PlayerBase.
bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
override void OnItemInHandsChanged()
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
override int CameraHandler(int pCameraMode)
int m_DebugWeaponChangeShowSlot
override int GetEyeZoomLevel()
string m_DebugWeaponChangeItem
bool CanStartConsumingStamina(EStaminaConsumers consumer)
bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
override bool IsInThirdPerson()
void ProcessFeetDamageServer(int pUserInt)
void SetVariablesLadderSoundObjectBuilder(SoundObjectBuilder soundObjectBuilder)
DayZPlayerImplementMeleeCombat GetMeleeCombat()
void SetHandheldOpticsInUse(bool state)
ref array< ref SyncHitInfo > m_SyncedHitDataArray
void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
DayZPlayerImplementFallDamage GetFallDamage()
ref WeaponDebug m_WeaponDebug
float m_LastHeadingAngleBlock
void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
void AttenuateSoundIfNecessary(SoundObject soundObject)
bool m_ProcessWeaponRaiseCompleted
void EvaluateDamageHit(int pCurrentCommandID)
Must be ran at the start of CommandHandler before Jump is triggered.
void OnMovementChanged()
Event, called when HumanMovementState.m_iMovement changes...walk, run, sprint, etc....
bool CanClimb(int climbType, SHumanCommandClimbResult climbRes)
override bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
void SetOptics(bool value)
bool IsInFullbodyDamageAnimation()
void SetReturnToOptics(bool state)
ref Timer m_FightEndBlendTimer
float m_LastHeadingAngleBlock2
bool m_isFBsymptomPlaying
override void OnInputForRemote(ParamsReadContext ctx)
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
event from damage system
override void EEKilled(Object killer)
string m_ClimbingLadderType
AnimRangedWeaponType GetShoulderAttachmentType()
void CommandHandlerDebug(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
int GetTypeOfDeath(int pCurrentCommandID)
ref DayZPlayerImplementFallDamage m_FallDamage
int m_ActionSoundCategoryHash
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
bool IsHandheldOpticsInUse()
override void OnVariablesSynchronized()
int m_LastSurfaceUnderHash
AnimBootsType GetBootsType()
bool m_IsTryingHoldBreath
void SimulateDeath(bool state)
DayZPlayerInventory GetDayZPlayerInventory()
bool EvaluateDamageHitAnimation(TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos, out int pAnimType, out float pAnimHitDir, out bool pAnimHitFullbody)
selects animation type and direction based on damage system data
bool IsFireWeaponRaised()
bool HandleDeath(int pCurrentCommandID)
void DayZPlayerImplement()
constructor
bool CheckForTakeItem(EntityAI item)
override string GetDebugText()
AnimUpperBodyType GetBodyAttachmentType()
void ProcessWeaponEvent(string pEventType, string pUserString, int pUserInt)
bool CanPickupHeavyItem(notnull EntityAI item)
-------------— Checks if player can pick up heavy item ----------------------—
bool m_ProcessFirearmMeleeHit
SHumanCommandMoveSettings m_MoveSettings
void OnJumpEnd(int pLandType=0)
void AddNoise(NoiseParams noisePar, float noiseMultiplier=1.0)
DayZPlayerImplementAiming GetAimingModel()
float m_DeathDarkeningCurrentTime
bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
bool CheckForDropItem(EntityAI item)
void HandleOptic(notnull ItemOptics optic, bool inHands, HumanInputController pInputs, out bool pExitOptics)
bool EvaluateDeathAnimation(int pDamageType, EntityAI pSource, string pAmmoType, out int pAnimType, out float pAnimHitDir)
selects animation type and direction based on damage system data
float m_CurrentWaterLevel
void OnStepEvent(string pEventType, string pUserString, int pUserInt)
void ResetDeathStartTime()
override bool AimingModel(float pDt, SDayZPlayerAimingModel pModel)
DayZPlayerMeleeFightLogic_LightHeavy GetMeleeFightLogic()
void SendSoundEvent(EPlayerSoundEventID id)
void SwitchOptics(ItemOptics optic, bool state)
void OnInputUserDataReceived(ParamsReadContext ctx)
override void CommandHandler(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
override void OnInputFromServer(ParamsReadContext ctx)
ref DayZPlayerImplementSwimming m_Swimming
void SetDeathDarknessLevel(float duration, float tick_time)
ECameraZoomType m_CameraEyeZoomLevel
Transport m_TransportCache
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool RotateOrient(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static void SendDamageHitEx(DayZPlayer pPlayer, int pType, float pHitDir, bool pFullbody, TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos)
static const int SJ_DEATH
static bool ReadDamageHitParamsEx(ParamsReadContext pCtx, out SyncHitInfo pData)
static void SendDeath(DayZPlayer pPlayer, int pType, float pHitDir)
static const int SJ_DAMAGE_HIT
static bool ReadDeathParams(ParamsReadContext pCtx, out int pType, out float pHitDir)
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.
proto static native bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
provides access to slot configuration
static bool IsSyncLogEnable()
static float GetNoiseMultiplier(DayZPlayerImplement playerImplement)
static void SetMultiplayState(bool state)
static const float WEAPON_RAISE_BLEND_DELAY
static const float FULL_SPRINT_DELAY_DEFAULT
static const float HEAVY_HIT_THRESHOLD
static const int CHECK_EVERY_N_STEP
The class that will be instanced (moddable)
Serialization general interface. Serializer API works with:
Base native class for all motorized wheeled vehicles.
script counterpart to engine's class Weapon
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
void SDayZPlayerHeadingModel()
cannot be created from script
void ForceStandUpForHeavyItems(notnull EntityAI item)
-------------— Forces player to stand up when swapping to heavy item ----------------------—
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
proto native DayZPlayerInstanceType GetInstanceType()
proto native float IsPlayerSpeaking()
-------------— speaking anim ----------------------—
DayZPlayerConstants
defined in C++
int GetEyeZoomLevel()
returns eye zoom level, uses ECameraZoomType values
bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Acos(float c)
Returns angle in radians from cosinus.
static proto int AbsInt(int i)
Returns absolute value.
static const float RAD2DEG
static proto float AbsFloat(float f)
Returns absolute value.
proto native int Length()
Returns length of string.
proto native int Hash()
Returns hash of string.
proto native void GetMovementState(HumanMovementState pState)
returns movement state (current command id, )
proto native int GetCurrentCommandID()
returns current command ID (see DayZPlayerConstants.COMMANDID_...)
proto native HumanCommandDamage AddCommandModifier_Damage(int pType, float pDirection)
— modifier for light Damages
proto native HumanCommandMelee2 GetCommand_Melee2()
proto native HumanCommandVehicle StartCommand_Vehicle(Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious=false)
--— VEHICLE --—
proto native HumanCommandMove GetCommand_Move()
proto native HumanCommandFall StartCommand_Fall(float pYVelocity)
--— FALL --—
proto native HumanCommandMove StartCommand_Move()
--— MOVE --—
proto native void PhysicsSetSolid(bool pSolid)
proto native bool PhysicsIsFalling(bool pValidate)
returns true if physics controller is falling
proto native HumanCommandFullBodyDamage StartCommand_Damage(int pType, float pDirection)
--— FullBody Damages --—
proto native HumanCommandWeapons GetCommandModifier_Weapons()
returns interface for handling weapons
proto native HumanCommandVehicle GetCommand_Vehicle()
proto native HumanCommandFall GetCommand_Fall()
proto native HumanCommandActionCallback AddCommandModifier_Action(int pActionID, typename pCallbackClass)
adds action command modifier, creates callback instance for you
proto native HumanCommandUnconscious GetCommand_Unconscious()
proto native HumanCommandDeathCallback StartCommand_Death(int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave=false)
--— Death --—
proto native HumanCommandLadder GetCommand_Ladder()
proto native HumanCommandFullBodyDamage GetCommand_Damage()
proto native void PhysicsSetRagdoll(bool pEnable)
Sets and synchronize interaction layers 'RAGDOLL' and 'RAGDOLL_NO_CHARACTER' to prevent body stacking...
class HumanCommandMelee2 HumanCommandFall()
proto native HumanInputController GetInputController()
returns human input controller
proto native HumanCommandSwim StartCommand_Swim()
--— LADDER --—
proto native HumanItemAccessor GetItemAccessor()
proto native HumanCommandAdditives GetCommandModifier_Additives()
default (always-on modifiers)
proto native bool IsLeavingUncon()
return true if character transitions out of uncon
class HumanCommandWeapons HumanCommandAdditives()
class SHumanGlobalSettings SHumanCommandMoveSettings()
class SHumanCommandSwimSettings SHumanCommandClimbSettings()