DayZ 1.24
Loading...
Searching...
No Matches
DayZPlayer Class Reference
Collaboration diagram for DayZPlayer:
[legend]

Protected Member Functions

void DayZPlayerImplement ()
 constructor
 
DayZPlayerImplementAiming GetAimingModel ()
 
DayZPlayerImplementMeleeCombat GetMeleeCombat ()
 
DayZPlayerMeleeFightLogic_LightHeavy GetMeleeFightLogic ()
 
DayZPlayerImplementThrowing GetThrowing ()
 
DayZPlayerImplementFallDamage GetFallDamage ()
 
void ~DayZPlayerImplement ()
 
override bool IsEyeZoom ()
 Legacy.
 
override int GetEyeZoomLevel ()
 
override bool IsShootingFromCamera ()
 
void OverrideShootFromCamera (bool pState)
 
bool IsInIronsights ()
 
bool IsInOptics ()
 
override bool IsInThirdPerson ()
 
void SetIsInThirdPerson (bool state)
 
bool IsFireWeaponRaised ()
 
bool IsTryingHoldBreath ()
 
bool IsSprintFull ()
 
void ShowWeaponDebug (bool show)
 
bool IsWeaponDebugEnabled ()
 
void SetFallYDiff (float value)
 
override float GetCurrentWaterLevel ()
 
override void SetCurrentWaterLevel (float pWaterLevel)
 
void SetIronsights (bool value)
 
void SetOptics (bool value)
 
void ExitSights ()
 
void SwitchOptics (ItemOptics optic, bool state)
 
void SetClimbingLadderType (string value)
 
bool CanConsumeStamina (EStaminaConsumers consumer)
 Implementations only! - used on PlayerBase.
 
bool CanStartConsumingStamina (EStaminaConsumers consumer)
 
void DepleteStamina (EStaminaModifiers modifier, float dT=-1)
 
bool IsInVehicle ()
 
bool IsSwimming ()
 
bool IsClimbingLadder ()
 
bool PlaySoundEvent (EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
 
bool PlaySoundEventEx (EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
 
bool IsFBSymptomPlaying ()
 
float GetDeltaT ()
 
override string GetDebugText ()
 
void TriggerPullPlayerOutOfVehicle ()
 
void TriggerPullPlayerOutOfVehicleImpl ()
 
override void OnVariablesSynchronized ()
 
bool HandleDeath (int pCurrentCommandID)
 
void ResetDeathStartTime ()
 
int GetTypeOfDeath (int pCurrentCommandID)
 
void SendDeathJuncture (int pAnimTypeDeath, float pAnimHitDirDeath)
 
override void EEKilled (Object killer)
 
void ShowDeadScreen (bool show, float duration)
 
override void StopDeathDarkeningEffect ()
 
void SimulateDeath (bool state)
 
void LockControls (bool state)
 
void SetDeathDarknessLevel (float duration, float tick_time)
 
void SendCompleteWeaponRaiseJuncture ()
 
void CompleteWeaponRaise ()
 
void ResetWeaponRaiseProgress ()
 
bool IsWeaponRaiseCompleted ()
 
DayZPlayerInventory GetDayZPlayerInventory ()
 
override void OnInputForRemote (ParamsReadContext ctx)
 
override void OnInputFromServer (ParamsReadContext ctx)
 
void RequestSoundEvent (EPlayerSoundEventID id, bool from_server_and_client=false)
 
void RequestSoundEventEx (EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
 
void SendSoundEvent (EPlayerSoundEventID id)
 
void SendSoundEventEx (EPlayerSoundEventID id, int param=0)
 
override void OnItemInHandsChanged ()
 
WeaponManager GetWeaponManager ()
 
void HandleWeapons (float pDt, Entity pInHands, HumanInputController pInputs, out bool pExitIronSights)
 
void HandleOptic (notnull ItemOptics optic, bool inHands, HumanInputController pInputs, out bool pExitOptics)
 
bool IsInFullbodyDamageAnimation ()
 
void EvaluateDamageHit (int pCurrentCommandID)
 Must be ran at the start of CommandHandler before Jump is triggered.
 
bool HandleDamageHit (int pCurrentCommandID)
 
void ResetDamageHitState (bool resetTimer)
 
bool EvaluateDeathAnimation (int pDamageType, EntityAI pSource, string pAmmoType, out int pAnimType, out float pAnimHitDir)
 selects animation type and direction based on damage system data
 
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
 
override void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
 event from damage system
 
override bool HeadingModel (float pDt, SDayZPlayerHeadingModel pModel)
 
override bool AimingModel (float pDt, SDayZPlayerAimingModel pModel)
 
bool CanJump ()
 
bool CanClimb (int climbType, SHumanCommandClimbResult climbRes)
 
void OnJumpStart ()
 
void OnJumpEnd (int pLandType=0)
 
void StopHandEvent ()
 
void StopWeaponEvent ()
 
void AbortWeaponEvent ()
 
void HandleADS ()
 
void HandleView ()
 
bool ModCommandHandlerBefore (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
bool ModCommandHandlerInside (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
bool ModCommandHandlerAfter (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
override void CommandHandler (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
void HideClothing (ItemOptics optic, bool state)
 
void CommandHandlerDebug (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
override int CameraHandler (int pCameraMode)
 
void OnMovementChanged ()
 Event, called when HumanMovementState.m_iMovement changes...walk, run, sprint, etc..
 
void OnSprintStart ()
 
void OnSprintEnd ()
 
void OnInputUserDataReceived (ParamsReadContext ctx)
 
bool OnInputUserDataProcess (int userDataType, ParamsReadContext ctx)
 
void OnSyncJuncture (int pJunctureID, ParamsReadContext pCtx)
 
AnimBootsType GetBootsType ()
 
AnimUpperBodyType GetBodyAttachmentType ()
 
AnimBackType GetBackAttachmentType ()
 
AnimRangedWeaponType GetShoulderAttachmentType ()
 
string GetSurfaceType (SurfaceAnimationBone limbType)
 
AbstractWave PlaySound (SoundObject so, SoundObjectBuilder sob)
 
void AddNoise (NoiseParams noisePar, float noiseMultiplier=1.0)
 
void OnStepEvent (string pEventType, string pUserString, int pUserInt)
 
void OnSoundEvent (string pEventType, string pUserString, int pUserInt)
 
void OnParticleEvent (string pEventType, string pUserString, int pUserInt)
 
void ProcessWeaponEvent (string pEventType, string pUserString, int pUserInt)
 
void ProcessAttachmentEvent (string pEventType, string pUserString, int pUserInt)
 
void SetVariablesLadderSoundObjectBuilder (SoundObjectBuilder soundObjectBuilder)
 
void ProcessSoundEvent (string pEventType, string pUserString, int pUserInt)
 
AbstractWave ProcessVoiceEvent (string pEventType, string pUserString, int pUserInt)
 
void ProcessFeetDamageServer (int pUserInt)
 
bool CheckForTakeItem (EntityAI item)
 
bool CheckForDropItem (EntityAI item)
 
bool CheckForRespawn (EntityAI item)
 
bool IsLanded (int pCurrentCommandID)
 
bool OnLand (int pCurrentCommandID, FallDamageData fallDamageData)
 
bool IsAlreadyInFallingCommand (int pCurrentCommandID)
 
void OverrideSlidePoseAngle (float value)
 movement sliding override, originally for FB gestures
 
float GetSlidePoseAngle ()
 
void CheckAnimationOverrides ()
 
bool IsPlayerSelected ()
 
bool IsRestrained ()
 
bool IsInFBEmoteState ()
 Checks if fullbody animation or specific locked state is active in emote manager.
 
void SetSuicide (bool state)
 
bool CommitedSuicide ()
 
void OnLadder (float delta_time, HumanMovementState pState)
 called every command handler tick when player is on ladder
 
void EOnContact (IEntity other, Contact extra)
 
void AttenuateSoundIfNecessary (SoundObject soundObject)
 
void CheckLiftWeapon ()
 
void ProcessLiftWeapon ()
 
void SetHandheldOpticsInUse (bool state)
 
bool IsHandheldOpticsInUse ()
 
bool IsLiftWeapon ()
 
bool IsRaised ()
 
bool IsFighting ()
 
bool CanPickupHeavyItem (notnull EntityAI item)
 -------------— Checks if player can pick up heavy item ----------------------—
 
bool CanPickupHeavyItemSwap (notnull EntityAI item1, notnull EntityAI item2)
 
void SetReturnToOptics (bool state)
 
void RunADSTimer ()
 
void StopADSTimer ()
 

Protected Attributes

ref DayZPlayerImplementAiming m_AimingModel
 
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
 
ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
 
ref DayZPlayerImplementSwimming m_Swimming
 
ref DayZPlayerImplementThrowing m_Throwing
 
ref DayZPlayerImplementJumpClimb m_JumpClimb
 
ref DayZPlayerImplementFallDamage m_FallDamage
 
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
 
SHumanCommandMoveSettings m_MoveSettings
 
float m_FallYDiff
 
float m_SprintedTime
 
float m_SprintedTimePerStanceMin
 
bool m_SprintFull
 
bool m_IsRaised
 
bool m_ShouldReload
 
bool m_Camera3rdPerson
 
bool m_CameraZoomToggle
 
bool m_bADS
 
bool m_WeaponRaiseCompleted
 measures time from the weapon raise start to complete raise (once per)
 
ECameraZoomType m_CameraEyeZoomLevel
 
bool m_WasIronsight
 
bool m_CameraIronsight
 
bool m_CameraOptics
 
float m_DeathDarkeningCurrentTime
 
bool m_IsTryingHoldBreath
 
bool m_IsShootingFromCamera
 
bool m_PlayerSelected
 
bool m_Suicide
 
bool m_IsUnconscious
 
bool m_ShouldBeUnconscious
 
bool m_IsUnconsciousFalling
 
bool m_UnconsciousDebug
 
int m_LastCommandBeforeUnconscious
 
ref WeaponDebug m_WeaponDebug
 
ref DeathEffectTimer m_DeathEffectTimer
 
ref Timer m_FightEndBlendTimer
 
bool m_ProcessFirearmMeleeHit
 
bool m_ContinueFirearmMelee
 
bool m_LiftWeapon_player
 
bool m_ProcessLiftWeapon
 
bool m_ProcessLiftWeaponState
 
int m_LastSurfaceUnderHash
 
Transport m_TransportCache
 
string m_ClimbingLadderType
 
bool m_isFBsymptomPlaying
 
bool m_HandheldOpticsInUse
 
bool m_ResetADS
 
int m_StepCounter
 
int m_NextVoNNoiseTime
 
ref array< ref SyncHitInfom_SyncedHitDataArray
 
bool m_RaiseStarted = false
 
bool m_AimingFinisherStarted = false
 
bool m_IsWeapon
 
bool m_TriggerPullPlayerOutOfVehicleSynch
 
bool m_PullPlayerOutOfVehicleKeepsInLocalSpace = false
 
int m_PullPlayerOutOfVehicleState = -1
 
int m_ActionSoundCategoryHash
 
float m_dT
 
int m_DeathAnimType = -2
 
float m_DeathHitDir = 0
 
bool m_DeathJuctureSent = false
 
bool m_DamageHitFullbody = false
 
int m_DamageHitAnimType = -1.0
 
float m_DamageHitDir = 0.0
 
float m_DamageHealth = 0.0
 
const float HIT_INTERVAL_MIN = 0.3
 
float m_HitElapsedTime = HIT_INTERVAL_MIN
 
float m_fLastHeadingDiff = 0
 
float m_LastHeadingAngleBlock
 
float m_LastHeadingAngleBlock2
 
float m_LastHeadingAngle
 
int m_LastBackSoundTime
 
int m_LastBackSoundTime2
 
float m_SoundOffset
 
float m_TestDamageCounter = -1
 
float m_DebugDirectionVal = -180
 VKOSTIK - tady dat 0 misto -1.
 
bool m_DebugTypeVal = false
 
int m_DebugWeaponChangeStage = 0
 
string m_DebugWeaponChangeItem
 
int m_DebugWeaponChangeShowSlot
 
bool m_CameraEyeZoom
 
ref Timer m_ADSAutomationTimer
 
bool m_ADSTimerLaunched
 
bool m_ProcessWeaponRaiseCompleted
 
bool m_IsFireWeaponRaised
 

Private Attributes

ref HumanMovementState m_MovementState = new HumanMovementState()
 time step for gradual update of dead screen visibilibty up to full visbility [s]
 
float m_WeaponRaiseTime
 
float m_CurrentWaterLevel
 
bool m_WasInVehicle
 

Static Private Attributes

static const int DEAD_SCREEN_DELAY = 1000
 
static const float DEFAULT_DYING_TIME = 2.5
 DEPRECATED.
 
static const float DYING_PROGRESSION_TIME = 0.05
 how long does it take to full death screen [s]
 

Detailed Description

Definition at line 70 of file DayZPlayerImplement.c.

Constructor & Destructor Documentation

◆ ~DayZPlayerImplement()

void DayZPlayer::~DayZPlayerImplement ( )
inlineprotected

Definition at line 204 of file DayZPlayerImplement.c.

205 {
206 }

Member Function Documentation

◆ AbortWeaponEvent()

void DayZPlayer::AbortWeaponEvent ( )
inlineprotected

Definition at line 1522 of file DayZPlayerImplement.c.

1523 {
1524 GetDayZPlayerInventory().AbortWeaponEvent();
1525 }
DayZPlayerInventory GetDayZPlayerInventory()

◆ AddNoise()

void DayZPlayer::AddNoise ( NoiseParams noisePar,
float noiseMultiplier = 1.0 )
inlineprotected

Definition at line 2766 of file DayZPlayerImplement.c.

2767 {
2768 if (noisePar != null)
2769 GetGame().GetNoiseSystem().AddNoise(this, noisePar, noiseMultiplier);
2770 }
proto native CGame GetGame()

References GetGame().

◆ AimingModel()

override bool DayZPlayer::AimingModel ( float pDt,
SDayZPlayerAimingModel pModel )
inlineprotected

This Aiming Model

Definition at line 1402 of file DayZPlayerImplement.c.

1403 {
1405 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_MELEE2)
1406 {
1408 if (hcm.IsFinisher())
1409 {
1411 {
1412 m_AimingModel.OnFinisherBegin(pModel.m_fCurrentAimY);
1414 }
1415 m_AimingModel.ProcessStealthFilters(pDt, pModel);
1416 }
1417
1418 return true;
1419 }
1420
1421 if (m_MovementState.IsRaised())
1422 {
1423 if (!m_RaiseStarted)
1424 {
1425 m_AimingModel.OnRaiseBegin(this);
1426 m_RaiseStarted = true;
1427 }
1428 m_AimingModel.ProcessAimFilters(pDt, pModel, m_MovementState.m_iStanceIdx);
1429
1430 return true;
1431 }
1432
1433 m_RaiseStarted = false;
1435
1436 return true;
1437 }
ref DayZPlayerImplementAiming m_AimingModel
ref HumanMovementState m_MovementState
time step for gradual update of dead screen visibilibty up to full visbility [s]
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native void GetMovementState(HumanMovementState pState)
returns movement state (current command id, )
proto native HumanCommandMelee2 GetCommand_Melee2()

References GetCommand_Melee2(), GetMovementState(), and m_MovementState.

◆ AttenuateSoundIfNecessary()

void DayZPlayer::AttenuateSoundIfNecessary ( SoundObject soundObject)
inlineprotected

Definition at line 3309 of file DayZPlayerImplement.c.

3310 {
3311 if (GetGame().GetPlayer() != NULL && (IsSoundInsideBuilding() != GetGame().GetPlayer().IsSoundInsideBuilding() || IsCameraInsideVehicle() != GetGame().GetPlayer().IsCameraInsideVehicle()))
3312 soundObject.SetKind(WaveKind.WAVEATTALWAYS);
3313 else
3314 soundObject.SetKind(WaveKind.WAVEEFFECTEX);
3315 }
PlayerBase GetPlayer()
WaveKind
Definition Sound.c:2

References GetGame(), and GetPlayer().

◆ CameraHandler()

override int DayZPlayer::CameraHandler ( int pCameraMode)
inlineprotected

This is main camera selection logic

ironsights

get movement state

VKOSTIK: v ostatnich commandech mimo COMMANDID_MOVE je m_MovementState.m_iStanceIdx - DayZPlayerConstants.STANCEIDX_ERECT m_MovementState.m_iMovement = 0 (idle)

COMMANDID_ACTION returns stance right - ERECT/CROUCH

melee camera - not melee - stays in stance camera

special handling to allow the camera to fully blend before transitioning to the raised one

Definition at line 2362 of file DayZPlayerImplement.c.

2363 {
2366 {
2368 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
2370 if (weapon)
2371 optics = weapon.GetAttachedOptics();
2372 else if (entityInHands)
2374
2375 if (m_CameraOptics && optics)
2377 else if (m_CameraIronsight && weapon)
2379 }
2380
2381 // If the logic above doesn't reach optics nor ironsights camera,
2382 // yet weapon is still raised and ads is wanted, enforce 1pv camera
2383 // as this will reduce erratic behaviour of camera switching in 3pv
2385 if (m_Camera3rdPerson && m_IsWeapon && m_IsRaised && hic && hic.WeaponADS())
2387
2388 //uncon
2389 if (GetCurrentCommandID() == DayZPlayerConstants.COMMANDID_UNCONSCIOUS)
2391
2393
2394 if (!m_Camera3rdPerson)
2395 {
2396 if (vehicleCommand)
2398
2400 }
2401 else
2402 {
2403 if (vehicleCommand)
2404 {
2405 Transport transport = vehicleCommand.GetTransport();
2406 if (transport && GetParent())
2407 return transport.Get3rdPersonCameraType();
2408 }
2409
2412
2416
2418
2420
2421 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_CLIMB)
2423
2424 if (m_JumpClimb.m_bIsJumpInProgress)
2426
2427 int targetStanceIndex = m_MovementState.m_iStanceIdx;
2428
2431 if (commandMove && commandMove.IsChangingStance() && m_MovementState.IsRaised())
2432 targetStanceIndex = m_MovementState.m_iStanceIdx - DayZPlayerConstants.STANCEIDX_RAISED;
2433
2434 //
2435 // normal movement cameras
2436 if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_CROUCH)
2438 else if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
2440 else if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_PRONE)
2442 else if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
2444
2445 if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_RAISEDERECT)
2446 {
2447 if (m_IsWeapon)
2449 else
2451 }
2452 else if (targetStanceIndex == DayZPlayerConstants.MOVEMENTIDX_SPRINT)
2454
2455 // DayZPlayerConstants.STANCEIDX_ERECT
2457 }
2458
2460 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
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
ref DayZPlayerImplementJumpClimb m_JumpClimb
Base native class for all motorized wheeled vehicles.
Definition Car.c:75
script counterpart to engine's class Weapon
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:389
proto native int GetCurrentCommandID()
returns current command ID (see DayZPlayerConstants.COMMANDID_...)
proto native HumanCommandMove GetCommand_Move()
proto native HumanCommandVehicle GetCommand_Vehicle()
proto native HumanInputController GetInputController()
returns human input controller

References Class::CastTo(), DayZPlayerCameras::DAYZCAMERA_1ST, DayZPlayerCameras::DAYZCAMERA_1ST_UNCONSCIOUS, DayZPlayerCameras::DAYZCAMERA_1ST_VEHICLE, DayZPlayerCameras::DAYZCAMERA_3RD_CLIMB, DayZPlayerCameras::DAYZCAMERA_3RD_CRO, DayZPlayerCameras::DAYZCAMERA_3RD_CRO_RAISED, DayZPlayerCameras::DAYZCAMERA_3RD_ERC, DayZPlayerCameras::DAYZCAMERA_3RD_ERC_RAISED, DayZPlayerCameras::DAYZCAMERA_3RD_ERC_RAISED_MELEE, DayZPlayerCameras::DAYZCAMERA_3RD_ERC_SPR, DayZPlayerCameras::DAYZCAMERA_3RD_JUMP, DayZPlayerCameras::DAYZCAMERA_3RD_PRO, DayZPlayerCameras::DAYZCAMERA_3RD_PRO_RAISED, DayZPlayerCameras::DAYZCAMERA_IRONSIGHTS, DayZPlayerCameras::DAYZCAMERA_OPTICS, GetCommand_Move(), GetCommand_Vehicle(), GetCurrentCommandID(), GetInputController(), GetMovementState(), GetParent(), and m_MovementState.

◆ CanClimb()

bool DayZPlayer::CanClimb ( int climbType,
SHumanCommandClimbResult climbRes )
inlineprotected

Definition at line 1474 of file DayZPlayerImplement.c.

1475 {
1476 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1477 return false;
1478
1479 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
1480 return false;
1481
1482 if (IsRaised() && GetInputInterface().SyncedPress("UAGetOverControllerHelper")) //no raised climb on cotroller
1483 return false;
1484
1485 HumanItemBehaviorCfg hibcfg = GetItemAccessor().GetItemInHandsBehaviourCfg();
1486 if (!hibcfg.m_bJumpAllowed)
1487 return false;
1488
1489 if (climbRes)
1490 {
1492 if (Class.CastTo(entity, climbRes.m_GrabPointParent) && entity.IsHologram())
1493 return false;
1494 if (Class.CastTo(entity, climbRes.m_ClimbStandPointParent) && entity.IsHologram())
1495 return false;
1496 if (Class.CastTo(entity, climbRes.m_ClimbOverStandPointParent) && entity.IsHologram())
1497 return false;
1498 }
1499
1500 return true;
1501 }
bool IsInFBEmoteState()
Checks if fullbody animation or specific locked state is active in emote manager.
bool IsRestrained()
proto native HumanItemAccessor GetItemAccessor()

References Class::CastTo(), GetItemAccessor(), IsRaised(), and m_MovementState.

◆ CanConsumeStamina()

bool DayZPlayer::CanConsumeStamina ( EStaminaConsumers consumer)
inlineprotected

Implementations only! - used on PlayerBase.

Definition at line 375 of file DayZPlayerImplement.c.

375{};

Referenced by GetAttackTypeByWeaponAttachments(), GetAttackTypeFromInputs(), and HandleFightLogic().

◆ CanJump()

bool DayZPlayer::CanJump ( )
inlineprotected

Jump

Definition at line 1446 of file DayZPlayerImplement.c.

1447 {
1448 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1449 return false;
1450
1451 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
1452 return false;
1453
1454 if (IsRaised() && GetInputInterface().SyncedPress("UAGetOverControllerHelper")) //no raised jump on cotroller
1455 return false;
1456
1457 HumanItemBehaviorCfg hibcfg = GetItemAccessor().GetItemInHandsBehaviourCfg();
1458 if (!hibcfg.m_bJumpAllowed)
1459 return false;
1460
1461 if (!DayZPlayerUtils.PlayerCanChangeStance(this, DayZPlayerConstants.STANCEIDX_ERECT) || !DayZPlayerUtils.PlayerCanChangeStance(this, DayZPlayerConstants.STANCEIDX_RAISEDERECT))
1462 return false;
1463
1465 if (hcm)
1466 {
1467 if (hcm.IsChangingStance())
1468 return false;
1469 }
1470
1471 return true;
1472 }
void DayZPlayerUtils()
cannot be instantiated

References DayZPlayerUtils(), GetCommand_Move(), GetItemAccessor(), IsRaised(), and m_MovementState.

◆ CanPickupHeavyItem()

bool DayZPlayer::CanPickupHeavyItem ( notnull EntityAI item)
inlineprotected

-------------— Checks if player can pick up heavy item ----------------------—

Definition at line 3340 of file DayZPlayerImplement.c.

3341 {
3342 return !item.IsHeavyBehaviour() || (item.IsHeavyBehaviour() && DayZPlayerUtils.PlayerCanChangeStance(this, DayZPlayerConstants.STANCEIDX_ERECT));
3343 }

References DayZPlayerUtils().

◆ CanPickupHeavyItemSwap()

bool DayZPlayer::CanPickupHeavyItemSwap ( notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected

Definition at line 3345 of file DayZPlayerImplement.c.

3346 {
3348 }
bool CanPickupHeavyItem(notnull EntityAI item)
-------------— Checks if player can pick up heavy item ----------------------—

◆ CanStartConsumingStamina()

bool DayZPlayer::CanStartConsumingStamina ( EStaminaConsumers consumer)
inlineprotected

Definition at line 376 of file DayZPlayerImplement.c.

376{};

◆ CheckAnimationOverrides()

void DayZPlayer::CheckAnimationOverrides ( )
inlineprotected

Definition at line 3261 of file DayZPlayerImplement.c.

3262 {
3263 }

◆ CheckForDropItem()

bool DayZPlayer::CheckForDropItem ( EntityAI item)
inlineprotected

Definition at line 3159 of file DayZPlayerImplement.c.

3160 {
3161 /*
3162 bool restrained = IsRestrained(); // IsRestrained()
3163 bool unconscious = IsUnconscious(); // IsRestrained()
3164
3165 ItemBase ib = ItemBase.Cast(item);
3166 if (!IsAlive() || restrained || unconscious || ib.CanBeMovedOverride())
3167 return true;
3168 return false;
3169 */
3170 return CheckForTakeItem(item); //the two functions are currently identical
3171 }
bool CheckForTakeItem(EntityAI item)

◆ CheckForRespawn()

bool DayZPlayer::CheckForRespawn ( EntityAI item)
inlineprotected

Player respawn

Definition at line 3177 of file DayZPlayerImplement.c.

3178 {
3179 PlayerBase player = PlayerBase.Cast(this);
3180 if (!player)
3181 return true;
3182
3183 if (!IsAlive() || player.IsUnconscious())
3184 return true;
3185 return false;
3186 }

◆ CheckForTakeItem()

bool DayZPlayer::CheckForTakeItem ( EntityAI item)
inlineprotected

anti-cheat condition

Definition at line 3148 of file DayZPlayerImplement.c.

3149 {
3150 bool restrained = IsRestrained(); // IsRestrained()
3151 bool unconscious = IsUnconscious(); // IsRestrained()
3152
3153 ItemBase ib = ItemBase.Cast(item);
3154 if (ib && (PlayerBase.DEBUG_INVENTORY_ACCESS || !IsAlive() || restrained || unconscious || ib.CanBeMovedOverride()))
3155 return true;
3156 return false;
3157 }

◆ CheckLiftWeapon()

void DayZPlayer::CheckLiftWeapon ( )
protected

◆ CommandHandler()

override void DayZPlayer::CommandHandler ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected

This is main command logic

handle all Camera changes, switch + zoom

handle death with high priority

handle finished commands

default behaviour after finish is to start move

debug test script command !PSOVIS

Sprint attack limiting - player has to be in full sprint for at least 0.5s

If we are not in fall command then something else is currently running and we can safely continue here, otherwise terminate here

throwing handling

melee

Definition at line 1871 of file DayZPlayerImplement.c.

1872 {
1873 m_dT = pDt;
1874
1876 return;
1877
1879 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
1881
1882 bool isRaisedNow = m_MovementState.IsRaised();
1883 bool isWeapon = entityInHands && entityInHands.IsInherited(Weapon);
1884
1885 bool updateAimingMdfr = false;
1886 if (isWeapon != m_IsWeapon)
1887 {
1889 updateAimingMdfr = true;
1890 }
1891
1892 if (isRaisedNow != m_IsRaised)
1893 {
1894 updateAimingMdfr = true;
1895 m_IsRaised = m_MovementState.IsRaised();
1896 }
1897
1898 if (updateAimingMdfr)
1899 {
1900 if (isRaisedNow && isWeapon)
1901 GetUApi().ActivateModificator("aiming");
1902 else
1903 GetUApi().DeactivateModificator("aiming");
1904 }
1905
1906 // handle ADS ironsights/optics transition logic
1907 HandleADS();
1908
1909 // handle weapons
1910 if (hic)
1911 {
1914 {
1916 bool exitIronSights = false;
1918 }
1920 {
1921 bool exitOptic = false;
1923 }
1924 }
1925
1927 HandleView();
1928
1929 if (m_MovementState.m_iMovement != m_MovementState.m_LocalMovement)
1930 {
1932 m_MovementState.m_LocalMovement = m_MovementState.m_iMovement;
1933 }
1934
1937 return;
1938
1941 {
1942 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_UNCONSCIOUS)
1943 {
1945 {
1946 int crew_index = m_TransportCache.CrewMemberIndex(this);
1947 int seat = m_TransportCache.GetSeatAnimationType(crew_index);
1950 return;
1951 }
1952 }
1953 // start moving
1954
1955 // start falling ? (could happen after climbing)
1956 if (PhysicsIsFalling(true))
1957 {
1960 return;
1961 }
1962
1964 if (m_Swimming.m_bWasSwimming)
1965 {
1967 return;
1968 }
1969
1971
1972 if (GetHumanInventory().GetEntityInHands())
1973 ForceStandUpForHeavyItems(GetHumanInventory().GetEntityInHands());
1974
1975 return;
1976 }
1977
1978
1979 //--------------------------------------------
1981
1983 return;
1984
1985
1986 //--------------------------------------------
1987 // vehicle handling
1988 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_VEHICLE)
1989 {
1991 if (hcv.WasGearChange())
1992 {
1994 cb.SetVehicleCommand(hcv);
1995 }
1996
1997 return;
1998 }
1999
2001 //--------------------------------------------
2003 if (hcm && hcm.GetCurrentMovementSpeed() > 2.99 && m_MovementState.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SPRINT)
2004 {
2007 {
2008 m_SprintFull = true;
2010 }
2011 else
2012 m_SprintFull = false;
2013 }
2014 else
2015 {
2016 m_SprintedTime = 0.0;
2017 m_SprintFull = false;
2018 }
2019
2020 //--------------------------------------------
2021 // swimming handling
2022 if (m_Swimming.HandleSwimming(pCurrentCommandID, hcm, m_MovementState))
2023 {
2024 m_JumpClimb.CheckAndFinishJump();
2025 return;
2026 }
2027
2028 //--------------------------------------------
2029 // ladder handling
2030 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_LADDER)
2031 {
2033 return;
2034 }
2035
2036 //--------------------------------------------
2037 // climb handling
2038 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_CLIMB)
2039 return;
2040
2041 //--------------------------------------------
2042 // fall handling
2043
2045 {
2047 {
2050
2052 fallDamageData.m_Height = m_FallYDiff - GetPosition()[1];
2053
2054 // land
2055 if (fallDamageData.m_Height < 0.5)
2056 {
2057 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_NONE;
2059 npar = type.GetNoiseParamsLandLight();
2060 AddNoise(npar);
2061 }
2062 else if (fallDamageData.m_Height < 3.0)
2063 {
2064 if (m_MovementState.IsInProne() || m_MovementState.IsInRaisedProne())
2065 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_NONE;
2066 else
2067 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_LIGHT;
2068
2070 npar = type.GetNoiseParamsLandLight();
2071 AddNoise(npar);
2072 }
2073 else if (fallDamageData.m_Height < 5.0)
2074 {
2075 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_MEDIUM;
2077 npar = type.GetNoiseParamsLandHeavy();
2078 AddNoise(npar);
2079 }
2080 else
2081 {
2082 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_HEAVY;
2084 npar = type.GetNoiseParamsLandHeavy();
2085 AddNoise(npar);
2086 }
2087
2088 if (fallDamageData.m_Height >= DayZPlayerImplementFallDamage.HEALTH_HEIGHT_LOW && GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT)
2089 OnPlayerRecievedHit();
2090
2091 m_FallDamage.HandleFallDamage(fallDamageData);
2092 m_JumpClimb.CheckAndFinishJump(fallDamageData.m_LandType);
2093 }
2094
2096 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL)
2097 return;
2098 }
2099 else if (PhysicsIsFalling(false))
2100 {
2101 // Not in a falling command but the controller is falling, start default fall
2104 return;
2105 }
2106
2107 //--------------------------------------------
2108 // handle jumping
2109
2110#ifndef NO_GUI
2111#ifdef DEVELOPER
2113
2114 if (DiagMenu.GetEngineValue(DayZPlayerConstants.DEBUG_ENABLEJUMP))
2115 {
2116 SHumanCommandClimbSettings hcls = GetDayZPlayerType().CommandClimbSettingsW();
2117
2118 if (m_MovementState.m_iMovement != DayZPlayerConstants.MOVEMENTIDX_IDLE)
2119 hcls.m_fFwMaxDistance = 3;
2120 else
2121 hcls.m_fFwMaxDistance = 1.2;
2122
2124
2126 HumanCommandClimb.DoClimbTest(this, ret, 0x3);
2127 }
2128
2129#endif
2130#endif
2131
2132 // start jump
2133 if (hic.IsJumpClimb())
2134 {
2135 m_JumpClimb.JumpOrClimb();
2136
2137 if (m_JumpClimb.WasSuccessful())
2138 return;
2139 }
2140
2142
2143 bool force = false;
2144#ifndef NO_GUI
2145#ifdef DEVELOPER
2147 force = DiagMenu.GetEngineValue(DayZPlayerConstants.DEBUG_ENABLETALKING);
2148#endif
2149#endif
2150 float amplitude = IsPlayerSpeaking();
2151
2152 if (amplitude > 0.1 || force)
2153 {
2154 if (ad)
2155 ad.SetTalking(true);
2156
2157 // add noises on server
2158 if (GetGame().IsServer())
2159 {
2160 int now = GetGame().GetTime();
2161 if (now >= m_NextVoNNoiseTime)
2162 {
2163 m_NextVoNNoiseTime = now + 1000;
2164
2165 int voiceLevel = GetGame().GetVoiceLevel(this);
2167
2168 // add noise every second while talking
2170 switch (voiceLevel)
2171 {
2172 case VoiceLevelWhisper:
2173 vonpar = pt.GetNoiseParamsWhisper();
2174 break;
2175 case VoiceLevelTalk:
2176 vonpar = pt.GetNoiseParamsTalk();
2177 break;
2178 case VoiceLevelShout:
2179 vonpar = pt.GetNoiseParamsShout();
2180 break;
2181 }
2183 }
2184 }
2185 }
2186 else
2187 {
2188 if (ad)
2189 ad.SetTalking(false);
2190 }
2191
2192 //--------------------------------------------
2193 // anything whats handled by InputController
2194
2196
2197 if (hic)
2198 {
2201 m_Throwing.HandleThrowing(hic, hcw, entityInHands, pDt);
2202
2204 if (m_MeleeFightLogic.CanFight())
2205 {
2207 {
2209 return;
2210 }
2211 }
2212 }
2213
2214
2217 return;
2218 }
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
class NoiseSystem NoiseParams()
Definition Noise.c:15
proto native UAInputAPI GetUApi()
class JsonUndergroundAreaTriggerData GetPosition
void SetFallYDiff(float value)
bool IsLanded(int pCurrentCommandID)
float m_SprintedTimePerStanceMin
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void HandleWeapons(float pDt, Entity pInHands, HumanInputController pInputs, out bool pExitIronSights)
ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
ref DayZPlayerImplementThrowing m_Throwing
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
bool IsAlreadyInFallingCommand(int pCurrentCommandID)
int m_LastCommandBeforeUnconscious
bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
void OnMovementChanged()
Event, called when HumanMovementState.m_iMovement changes...walk, run, sprint, etc....
ref DayZPlayerImplementFallDamage m_FallDamage
bool HandleDeath(int pCurrentCommandID)
void AddNoise(NoiseParams noisePar, float noiseMultiplier=1.0)
void HandleOptic(notnull ItemOptics optic, bool inHands, HumanInputController pInputs, out bool pExitOptics)
ref DayZPlayerImplementSwimming m_Swimming
Transport m_TransportCache
command itself
Definition human.c:761
proto static native bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
static const float FULL_SPRINT_DELAY_DEFAULT
void DayZPlayerType()
Definition dayzplayer.c:507
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 ----------------------—
static proto int GetEngineValue(int id)
Get value at the given engine id.
proto native HumanCommandVehicle StartCommand_Vehicle(Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious=false)
--— VEHICLE --—
proto native HumanCommandFall StartCommand_Fall(float pYVelocity)
--— FALL --—
proto native HumanCommandMove StartCommand_Move()
--— MOVE --—
proto native bool PhysicsIsFalling(bool pValidate)
returns true if physics controller is falling
proto native HumanCommandWeapons GetCommandModifier_Weapons()
returns interface for handling weapons
proto native HumanCommandActionCallback AddCommandModifier_Action(int pActionID, typename pCallbackClass)
adds action command modifier, creates callback instance for you
class HumanCommandMelee2 HumanCommandFall()
Definition human.c:571
proto native HumanCommandSwim StartCommand_Swim()
--— LADDER --—
proto native HumanCommandAdditives GetCommandModifier_Additives()
default (always-on modifiers)
class HumanCommandWeapons HumanCommandAdditives()
Definition human.c:1086
class SHumanCommandSwimSettings SHumanCommandClimbSettings()

References AddCommandModifier_Action(), AddNoise(), DayZPlayerImplementFallDamage(), DayZPlayerType(), HumanCommandClimb::DoClimbTest(), ForceStandUpForHeavyItems(), PlayerConstants::FULL_SPRINT_DELAY_DEFAULT, GetCommand_Move(), GetCommand_Vehicle(), GetCommandModifier_Additives(), GetCommandModifier_Weapons(), GetDayZPlayerType(), DiagMenu::GetEngineValue(), GetGame(), GetInputController(), GetInstanceType(), GetMovementState(), GetPosition, GetUApi(), HumanCommandAdditives(), HumanCommandFall(), IsPlayerSpeaking(), m_MovementState, ModCommandHandlerAfter(), ModCommandHandlerBefore(), ModCommandHandlerInside(), NoiseParams(), PhysicsIsFalling(), SHumanCommandClimbSettings(), StartCommand_Fall(), StartCommand_Move(), StartCommand_Swim(), and StartCommand_Vehicle().

◆ CommandHandlerDebug()

void DayZPlayer::CommandHandlerDebug ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected

debug handling of adding commands

set item in hands

fuj

start show

damage test

Definition at line 2236 of file DayZPlayerImplement.c.

2237 {
2238 if (GetPluginManager())
2239 {
2241 if (playerDebug)
2242 {
2243 playerDebug.CommandHandler();
2244
2246 if (m_DebugWeaponChangeStage == 0)
2247 {
2248
2249 // debug weapon change
2250 int hideSlot;
2251
2253 {
2254 //Print("Change Weapon started: " + m_DebugWeaponChangeItem + "," + hideSlot.ToString() + "," + m_DebugWeaponChangeShowSlot.ToString());
2255
2257 w.StartAction(WeaponActions.HIDE, hideSlot);
2258
2260 }
2261 }
2262 else if (m_DebugWeaponChangeStage == 1)
2263 {
2264 // wait for weapon hide to meet event
2266 if (w2 && w2.GetRunningAction() == WeaponActions.HIDE)
2267 {
2268 if (w2.IsEvent() == WeaponEvents.CHANGE_HIDE)
2269 {
2271 //Print("Change Weapon - hidden: ");
2272
2274 PlayerBase player = PlayerBase.Cast(this);
2275 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
2276 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) && GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2277 player.PredictiveDropEntity(item_in_hands);
2278
2279 if (m_DebugWeaponChangeItem != "")
2280 {
2282 dst.SetHands(this, NULL);
2284 }
2285
2287 w2.StartAction(WeaponActions.SHOW, 3);
2288
2290 }
2291 }
2292 }
2293 else if (m_DebugWeaponChangeStage == 2)
2294 {
2296 if (w3 && w3.IsActionFinished())
2298 }
2299 }
2300 }
2301
2302
2304 if (m_TestDamageCounter >= 0)
2305 {
2306 if (m_TestDamageCounter > 3)
2307 {
2310
2311 if (m_DebugDirectionVal > 90)
2312 {
2313 m_DebugDirectionVal = -180;
2315 }
2316
2317 if (m_DebugTypeVal)
2318 {
2320 }
2321 else
2322 {
2323 StartCommand_Damage(0, m_DebugDirectionVal); // starts heavy (full body)
2324 }
2325 // 0.. types
2326 // from: -180 back, -90 left, 0 front, 90 right, 180 back
2327 //AddCommandModifier_Damage(0, directionVal); // starts light
2328 //StartCommand_Damage(0, 0); // starts heavy (full body)
2329 }
2330
2332 }
2333
2334
2335#ifndef NO_GUI
2336#ifdef DEVELOPER
2337
2338 // injury / exhaustion
2339 {
2341
2343 float v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWINJURY);
2344 if (v > 0)
2345 ad.SetInjured(v, true);
2346
2348 v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWEXHAUSTION);
2349 if (v > 0)
2350 ad.SetExhaustion(v, true);
2351 }
2352#endif
2353#endif
2354
2355 }
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
const int RF_DEFAULT
void PluginDayzPlayerDebug()
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
string m_DebugWeaponChangeItem
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
InventoryLocation.
static proto float GetEngineRangeValue(int id)
Get range value at the given engine id.
proto native HumanCommandDamage AddCommandModifier_Damage(int pType, float pDirection)
— modifier for light Damages
proto native HumanCommandFullBodyDamage StartCommand_Damage(int pType, float pDirection)
--— FullBody Damages --—
WeaponActions
actions
Definition human.c:796
WeaponEvents
events
Definition human.c:943

References AddCommandModifier_Damage(), ECE_IN_INVENTORY, GetCommandModifier_Additives(), GetCommandModifier_Weapons(), DiagMenu::GetEngineRangeValue(), GetGame(), GetPlayer(), GetPluginManager(), HumanCommandAdditives(), PluginDayzPlayerDebug(), RF_DEFAULT, SpawnEntity(), and StartCommand_Damage().

◆ CommitedSuicide()

bool DayZPlayer::CommitedSuicide ( )
inlineprotected

Definition at line 3280 of file DayZPlayerImplement.c.

3281 {
3282 return m_Suicide;
3283 }

◆ CompleteWeaponRaise()

void DayZPlayer::CompleteWeaponRaise ( )
inlineprotected

Definition at line 724 of file DayZPlayerImplement.c.

725 {
728 }
bool m_WeaponRaiseCompleted
measures time from the weapon raise start to complete raise (once per)

◆ DayZPlayerImplement()

void DayZPlayer::DayZPlayerImplement ( )
inlineprotected

constructor

Definition at line 147 of file DayZPlayerImplement.c.

148 {
149 m_SprintFull = false;
150 m_SprintedTime = 0;
160 m_bADS = false;
162 SetOptics(false);
166 m_WasIronsight = true; //initially uses ironsights by default
167#ifdef PLATFORM_CONSOLE
168 m_Camera3rdPerson = !GetGame().GetWorld().Is3rdPersonDisabled();
169#endif
170 m_LastSurfaceUnderHash = ("cp_gravel").Hash();
175
176 RegisterNetSyncVariableBoolSignal("m_TriggerPullPlayerOutOfVehicleSynch");
177 }
void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)
void DayZPlayerMeleeFightLogic_LightHeavy(DayZPlayerImplement player)
ref Timer m_ADSAutomationTimer
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
ref array< ref SyncHitInfo > m_SyncedHitDataArray
void SetOptics(bool value)

References DayZPlayerImplementFallDamage(), DayZPlayerImplementMeleeCombat(), DayZPlayerMeleeFightLogic_LightHeavy(), PlayerConstants::FULL_SPRINT_DELAY_DEFAULT, GetGame(), and m_MeleeCombat.

◆ DepleteStamina()

void DayZPlayer::DepleteStamina ( EStaminaModifiers modifier,
float dT = -1 )
inlineprotected

◆ EEHitBy()

override void DayZPlayer::EEHitBy ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprotected

event from damage system

Definition at line 1252 of file DayZPlayerImplement.c.

1253 {
1255
1256 m_TransportHitRegistered = false;
1257
1258 if (!IsAlive())
1259 {
1260 int animTypeDeath;
1261 float animHitDirDeath;
1264
1265 if (!m_DeathSyncSent) //checked until the death is evaluated by 'OnCommandHandlerTick' higher up the road
1266 {
1267 Man killer = source.GetHierarchyRootPlayer();
1268
1269 if (!m_KillerData) //only one player is considered killer in the event of crossfire
1270 {
1271 m_KillerData = new KillerData();
1272 m_KillerData.m_Killer = killer;
1273 m_KillerData.m_MurderWeapon = source;
1274 }
1275
1276 if (killer && killer.IsPlayer())
1277 {
1278 // was player killed by headshot?
1279 if (dmgZone == "Brain")
1280 {
1281 m_KilledByHeadshot = true;
1282 if (m_KillerData.m_Killer == killer)
1283 m_KillerData.m_KillerHiTheBrain = true;
1284 }
1285 }
1286 }
1287 }
1288 else
1289 {
1290 int animType;
1291 float animHitDir;
1292 bool animHitFullbody;
1295 else
1296 {
1297 bool skipSoundRequest = false;
1298 if (damageType == DamageType.CUSTOM && GetCommand_Fall())
1299 skipSoundRequest = GetFallDamage().GetLandType() < HumanCommandFall.LANDTYPE_MEDIUM;
1300
1301 if (!skipSoundRequest)
1302 RequestSoundEvent(EPlayerSoundEventID.TAKING_DMG_LIGHT);
1303 }
1304 }
1305
1306 // interupt melee for non-blocked hit or heavy hit
1307 if (animHitFullbody)
1308 {
1310 if (hcm)
1311 hcm.Cancel();
1312 }
1313 }
DamageType
exposed from C++ (do not change)
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
DayZPlayerImplementFallDamage GetFallDamage()
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
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 EvaluateDeathAnimation(int pDamageType, EntityAI pSource, string pAmmoType, out int pAnimType, out float pAnimHitDir)
selects animation type and direction based on damage system data
static void SendDamageHitEx(DayZPlayer pPlayer, int pType, float pHitDir, bool pFullbody, TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos)
proto native HumanCommandFall GetCommand_Fall()

References component, GetCommand_Fall(), GetCommand_Melee2(), HumanCommandFall(), and DayZPlayerSyncJunctures::SendDamageHitEx().

◆ EEKilled()

override void DayZPlayer::EEKilled ( Object killer)
inlineprotected

Definition at line 605 of file DayZPlayerImplement.c.

606 {
607 SendDeathJuncture(-1, 0);
608
609 super.EEKilled(killer);
610 }

◆ EOnContact()

void DayZPlayer::EOnContact ( IEntity other,
Contact extra )
inlineprotected

Phx contact event

Definition at line 3293 of file DayZPlayerImplement.c.

3294 {
3295 if (!IsAlive())
3296 return;
3297
3298 if (GetParent() == other)
3299 return;
3300
3302 if (transport)
3303 {
3304 if (GetGame().IsServer())
3305 RegisterTransportHit(transport);
3306 }
3307 }

References GetGame(), and GetParent().

◆ EvaluateDamageHit()

void DayZPlayer::EvaluateDamageHit ( int pCurrentCommandID)
inlineprotected

Must be ran at the start of CommandHandler before Jump is triggered.

Reset damage hit to prevent animation from playing unnecessarily when it is already cancelled out

ignore hit impacts in prone (for now)

Definition at line 1051 of file DayZPlayerImplement.c.

1052 {
1055
1056 if (!m_SyncedHitDataArray || m_SyncedHitDataArray.Count() == 0)
1057 return;
1058
1059 //evaluate all hit data
1062 for (int i = 0; i < m_SyncedHitDataArray.Count(); i++)
1063 {
1065 m_DamageHitDir = data.m_HitDir;
1066
1067 //client-side effects
1068#ifndef SERVER
1069 if (IsAlive() && !IsUnconscious() && data.m_HasSource && GetGame().GetMission().GetHud() && GetGame().GetPlayer() == this) //only for controlled players
1070 {
1071 m_DamageHealth = data.m_HealthDamage;
1072 if (m_DamageHealth > 0.0)
1073 {
1074 float rel = m_DamageHealth / (GetMaxHealth("", "Health") * PlayerConstants.HEAVY_HIT_THRESHOLD);
1075 GetGame().GetMission().GetHud().SpawnHitDirEffect(this, m_DamageHitDir, rel);
1076 }
1077 }
1078#endif
1079
1080 if (!greatest_hit)
1082 //else if (data.m_HealthDamage > greatest_hit.m_HealthDamage || (data.m_Fullbody && !greatest_hit.m_Fullbody)) //TODO - revisit cumulative calculation for animation evaluation purposes (stagger on shotgun to the chest)
1083 else if (data.m_Fullbody) //temporary solution; last fullbody hit is used for animation purposes, some light hit otherwise
1085 }
1086
1087 m_SyncedHitDataArray.Clear();
1088 m_DamageHealth = 0.0;
1089
1091 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
1092 return;
1093
1094 //general effects
1095 m_DamageHitFullbody = greatest_hit.m_Fullbody;
1096 m_DamageHitAnimType = greatest_hit.m_AnimType;
1097 m_DamageHitDir = greatest_hit.m_HitDir;
1098 }
static const float HEAVY_HIT_THRESHOLD

References GetGame(), GetPlayer(), PlayerConstants::HEAVY_HIT_THRESHOLD, and m_MovementState.

◆ EvaluateDamageHitAnimation()

bool DayZPlayer::EvaluateDamageHitAnimation ( TotalDamageResult pDamageResult,
int pDamageType,
EntityAI pSource,
string pComponent,
string pAmmoType,
vector pModelPos,
out int pAnimType,
out float pAnimHitDir,
out bool pAnimHitFullbody )
inlineprotected

selects animation type and direction based on damage system data

impact from infected attack will be light only

play full body when these coponents were hit

skip evaluation of dmg hit animation

direction

Definition at line 1174 of file DayZPlayerImplement.c.

1175 {
1176 int invertHitDir = 0; //Used to flip the heavy hit animation direction
1177
1178 pAnimType = 0;
1179 pAnimHitFullbody = false; // additive anm
1181
1182 switch (pDamageType)
1183 {
1184 case DT_CLOSE_COMBAT:
1186 if (pSource.IsInherited(DayZInfected))
1187 break;
1188
1189 pAnimType = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " hitAnimation");
1190 invertHitDir = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " invertHitDir");
1191 if (!IsUnconscious() && pAnimType == 1 && !m_MeleeFightLogic.IsInBlock())
1192 pAnimHitFullbody = true;
1193 break;
1194
1195 case DT_FIRE_ARM:
1196 int impactBehaviour = 0;
1197
1198 if (!IsUnconscious() && GetHealth("", "Shock") > 25)
1199 {
1201 if (pComponent == "Torso" || pComponent == "Head")
1202 {
1203 impactBehaviour = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " impactBehaviour");
1204 float fireDamage = pDamageResult.GetHighestDamage("Health");
1205 float shockDamage = pDamageResult.GetHighestDamage("Shock");
1206 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1207 pAnimHitFullbody = true;
1208 }
1209 }
1210
1211 break;
1212
1213 case DT_EXPLOSION:
1214 break;
1215
1216 case DT_CUSTOM:
1217 pAnimType = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " hitAnimation");
1218 if (pAnimType == 1)
1219 pAnimHitFullbody = true;
1220 else
1221 return false;
1222
1223 break;
1224 }
1225
1227 vector targetDirection = GetDirection();
1228 vector toSourceDirection = (pSource.GetPosition() - GetPosition());
1229
1230 targetDirection[1] = 0;
1231 toSourceDirection[1] = 0;
1232
1233 targetDirection.Normalize();
1234 toSourceDirection.Normalize();
1235
1238
1240
1241 // We will invert direction of the hit
1242 if (invertHitDir > 0)
1243 pAnimHitDir -= 180;
1244
1245 if (cross[1] < 0)
1247
1248 return true;
1249 }
Definition EnMath.c:7
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Definition EnConvert.c:271
static proto float Acos(float c)
Returns angle in radians from cosinus.
static const float RAD2DEG
Definition EnMath.c:16

References Math::Acos(), vector::Dot(), GetGame(), GetMovementState(), GetPosition, m_MovementState, and Math::RAD2DEG.

◆ EvaluateDeathAnimation()

bool DayZPlayer::EvaluateDeathAnimation ( int pDamageType,
EntityAI pSource,
string pAmmoType,
out int pAnimType,
out float pAnimHitDir )
inlineprotected

selects animation type and direction based on damage system data

direction

Definition at line 1145 of file DayZPlayerImplement.c.

1146 {
1147 bool doPhxImpulse = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " doPhxImpulse") > 0;
1148
1149 pAnimType = DayZPlayerConstants.DEATH_DEFAULT;
1150 if (doPhxImpulse)
1151 pAnimType = DayZPlayerConstants.DEATH_FAST;
1152
1154 vector targetDirection = GetDirection();
1155 vector toSourceDirection = (pSource.GetPosition() - GetPosition());
1156
1157 targetDirection[1] = 0;
1158 toSourceDirection[1] = 0;
1159
1160 targetDirection.Normalize();
1161 toSourceDirection.Normalize();
1162
1165
1167 if (cross[1] < 0)
1169
1170 return true;
1171 }

References Math::Acos(), vector::Dot(), GetGame(), GetPosition, and Math::RAD2DEG.

◆ ExitSights()

void DayZPlayer::ExitSights ( )
inlineprotected

Definition at line 324 of file DayZPlayerImplement.c.

325 {
327 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
329 if (weapon)
330 optics = weapon.GetAttachedOptics();
331 else
333
334 SetIronsights(false);
335 SetOptics(false);
336
337 if (optics)
338 SwitchOptics(optics, false);
339
341 if (hcw)
342 hcw.SetADS(false);
343 }
void SetIronsights(bool value)
void SwitchOptics(ItemOptics optic, bool state)

References GetCommandModifier_Weapons().

◆ GetAimingModel()

DayZPlayerImplementAiming DayZPlayer::GetAimingModel ( )
inlineprotected

Definition at line 179 of file DayZPlayerImplement.c.

180 {
181 return m_AimingModel;
182 }

◆ GetBackAttachmentType()

AnimBackType DayZPlayer::GetBackAttachmentType ( )
inlineprotected

Definition at line 2669 of file DayZPlayerImplement.c.

2670 {
2671 EntityAI back = GetInventory().FindAttachment(InventorySlots.BACK);
2672 if (back)
2673 {
2674 switch (back.GetAttachmentSoundType())
2675 {
2676 case "Small":
2677 return AnimBackType.Small;
2678 case "Military":
2679 return AnimBackType.Military;
2680 case "Outdoor":
2681 return AnimBackType.Outdoor;
2682 case "Ghillie":
2683 return AnimBackType.Ghillie;
2684 }
2685 }
2686
2687 return AnimBackType.None;
2688 }
provides access to slot configuration

◆ GetBodyAttachmentType()

AnimUpperBodyType DayZPlayer::GetBodyAttachmentType ( )
inlineprotected

Definition at line 2638 of file DayZPlayerImplement.c.

2639 {
2640 EntityAI attachment = GetInventory().FindAttachment(InventorySlots.BODY);
2641 if (attachment)
2642 {
2643 switch (attachment.GetAttachmentSoundType())
2644 {
2645 case "NylonJacket":
2646 return AnimUpperBodyType.NylonJacket;
2647 case "TShirt":
2648 return AnimUpperBodyType.TShirt;
2649 case "WoolShirt":
2650 return AnimUpperBodyType.WoolShirt;
2651 case "HeavyJacket":
2652 return AnimUpperBodyType.HeavyJacket;
2653 case "LeatherJacket":
2654 return AnimUpperBodyType.LeatherJacket;
2655 case "Coat":
2656 return AnimUpperBodyType.Coat;
2657 case "ChemlonDress":
2658 return AnimUpperBodyType.ChemlonDress;
2659 case "Ghillie":
2660 return AnimUpperBodyType.Ghillie;
2661 case "Chainmail":
2662 return AnimUpperBodyType.Chainmail;
2663 }
2664 }
2665
2666 return AnimUpperBodyType.None;
2667 }

◆ GetBootsType()

AnimBootsType DayZPlayer::GetBootsType ( )
inlineprotected

Definition at line 2620 of file DayZPlayerImplement.c.

2621 {
2622 EntityAI boots = GetInventory().FindAttachment(InventorySlots.FEET);
2623 if (boots)
2624 {
2625 switch (boots.GetAttachmentSoundType())
2626 {
2627 case "Sneakers":
2628 return AnimBootsType.Sneakers;
2629 case "Boots":
2630 return AnimBootsType.Boots;
2631 }
2632 }
2633
2634 return AnimBootsType.None;
2635 }
AnimBootsType

◆ GetCurrentWaterLevel()

override float DayZPlayer::GetCurrentWaterLevel ( )
inlineprotected

Definition at line 286 of file DayZPlayerImplement.c.

287 {
288 return m_CurrentWaterLevel;
289 }

Referenced by InterruptWaterCheck().

◆ GetDayZPlayerInventory()

DayZPlayerInventory DayZPlayer::GetDayZPlayerInventory ( )
inlineprotected

Definition at line 741 of file DayZPlayerImplement.c.

742 {
743 DayZPlayerInventory inv = DayZPlayerInventory.Cast(GetInventory());
744 return inv;
745 }

Referenced by ActionPossibilityCheck(), and CanPlayEmote().

◆ GetDebugText()

override string DayZPlayer::GetDebugText ( )
inlineprotected

Definition at line 417 of file DayZPlayerImplement.c.

418 {
419 string text = super.GetDebugText();
420 text += "Parent: " + Object.GetDebugName(Object.Cast(GetParent())) + "\n";//keep
421 text += "IsSimulationDisabled: " + GetIsSimulationDisabled() + "\n";//keep
422 /*
423 text += "DamageDestroyed: " + IsDamageDestroyed() + "\n";
424 text += "DeathProcessed: " + IsDeathProcessed() + "\n";
425 text += "DeathConditionMet: " + IsDeathConditionMet() + "\n";
426 text += "PullOutOfVehicleState: " + m_PullPlayerOutOfVehicleState + "\n";
427 text += "PullOutOfVehicleSynch: " + m_TriggerPullPlayerOutOfVehicleSynch + "\n";
428 text += "Position: " + GetPosition() + "\n";*/
429 return text;
430 }

References GetParent().

◆ GetDeltaT()

float DayZPlayer::GetDeltaT ( )
inlineprotected

Definition at line 403 of file DayZPlayerImplement.c.

404 {
405 return m_dT;
406 }

◆ GetEyeZoomLevel()

override int DayZPlayer::GetEyeZoomLevel ( )
inlineprotected

Definition at line 214 of file DayZPlayerImplement.c.

215 {
217 }
ECameraZoomType m_CameraEyeZoomLevel

Referenced by DayZPlayerCameraBase(), HoldBreathFOVEffect(), and StdFovUpdate().

◆ GetFallDamage()

DayZPlayerImplementFallDamage DayZPlayer::GetFallDamage ( )
inlineprotected

Definition at line 199 of file DayZPlayerImplement.c.

200 {
201 return m_FallDamage;
202 }

◆ GetMeleeCombat()

DayZPlayerImplementMeleeCombat DayZPlayer::GetMeleeCombat ( )
inlineprotected

Definition at line 184 of file DayZPlayerImplement.c.

185 {
186 return m_MeleeCombat;
187 }

References m_MeleeCombat.

Referenced by Init().

◆ GetMeleeFightLogic()

DayZPlayerMeleeFightLogic_LightHeavy DayZPlayer::GetMeleeFightLogic ( )
inlineprotected

Definition at line 189 of file DayZPlayerImplement.c.

190 {
191 return m_MeleeFightLogic;
192 }

◆ GetShoulderAttachmentType()

AnimRangedWeaponType DayZPlayer::GetShoulderAttachmentType ( )
inlineprotected

Definition at line 2691 of file DayZPlayerImplement.c.

2692 {
2693 EntityAI shoulderAttachment = GetInventory().FindAttachment(InventorySlots.SHOULDER);
2694 EntityAI meleeAttachment = GetInventory().FindAttachment(InventorySlots.MELEE);
2695
2698
2700 {
2701 switch (shoulderAttachment.GetAttachmentSoundType())
2702 {
2703 case "Shotgun":
2704 {
2706 break;
2707 }
2708 case "Rifle":
2709 {
2711 break;
2712 }
2713 }
2714 }
2715 if (meleeAttachment)
2716 {
2717 switch (meleeAttachment.GetAttachmentSoundType())
2718 {
2719 case "Shotgun":
2720 {
2722 break;
2723 }
2724 case "Rifle":
2725 {
2727 break;
2728 }
2729 }
2730 }
2731
2733 return AnimRangedWeaponType.Shotgun;
2734
2736 return AnimRangedWeaponType.Rifle;
2737
2738 return AnimRangedWeaponType.None;
2739 }

◆ GetSlidePoseAngle()

float DayZPlayer::GetSlidePoseAngle ( )
inlineprotected

Definition at line 3256 of file DayZPlayerImplement.c.

3257 {
3258 return GetDayZPlayerType().CommandMoveSettingsW().m_fSlidingPoseAngle;
3259 }

References GetDayZPlayerType().

◆ GetSurfaceType()

string DayZPlayer::GetSurfaceType ( SurfaceAnimationBone limbType)
inlineprotected

Definition at line 2741 of file DayZPlayerImplement.c.

2742 {
2743 string surfaceType;
2744 int liquidType;
2745
2746 g_Game.SurfaceUnderObjectByBone(this, limbType, surfaceType, liquidType);
2747
2748 return surfaceType;
2749 }
DayZGame g_Game
Definition DayZGame.c:3528

References g_Game.

◆ GetThrowing()

DayZPlayerImplementThrowing DayZPlayer::GetThrowing ( )
inlineprotected

Definition at line 194 of file DayZPlayerImplement.c.

195 {
196 return m_Throwing;
197 }

Referenced by ActionPossibilityCheck(), and CanPlayEmote().

◆ GetTypeOfDeath()

int DayZPlayer::GetTypeOfDeath ( int pCurrentCommandID)
inlineprotected

Definition at line 572 of file DayZPlayerImplement.c.

573 {
574 switch (pCurrentCommandID)
575 {
576 case DayZPlayerConstants.COMMANDID_SWIM:
577 return DayZPlayerConstants.DEATH_WATER;
578 case DayZPlayerConstants.COMMANDID_FALL:
579 return DayZPlayerConstants.DEATH_FALL;
580 case DayZPlayerConstants.COMMANDID_UNCONSCIOUS:
582 if (hcu)
583 {
584 if (hcu.IsOnLand())
585 return DayZPlayerConstants.DEATH_UNCON_ON_LAND;
586 if (hcu.IsInWater())
587 return DayZPlayerConstants.DEATH_UNCON_IN_WATER;
588 }
589
590 break;
591 }
592
593 return DayZPlayerConstants.DEATH_BODY;
594 }
proto native HumanCommandUnconscious GetCommand_Unconscious()

References GetCommand_Unconscious().

◆ GetWeaponManager()

◆ HandleADS()

void DayZPlayer::HandleADS ( )
inlineprotected

This is main command logic

artificial Auto-ADS delay

if !raised if sprinting

Definition at line 1531 of file DayZPlayerImplement.c.

1532 {
1533 if (!IsAlive())
1534 {
1536 ExitSights();
1537 return;
1538 }
1539
1540 bool bADSToggle = false;
1541 bool exitSights = false;
1545 PlayerBase playerPB = PlayerBase.Cast(this);
1547
1548 if (playerPB.IsRolling())
1549 exitSights = true;
1550
1551 if (m_ResetADS || !hia.IsItemInHandsWeapon())
1552 {
1553 hic.ResetADS();
1554 m_ResetADS = false;
1555 }
1556
1557 if (!m_MovementState.IsRaised() || m_LiftWeapon_player)
1558 {
1560 exitSights = true;
1561 }
1562 else
1563 {
1564 if (m_bADS != hic.WeaponADS())
1565 {
1566 m_bADS = hic.WeaponADS();
1567 bADSToggle = true;
1568 }
1569
1571 {
1574 {
1575 bADSToggle = false;
1576 exitSights = true;
1577 }
1578 else
1579 bADSToggle = true;
1580 }
1581 }
1582
1583 if (bADSToggle && !GetCommand_Melee2() && !GetThrowing().IsThrowingModeEnabled())
1584 {
1585 if (hia.IsItemInHandsWeapon() && playerPB.GetItemInHands() && playerPB.GetItemInHands().IsWeapon() && playerPB.GetWeaponManager() && !playerPB.GetWeaponManager().IsRunning())
1586 {
1587 Weapon_Base weapon = Weapon_Base.Cast(GetHumanInventory().GetEntityInHands());
1588 ItemOptics optic = weapon.GetAttachedOptics();
1589 bool switchToADS = false;
1590 bool canUseIronsights = weapon.CanEnterIronsights();
1591 bool canUseOptics = optic != NULL;
1592
1595
1596 // go to ironsights - disable ironsights when
1599 if (!m_MovementState.IsRaised() || m_MovementState.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SPRINT)
1600 switchToADS = false;
1601
1602 // fixes camera switching during item transitions
1604 exitSights = true;
1605 else if (switchToADS) // enter ironsights or optics
1606 {
1607 // filter by usability
1609 m_WasIronsight = false;
1610 else if (!m_WasIronsight && !canUseOptics)
1611 m_WasIronsight = true;
1612
1613 if (m_WasIronsight)
1614 {
1615 hic.ResetFreeLookToggle();
1616 SwitchOptics(optic, false);
1617 SetIronsights(true);
1618 }
1619 else if (!m_WasIronsight || (!canUseIronsights && canUseOptics))
1620 {
1621 SetIronsights(false);
1622 SwitchOptics(optic, true);
1623 }
1624 else
1625 exitSights = true;
1626
1627 if (hcw && (m_CameraOptics/* || m_CameraIronsight*/))
1628 hcw.SetADS(true);
1629 }
1630 else
1631 exitSights = true;
1632 }
1633 }
1634
1635 // leave ironsight and/ or optics
1637 ExitSights();
1638 }
bool IsProcessing()
void ResetWeaponRaiseProgress()
DayZPlayerImplementThrowing GetThrowing()
bool IsWeaponRaiseCompleted()
bool IsLiftWeapon()
bool IsFighting()
void HumanItemAccessor()
Definition humanitems.c:135

References GetCommand_Melee2(), GetCommandModifier_Weapons(), GetInputController(), GetItemAccessor(), GetMovementState(), HumanItemAccessor(), IsProcessing(), IsRaised(), and m_MovementState.

◆ HandleDamageHit()

bool DayZPlayer::HandleDamageHit ( int pCurrentCommandID)
inlineprotected

Definition at line 1100 of file DayZPlayerImplement.c.

1101 {
1102 // Update elapsed time since hit first
1103 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_DAMAGE)
1104 {
1105 // Throttle heavy hit command up to a fixed rate
1107 {
1109 ResetDamageHitState(false);
1110 return false;
1111 }
1112 }
1113
1114 // If transportcache is not null, player is unconscious inside of a car and should not head into a damage command
1116 {
1118 if (m_DamageHitFullbody && (!vehCommand || vehCommand.IsGettingIn() || vehCommand.IsGettingOut()))
1119 {
1121 ResetDamageHitState(true);
1122 return true;
1123 }
1124 else
1125 {
1127 ResetDamageHitState(false);
1128 return false;
1129 }
1130 }
1131
1132 return pCurrentCommandID == DayZPlayerConstants.COMMANDID_DAMAGE;
1133 }
void ResetDamageHitState(bool resetTimer)
const float HIT_INTERVAL_MIN

References AddCommandModifier_Damage(), GetCommand_Vehicle(), and StartCommand_Damage().

◆ HandleDeath()

bool DayZPlayer::HandleDeath ( int pCurrentCommandID)
inlineprotected

Can't pull a body out of a car that is in water, don't need to handle that

Definition at line 488 of file DayZPlayerImplement.c.

489 {
490 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_DEATH)
491 {
493 {
494 case -1:
495 break;
496 case 0:
498
499 PhysicsSetSolid(true);
500
504 Class.CastTo(callbackVeh.m_pPlayer, this);
505 break;
506 }
507
508 return true;
509 }
510
511 if (m_DeathAnimType != -2 && g_Game.GetMissionState() == g_Game.MISSION_STATE_GAME)
512 {
513 if (!CommitedSuicide())
514 {
515 int type = m_DeathAnimType;
516 if (type == DayZPlayerConstants.DEATH_DEFAULT)
518
519 m_WasInVehicle = false;
521 if (hcv)
522 {
523 m_TransportCache = hcv.GetTransport();
524 m_WasInVehicle = !hcv.IsGettingIn() && !hcv.IsGettingOut();
525 }
526
527 bool keepInLocalSpace = false;
528 if (IsUnconscious() || m_WasInVehicle)
529 {
531 {
532 m_TransportCache.CrewDeath(m_TransportCache.CrewMemberIndex(this));
533 m_TransportCache.MarkCrewMemberDead(m_TransportCache.CrewMemberIndex(this));
534 }
535 }
536 else
537 {
539 {
540 m_TransportCache.CrewGetOut(m_TransportCache.CrewMemberIndex(this));
541 m_TransportCache.MarkCrewMemberDead(m_TransportCache.CrewMemberIndex(this));
542 }
543
545 }
546
547 DisableSimulation(false);
548 GetItemAccessor().HideItemInHands(false);
550
553 Class.CastTo(callback.m_pPlayer, this);
554 }
555 else
556 PhysicsSetRagdoll(true);
557
558 // disable voice communication
559 GetGame().GetWorld().SetVoiceOn(false, false);
560
561 return true;
562 }
563
564 return false;
565 }
int m_PullPlayerOutOfVehicleState
bool m_PullPlayerOutOfVehicleKeepsInLocalSpace
int GetTypeOfDeath(int pCurrentCommandID)
proto native void PhysicsSetSolid(bool pSolid)
proto native HumanCommandDeathCallback StartCommand_Death(int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave=false)
--— Death --—
proto native void PhysicsSetRagdoll(bool pEnable)
Sets and synchronize interaction layers 'RAGDOLL' and 'RAGDOLL_NO_CHARACTER' to prevent body stacking...

References Class::CastTo(), g_Game, GetCommand_Vehicle(), GetGame(), GetItemAccessor(), PhysicsSetRagdoll(), PhysicsSetSolid(), and StartCommand_Death().

◆ HandleOptic()

void DayZPlayer::HandleOptic ( notnull ItemOptics optic,
bool inHands,
HumanInputController pInputs,
out bool pExitOptics )
inlineprotected

Definition at line 949 of file DayZPlayerImplement.c.

950 {
951 UAInterface input = GetInputInterface();
952 if (!input)
953 return;
954
956 int FOVcount;
959
960 if (input.SyncedPress_ID(UAZoomInOptics))
961 {
962 weapon = Weapon_Base.Cast(optic.GetHierarchyParent());
963 FOVcount = optic.GetStepFOVCount();
965
967 {
968 SetIronsights(false);
969 SwitchOptics(optic, true);
970 optic.SetStepFOVIndex(0);
971 }
972 else if (m_CameraOptics)
973 {
974 if (controllerPressIn) //controller
975 {
976 if (!optic.StepFOVUp())
977 {
978 if (FOVcount > 0)
979 {
980 optic.SetStepFOVIndex(0); //loop to minimum magnification
981 }
982
983 if (weapon && weapon.CanEnterIronsights()) //loop into ironsights
984 {
985 SwitchOptics(optic, false);
986 pInputs.ResetFreeLookToggle();
987 SetIronsights(true);
988 }
989 }
990 }
991 else //m&k
992 optic.StepFOVUp();
993 }
994 }
995
996 if (input.SyncedPress_ID(UAZoomOutOptics))
997 {
998 weapon = Weapon_Base.Cast(optic.GetHierarchyParent());
999 FOVcount = optic.GetStepFOVCount();
1001 if (m_CameraOptics)
1002 {
1003 if (!optic.StepFOVDown())
1004 {
1006 {
1007 if (FOVcount > 0 && (!weapon || !weapon.CanEnterIronsights()))
1008 {
1009 optic.SetStepFOVIndex(FOVcount - 1); //loop to maximum magnification
1010 }
1011 }
1012
1013 if (weapon && weapon.CanEnterIronsights())
1014 {
1015 SwitchOptics(optic, false);
1016 pInputs.ResetFreeLookToggle();
1017 SetIronsights(true);
1018 }
1019 }
1020 }
1022 {
1023 SwitchOptics(optic, true);
1024 if (FOVcount > 0)
1025 {
1026 optic.SetStepFOVIndex(FOVcount - 1); //loop to maximum magnification
1027 }
1028 }
1029 }
1030 }

◆ HandleView()

void DayZPlayer::HandleView ( )
inlineprotected

3rd person camera

Definition at line 1640 of file DayZPlayerImplement.c.

1641 {
1642 if (!IsAlive())
1643 {
1645 ExitSights();
1646 return;
1647 }
1648
1650
1651 bool camChange = hic.CameraViewChanged();
1652
1653 if (IsRaised())
1654 {
1655 if (m_IsWeapon)
1656 camChange = false;
1657 }
1658
1660 if (GetGame().GetWorld().Is3rdPersonDisabled())
1661 m_Camera3rdPerson = false;
1662 else if (camChange)
1664
1665 // exits optics completely, comment to return to ADS
1667 ExitSights();
1668
1669 if (IsPlayerInStance(DayZPlayerConstants.STANCEMASK_RAISEDPRONE) && (m_CameraOptics || m_CameraIronsight))
1670 GetDayZPlayerType().SetVerticalMinimumAimLimit(DayZPlayerCameraIronsights.CONST_UD_MIN_BACK);
1671 else
1672 GetDayZPlayerType().SetVerticalMinimumAimLimit(DayZPlayerCameraIronsights.CONST_UD_MIN);
1673
1674 if (hic.IsZoomToggle() && !m_MovementState.IsRaised())
1675 {
1677 if ((IsClimbingLadder() && Math.AbsInt(m_MovementState.m_iMovement) == 2) || (IsSwimming() && m_MovementState.m_iMovement == 3))
1679 else if (!IsClimbingLadder() && !IsSwimming() && !IsInVehicle())
1680 {
1681 float pSpeed;
1683 hic.GetMovement(pSpeed, pLocalDirection);
1684
1685 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_ERECT && pSpeed == 3)
1687 }
1688 }
1689 else
1691
1692 if (m_MovementState.IsRaisedInProne())
1693 {
1694 float headingAngle = MiscGameplayFunctions.GetHeadingAngle(this);
1697 float headingAngleDiff = 0.0;
1698
1699 if (m_LastHeadingAngle * headingAngle < 0.0)
1701 else
1703
1704 if (headingAngleDiff > 0.2)
1705 {
1706 int time = GetGame().GetTime();
1707
1708 float timefilterconstant = 400 - (headingAngleDiff * 100);
1709
1711 {
1712 float volume = headingAngleDiff / 0.5;
1713 if (volume > 1)
1714 volume = 1;
1715 if (volume < 0.25)
1716 volume = 0.25;
1717
1719 if (m_SoundOffset > 0.25)
1720 m_SoundOffset = 0.25;
1721
1722 string soundSetName = "Cloth_Body_longmove_TShirt_Soundset";
1723
1724 string bodyClothName = "";
1725 EntityAI attachment = GetInventory().FindAttachment(InventorySlots.BODY);
1726 if (attachment)
1727 bodyClothName = attachment.GetAttachmentSoundType();
1728
1729 if (bodyClothName != "")
1730 {
1731 string path = "CfgSoundTables CfgAttachmentSoundTables Cloth_Body_Longmove_LookupTable";
1732 int soundCount = GetGame().ConfigGetChildrenCount(path);
1733
1734 for (int i = 0; i < soundCount; i++)
1735 {
1736 string name = "";
1737 GetGame().ConfigGetChildName(path, i, name);
1738
1739 if (name == bodyClothName)
1740 {
1742 GetGame().ConfigGetTextArray(path + " " + name + " soundSets", stringArray);
1743 soundSetName = stringArray.Get(0);
1744
1745 delete stringArray;
1746 }
1747 }
1748 }
1749
1752
1753 if (soundObjectBuilder != NULL)
1754 {
1755 SoundObject soundObject = soundObjectBuilder.BuildSoundObject();
1756
1757 if (soundObject != NULL)
1758 {
1759 soundObject.SetPosition(GetPosition());
1760
1761 AbstractWave wave = GetGame().GetSoundScene().Play3D(soundObject, soundObjectBuilder);
1762 wave.SetStartOffset(m_SoundOffset);
1763 wave.SetVolumeRelative(volume);
1764
1765 m_LastBackSoundTime = GetGame().GetTime();
1767 }
1768 }
1769 }
1770
1772 {
1773 float volume2 = headingAngleDiff * 2;
1774 if (volume2 > 1)
1775 volume2 = 1;
1776
1778 if (m_SoundOffset < 0.1)
1779 m_SoundOffset = 0.1;
1780 if (m_SoundOffset > 0.3)
1781 m_SoundOffset = 0.3;
1782
1783 string soundSetName2 = "walkProne_noHS_asphalt_ext_Char_SoundSet";
1784 string surfaceType = GetSurfaceType();
1785
1786 if (surfaceType != "")
1787 {
1788 string movementSurfaceType = "walkProne_" + surfaceType;
1789
1790 string path2 = "CfgSoundTables CfgStepSoundTables walkProne_noHS_Char_LookupTable";
1791 int soundCount2 = GetGame().ConfigGetChildrenCount(path2);
1792
1793 for (int i2 = 0; i2 < soundCount2; i2++)
1794 {
1795 string name2 = "";
1796 GetGame().ConfigGetChildName(path2, i2, name2);
1797
1799 {
1801 GetGame().ConfigGetTextArray(path2 + " " + name2 + " soundSets", stringArray2);
1802 soundSetName2 = stringArray2.Get(0);
1803
1804 delete stringArray2;
1805 }
1806 }
1807 }
1808
1811
1813 {
1814 SoundObject soundObject2 = soundObjectBuilder2.BuildSoundObject();
1815
1816 if (soundObject2 != NULL)
1817 {
1818 soundObject2.SetPosition(GetPosition());
1819
1820 AbstractWave wave2 = GetGame().GetSoundScene().Play3D(soundObject2, soundObjectBuilder2);
1821 wave2.SetStartOffset(m_SoundOffset);
1822 wave2.SetVolumeRelative(volume2);
1823
1824 m_LastBackSoundTime2 = GetGame().GetTime();
1826 }
1827 }
1828 }
1829
1831 }
1832 }
1833 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ECameraZoomType
class SoundObjectBuilder SoundObject(SoundParams soundParams)
void SoundObjectBuilder(SoundParams soundParams)
string GetSurfaceType(SurfaceAnimationBone limbType)
bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
array< string > TStringArray
Definition EnScript.c:666
static proto int AbsInt(int i)
Returns absolute value.
static proto float AbsFloat(float f)
Returns absolute value.

References Math::AbsFloat(), Math::AbsInt(), GetDayZPlayerType(), GetGame(), GetInputController(), GetPosition, IsPlayerInStance(), IsRaised(), m_MovementState, name, path, SoundObject(), and SoundObjectBuilder().

◆ HandleWeapons()

void DayZPlayer::HandleWeapons ( float pDt,
Entity pInHands,
HumanInputController pInputs,
out bool pExitIronSights )
inlineprotected

HandleWeapons

fire

Definition at line 816 of file DayZPlayerImplement.c.

817 {
819 GetDayZPlayerInventory().HandleWeaponEvents(pDt, pExitIronSights);
820
823 ItemOptics optic = weapon.GetAttachedOptics();
824
827
829
830 // hold breath
831 if (pInputs.IsHoldBreath() && m_MovementState.IsRaised() && (IsInIronsights() || IsInOptics()))
833 else
834 m_IsTryingHoldBreath = false;
835
836 if (pInputs.IsFireModeChange())
838 if (pInputs.IsZeroingUp())
839 {
840 if (optic && (optic.IsInOptics() || optic.IsUsingWeaponIronsightsOverride()))
841 optic.StepZeroingUp();
842 else
843 weapon.StepZeroingUpAllMuzzles();
844 }
845 if (pInputs.IsZeroingDown())
846 {
847 if (optic && (optic.IsInOptics() || optic.IsUsingWeaponIronsightsOverride()))
848 optic.StepZeroingDown();
849 else
850 weapon.StepZeroingDownAllMuzzles();
851 }
852
853 if (!m_LiftWeapon_player && (m_CameraIronsight || !weapon.CanEnterIronsights() || m_CameraOptics/*m_ForceHandleOptics*/)) // HACK straight to optics, if ironsights not allowed
854 {
855 if (optic)
857 }
858
859 if (!m_MovementState.IsRaised())
860 {
861 m_IsFireWeaponRaised = false; //legacy reasons
862 if (weapon && weapon.IsInOptics())
863 weapon.ExitOptics();
864
866
867 return; // if not raised => return
868 }
869 else
870 {
871 m_IsFireWeaponRaised = true; //legacy reasons
874
877 }
878
880 if (GetWeaponManager().CanFire(weapon))
881 {
882 bool autofire = weapon.GetCurrentModeAutoFire(weapon.GetCurrentMuzzle()) && weapon.IsChamberEjectable(weapon.GetCurrentMuzzle());
883 int burst = weapon.GetCurrentModeBurstSize(weapon.GetCurrentMuzzle());
884 int burst_count = weapon.GetBurstCount();
885 if (!autofire && (burst < 2 || burst_count < 1))
886 {
887 if (pInputs.IsAttackButtonDown() && GetInputInterface().SyncedValue("UAWeaponMeleeAttack") == 0 && GetInputInterface().SyncedValue("UAHeavyMeleeAttack") == 0)
889 }
890 else if (autofire || burst > 1)
891 {
892#ifdef DIAG_DEVELOPER
893 int burst_option = GetWeaponManager().GetBurstOption();
894 if (burst_option == 0)
895 {
896#endif
897 if (pInputs.IsAttackButton() && GetInputInterface().SyncedValue("UAWeaponMeleeAttack") == 0 && GetInputInterface().SyncedValue("UAHeavyMeleeAttack") == 0)
898 {
899 if (autofire || burst_count < burst)
901 }
902 else
903 weapon.ResetBurstCount();
904#ifdef DIAG_DEVELOPER
905 }
906 else if (burst_option == 1)
907 {
908 if (burst > 1 && burst_count == burst)
909 weapon.ResetBurstCount();
910 else if (burst > 1 && burst_count < burst)
912 else
913 {
914 //Autofire
915 if (pInputs.IsAttackButton())
917 }
918 }
919#endif
920 }
921 }
922
923#ifdef PLATFORM_CONSOLE
924 if (GetGame().GetInput().LocalRelease("UAFire", false) || m_ShouldReload)
925 {
926 if (!weapon.IsWaitingForActionFinish() && !IsFighting())
927 {
928 int muzzle_index = weapon.GetCurrentMuzzle();
929
930 if (weapon.IsChamberFiredOut(muzzle_index))
931 {
932 if (weapon.CanProcessWeaponEvents())
933 {
934 if (GetWeaponManager().CanEjectBullet(weapon))
935 {
937 pExitIronSights = true;
938 m_ShouldReload = false;
939 }
940 }
941 }
942 }
943 else
944 m_ShouldReload = true;
945 }
946#endif
947 }
ActionInput GetInput()
Definition ActionBase.c:989
void ProcessLiftWeapon()
WeaponManager GetWeaponManager()
void CheckLiftWeapon()
static const float WEAPON_RAISE_BLEND_DELAY
bool SetNextMuzzleMode()
void Fire(Weapon_Base wpn)
bool EjectBullet(ActionBase control_action=NULL)

References Class::CastTo(), GetCommandModifier_Weapons(), GetGame(), GetInput(), GetMovementState(), m_MovementState, and PlayerConstants::WEAPON_RAISE_BLEND_DELAY.

◆ HeadingModel()

override bool DayZPlayer::HeadingModel ( float pDt,
SDayZPlayerHeadingModel pModel )
inlineprotected

on ladder - do nothing

if it's standing from prone on back

Definition at line 1322 of file DayZPlayerImplement.c.

1323 {
1324 if (!IsAlive())
1325 return false;
1326
1328
1330 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_LADDER)
1331 {
1333 return false;
1334 }
1335 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_VEHICLE)
1336 {
1338 if (hmv.IsGettingOut() || hmv.IsGettingIn())
1340
1342 return false;
1343 }
1344 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_UNCONSCIOUS)
1345 {
1347 if (!hcu.IsWakingUp())
1348 {
1350 //pModel.m_iCamMode = DayZPlayerConstants.CAMERAMODE_HEAD;
1351 return false;
1352 }
1353 }
1354
1355 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_CLIMB)
1356 {
1358 return false;
1359 }
1360
1361#ifdef DEVELOPER
1363 if (actMenuValue != 0)
1364 {
1367 }
1368#endif
1369
1370 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
1371 {
1373 return false;
1374 }
1375
1377 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_MOVE)
1378 {
1380 if (hcm.IsStandingFromBack())
1381 {
1383 return false;
1384 }
1385 }
1386
1388 HumanItemBehaviorCfg hibcfg = hia.GetItemInHandsBehaviourCfg();
1389 if (hibcfg && hibcfg.m_StanceRotation[m_MovementState.m_iStanceIdx] == DayZPlayerConstants.ROTATION_DISABLE)
1391 if (IsUnconscious() || (GetCommand_Move() && GetCommand_Move().IsLeavingUncon()))
1393
1395 }
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)
proto native bool IsLeavingUncon()
return true if character transitions out of uncon

References DayZPlayerImplementHeading::ClampHeading(), GetCommand_Move(), GetCommand_Unconscious(), GetCommand_Vehicle(), DiagMenu::GetEngineValue(), GetItemAccessor(), GetMovementState(), HumanItemAccessor(), IsLeavingUncon(), m_MovementState, DayZPlayerImplementHeading::NoHeading(), and DayZPlayerImplementHeading::RotateOrient().

◆ HideClothing()

void DayZPlayer::HideClothing ( ItemOptics optic,
bool state )
inlineprotected

Definition at line 2220 of file DayZPlayerImplement.c.

2220{}

◆ IsAlreadyInFallingCommand()

bool DayZPlayer::IsAlreadyInFallingCommand ( int pCurrentCommandID)
inlineprotected

Definition at line 3239 of file DayZPlayerImplement.c.

3240 {
3241 return pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL;
3242 }

◆ IsClimbingLadder()

bool DayZPlayer::IsClimbingLadder ( )
inlineprotected

Definition at line 389 of file DayZPlayerImplement.c.

390 {
391 return m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_LADDER;
392 }

References m_MovementState.

Referenced by CanPlayEmote().

◆ IsEyeZoom()

override bool DayZPlayer::IsEyeZoom ( )
inlineprotected

Legacy.

Definition at line 209 of file DayZPlayerImplement.c.

210 {
211 return GetEyeZoomLevel() > 0;
212 }
override int GetEyeZoomLevel()

References GetEyeZoomLevel().

◆ IsFBSymptomPlaying()

bool DayZPlayer::IsFBSymptomPlaying ( )
inlineprotected

Definition at line 398 of file DayZPlayerImplement.c.

399 {
401 }

◆ IsFighting()

bool DayZPlayer::IsFighting ( )
protected

◆ IsFireWeaponRaised()

bool DayZPlayer::IsFireWeaponRaised ( )
inlineprotected

Definition at line 249 of file DayZPlayerImplement.c.

250 {
252 if (m_MovementState)
253 return m_MovementState.IsRaised();
254
255 return false;
256 }

References GetMovementState(), and m_MovementState.

◆ IsHandheldOpticsInUse()

bool DayZPlayer::IsHandheldOpticsInUse ( )
inlineprotected

Definition at line 3325 of file DayZPlayerImplement.c.

3326 {
3327 return m_HandheldOpticsInUse;
3328 }

◆ IsInFBEmoteState()

bool DayZPlayer::IsInFBEmoteState ( )
protected

Checks if fullbody animation or specific locked state is active in emote manager.

◆ IsInFullbodyDamageAnimation()

bool DayZPlayer::IsInFullbodyDamageAnimation ( )
inlineprotected

Definition at line 1045 of file DayZPlayerImplement.c.

1046 {
1048 }
proto native HumanCommandFullBodyDamage GetCommand_Damage()

References GetCommand_Damage().

◆ IsInIronsights()

bool DayZPlayer::IsInIronsights ( )
inlineprotected

Definition at line 229 of file DayZPlayerImplement.c.

230 {
231 return m_CameraIronsight;
232 }

Referenced by SelectCrossHair(), and ScriptedWidgetEventHandler::Update().

◆ IsInOptics()

bool DayZPlayer::IsInOptics ( )
inlineprotected

Definition at line 234 of file DayZPlayerImplement.c.

235 {
236 return m_CameraOptics;
237 }

Referenced by SelectCrossHair().

◆ IsInThirdPerson()

override bool DayZPlayer::IsInThirdPerson ( )
inlineprotected

Definition at line 239 of file DayZPlayerImplement.c.

240 {
241 return m_Camera3rdPerson;
242 }

◆ IsInVehicle()

bool DayZPlayer::IsInVehicle ( )
inlineprotected

Definition at line 379 of file DayZPlayerImplement.c.

380 {
381 return m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_VEHICLE || (GetParent() != null && GetParent().IsInherited(Transport));
382 }

References GetParent(), and m_MovementState.

◆ IsLanded()

bool DayZPlayer::IsLanded ( int pCurrentCommandID)
inlineprotected

Definition at line 3210 of file DayZPlayerImplement.c.

3211 {
3212 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL)
3213 {
3215
3216 if (fall)
3217 return fall.PhysicsLanded();
3218 }
3219
3220 return false;
3221 }

References GetCommand_Fall(), and HumanCommandFall().

◆ IsLiftWeapon()

bool DayZPlayer::IsLiftWeapon ( )
protected

◆ IsPlayerSelected()

bool DayZPlayer::IsPlayerSelected ( )
inlineprotected

◆ IsRaised()

bool DayZPlayer::IsRaised ( )
inlineprotected

◆ IsRestrained()

bool DayZPlayer::IsRestrained ( )
protected

Referenced by CanPlayEmote(), and Update().

◆ IsShootingFromCamera()

override bool DayZPlayer::IsShootingFromCamera ( )
inlineprotected

Definition at line 219 of file DayZPlayerImplement.c.

220 {
222 }

Referenced by OnEmoteEnd(), and StdFovUpdate().

◆ IsSprintFull()

bool DayZPlayer::IsSprintFull ( )
inlineprotected

Definition at line 263 of file DayZPlayerImplement.c.

264 {
265 return m_SprintFull;
266 }

Referenced by HandleFightLogic().

◆ IsSwimming()

bool DayZPlayer::IsSwimming ( )
inlineprotected

Definition at line 384 of file DayZPlayerImplement.c.

385 {
386 return m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_SWIM;
387 }

References m_MovementState.

Referenced by CanPlayEmote().

◆ IsTryingHoldBreath()

bool DayZPlayer::IsTryingHoldBreath ( )
inlineprotected

Definition at line 258 of file DayZPlayerImplement.c.

259 {
261 }

◆ IsWeaponDebugEnabled()

bool DayZPlayer::IsWeaponDebugEnabled ( )
inlineprotected

Definition at line 276 of file DayZPlayerImplement.c.

277 {
278 return m_WeaponDebug != null;
279 }
ref WeaponDebug m_WeaponDebug

◆ IsWeaponRaiseCompleted()

bool DayZPlayer::IsWeaponRaiseCompleted ( )
inlineprotected

Definition at line 736 of file DayZPlayerImplement.c.

737 {
739 }

◆ LockControls()

void DayZPlayer::LockControls ( bool state)
inlineprotected

Definition at line 689 of file DayZPlayerImplement.c.

690 {
691 if (state == true)
692 {
693 GetGame().GetInput().ChangeGameFocus(1, INPUT_DEVICE_MOUSE);
694 GetGame().GetInput().ChangeGameFocus(1, INPUT_DEVICE_KEYBOARD);
695 GetGame().GetInput().ChangeGameFocus(1, INPUT_DEVICE_GAMEPAD);
696
697 if (GetGame().GetUIManager())
698 {
699 GetGame().GetUIManager().ShowUICursor(true);
700 if (GetGame().GetUIManager().IsDialogVisible())
701 GetGame().GetUIManager().CloseDialog();
702 }
703 }
704 else
705 {
706 GetGame().GetInput().ChangeGameFocus(-1, INPUT_DEVICE_MOUSE);
707 GetGame().GetInput().ChangeGameFocus(-1, INPUT_DEVICE_KEYBOARD);
708 GetGame().GetInput().ChangeGameFocus(-1, INPUT_DEVICE_GAMEPAD);
709
710 if (GetGame().GetUIManager())
711 {
712 if (GetGame().GetUIManager().GetMenu())
713 GetGame().GetUIManager().ShowUICursor(true);
714 else
715 GetGame().GetUIManager().ShowUICursor(false);
716 }
717 }
718 }
const int INPUT_DEVICE_MOUSE
Definition constants.c:24
const int INPUT_DEVICE_GAMEPAD
Definition constants.c:28
const int INPUT_DEVICE_KEYBOARD
Definition constants.c:23

References GetGame(), INPUT_DEVICE_GAMEPAD, INPUT_DEVICE_KEYBOARD, and INPUT_DEVICE_MOUSE.

◆ ModCommandHandlerAfter()

bool DayZPlayer::ModCommandHandlerAfter ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected

Definition at line 1859 of file DayZPlayerImplement.c.

1860 {
1861 return false;
1862 }

◆ ModCommandHandlerBefore()

bool DayZPlayer::ModCommandHandlerBefore ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected

ModOverrides

Definition at line 1849 of file DayZPlayerImplement.c.

1850 {
1851 return false;
1852 }

◆ ModCommandHandlerInside()

bool DayZPlayer::ModCommandHandlerInside ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected

Definition at line 1854 of file DayZPlayerImplement.c.

1855 {
1856 return false;
1857 }

◆ OnInputForRemote()

override void DayZPlayer::OnInputForRemote ( ParamsReadContext ctx)
inlineprotected

Definition at line 747 of file DayZPlayerImplement.c.

748 {
749 int userDataType = 0;
750 if (!ctx.Read(userDataType))
751 {
752 Error("DayZPlayer: OnInputForRemote - cannot read input type");
753 return;
754 }
755
756 switch (userDataType)
757 {
759 GetDayZPlayerInventory().OnEventForRemoteWeapon(ctx);
760 break;
762 GetDayZPlayerInventory().OnHandEventForRemote(ctx);
763 break;
765 GetDayZPlayerInventory().OnInputUserDataForRemote(ctx);
766 break;
767 default:
768 Error("OnInputForRemote - unknown userDataType=" + userDataType);
769 break;
770 }
771 }
const int INPUT_UDT_INVENTORY
Definition _constants.c:9
const int INPUT_UDT_WEAPON_REMOTE_EVENT
Definition _constants.c:12
const int INPUT_UDT_HAND_REMOTE_EVENT
Definition _constants.c:14
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

References Error(), INPUT_UDT_HAND_REMOTE_EVENT, INPUT_UDT_INVENTORY, and INPUT_UDT_WEAPON_REMOTE_EVENT.

◆ OnInputFromServer()

override void DayZPlayer::OnInputFromServer ( ParamsReadContext ctx)
inlineprotected

Definition at line 773 of file DayZPlayerImplement.c.

774 {
775 int userDataType = 0;
776 if (!ctx.Read(userDataType))
777 {
778 Error("DayZPlayer: OnInputFromServer - cannot read input type");
779 return;
780 }
781
782 switch (userDataType)
783 {
785 GetDayZPlayerInventory().OnServerInventoryCommand(ctx);
786 break;
787 default:
788 Error("OnInputFromServer - unknown userDataType=" + userDataType);
789 break;
790 }
791 }

References Error(), and INPUT_UDT_INVENTORY.

◆ OnInputUserDataProcess()

bool DayZPlayer::OnInputUserDataProcess ( int userDataType,
ParamsReadContext ctx )
inlineprotected

Definition at line 2568 of file DayZPlayerImplement.c.

2569 {
2570 m_MeleeCombat.SetTargetObject(null);
2571 m_MeleeCombat.SetHitPos(vector.Zero);
2572 m_MeleeCombat.SetHitZoneIdx(-1);
2573 m_MeleeCombat.SetFinisherType(-1);
2574
2576 {
2578 if (ctx.Read(target))
2579 m_MeleeCombat.SetTargetObject(target);
2580
2582 if (ctx.Read(hitPos))
2583 m_MeleeCombat.SetHitPos(hitPos);
2584
2585 int hitZoneIdx = -1;
2586 if (ctx.Read(hitZoneIdx))
2587 m_MeleeCombat.SetHitZoneIdx(hitZoneIdx);
2588
2589 int finisherType = -1;
2590 if (ctx.Read(finisherType))
2591 m_MeleeCombat.SetFinisherType(finisherType);
2592
2593 return true;
2594 }
2595
2596 return false;
2597 }
const int INPUT_UDT_MELEE_TARGET
Definition _constants.c:6
static const vector Zero
Definition EnConvert.c:110

References INPUT_UDT_MELEE_TARGET, m_MeleeCombat, and vector::Zero.

◆ OnInputUserDataReceived()

void DayZPlayer::OnInputUserDataReceived ( ParamsReadContext ctx)
inlineprotected

Input userdata

Definition at line 2556 of file DayZPlayerImplement.c.

2557 {
2558 int userDataTypeParam = 0;
2559 if (!ctx.Read(userDataTypeParam))
2560 {
2561 Error("DayZPlayerImplement: cannot read input type");
2562 return;
2563 }
2564
2566 }
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)

References Error(), and OnInputUserDataProcess().

◆ OnItemInHandsChanged()

override void DayZPlayer::OnItemInHandsChanged ( )
inlineprotected

Definition at line 797 of file DayZPlayerImplement.c.

798 {
799 //Print("inv: DayZPlayerImplement::OnItemInHandsChanged: "/* + GetHumanInventory().GetEntityInHands()*/);
801 GetItemAccessor().OnItemInHandsChanged();
802
803 if (!IsAlive())
804 {
805 //Print("inv: DayZPlayerImplement::OnItemInHandsChanged - human not alive! calling ResetWeaponInHands");
806 GetItemAccessor().ResetWeaponInHands();
807 }
808 }

References GetItemAccessor().

Referenced by Execute(), NetSyncCurrentStateID(), OnAfterStoreLoad(), and TurnItemIntoItemLambda::OnSuccess().

◆ OnJumpEnd()

void DayZPlayer::OnJumpEnd ( int pLandType = 0)
inlineprotected

Definition at line 1508 of file DayZPlayerImplement.c.

1509 {
1510 }

◆ OnJumpStart()

void DayZPlayer::OnJumpStart ( )
inlineprotected

Definition at line 1504 of file DayZPlayerImplement.c.

1505 {
1506 }

◆ OnLadder()

void DayZPlayer::OnLadder ( float delta_time,
HumanMovementState pState )
protected

called every command handler tick when player is on ladder

◆ OnLand()

bool DayZPlayer::OnLand ( int pCurrentCommandID,
FallDamageData fallDamageData )
inlineprotected

Definition at line 3223 of file DayZPlayerImplement.c.

3224 {
3225 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL)
3226 {
3228
3229 if (fall)
3230 {
3231 fall.Land(fallDamageData.m_LandType);
3232 return true;
3233 }
3234 }
3235
3236 return false;
3237 }

References GetCommand_Fall(), and HumanCommandFall().

◆ OnMovementChanged()

void DayZPlayer::OnMovementChanged ( )
inlineprotected

Event, called when HumanMovementState.m_iMovement changes...walk, run, sprint, etc..

Definition at line 2463 of file DayZPlayerImplement.c.

2464 {
2465 switch (m_MovementState.m_LocalMovement)
2466 {
2467 case DayZPlayerConstants.MOVEMENTIDX_CROUCH_RUN:
2468 {
2469 //OnCrouchRunEnd();
2470 break;
2471 }
2472 case DayZPlayerConstants.MOVEMENTIDX_SPRINT:
2473 {
2474 OnSprintEnd();
2475 break;
2476 }
2477 case DayZPlayerConstants.MOVEMENTIDX_RUN:
2478 {
2479 //OnRunEnd();
2480 break;
2481 }
2482 case DayZPlayerConstants.MOVEMENTIDX_WALK:
2483 {
2484 //OnWalkEnd();
2485 break;
2486 }
2487 case DayZPlayerConstants.MOVEMENTIDX_IDLE:
2488 {
2489 //OnIdleEnd();
2490 break;
2491 }
2492 case DayZPlayerConstants.MOVEMENTIDX_SLIDE:
2493 {
2494 //OnSlideEnd();
2495 break;
2496 }
2497 }
2498
2499 switch (m_MovementState.m_iMovement)
2500 {
2501 case DayZPlayerConstants.MOVEMENTIDX_CROUCH_RUN:
2502 {
2503 //OnCrouchRunStart();
2504 break;
2505 }
2506 case DayZPlayerConstants.MOVEMENTIDX_SPRINT:
2507 {
2508 OnSprintStart();
2509 break;
2510 }
2511 case DayZPlayerConstants.MOVEMENTIDX_RUN:
2512 {
2513 //OnRunStart();
2514 break;
2515 }
2516 case DayZPlayerConstants.MOVEMENTIDX_WALK:
2517 {
2518 //OnWalkStart();
2519 break;
2520 }
2521 case DayZPlayerConstants.MOVEMENTIDX_IDLE:
2522 {
2523 //OnIdleStart();
2524 break;
2525 }
2526 case DayZPlayerConstants.MOVEMENTIDX_SLIDE:
2527 {
2528 //OnSlideStart();
2529 break;
2530 }
2531 }
2532 }

References m_MovementState.

◆ OnParticleEvent()

void DayZPlayer::OnParticleEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

Definition at line 2917 of file DayZPlayerImplement.c.

2918 {
2919
2920 }

◆ OnSoundEvent()

void DayZPlayer::OnSoundEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

Definition at line 2892 of file DayZPlayerImplement.c.

2893 {
2894 if (pEventType == "Sound")
2896 else if (pEventType == "SoundWeapon")
2898 else if (pEventType == "SoundAttachment")
2900 else if (pEventType == "SoundVoice")
2901 {
2902 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
2903 {
2904 int event_id = m_PlayerSoundEventHandler.ConvertAnimIDtoEventID(pUserInt);
2905 if (event_id > 0)
2906 {
2908 return;
2909 }
2910 }
2912 }
2913 else
2914 Debug.Log("OnSoundEvent: Unknown sound event \"" + pEventType + "\"");
2915 }
void ProcessSoundEvent(string pEventType, string pUserString, int pUserInt)
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
AbstractWave ProcessVoiceEvent(string pEventType, string pUserString, int pUserInt)
void ProcessAttachmentEvent(string pEventType, string pUserString, int pUserInt)
bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
void ProcessWeaponEvent(string pEventType, string pUserString, int pUserInt)
Definition Debug.c:14
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.
Definition Debug.c:133

References GetInstanceType(), and Debug::Log().

◆ OnSprintEnd()

void DayZPlayer::OnSprintEnd ( )
inlineprotected

Definition at line 2543 of file DayZPlayerImplement.c.

2544 {
2545 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT)
2546 {
2547 GetUApi().GetInputByID(UALeanLeft).Unlock();
2548 GetUApi().GetInputByID(UALeanRight).Unlock();
2549 }
2550 }

References GetInstanceType(), and GetUApi().

◆ OnSprintStart()

void DayZPlayer::OnSprintStart ( )
inlineprotected

Definition at line 2534 of file DayZPlayerImplement.c.

2535 {
2536 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT)
2537 {
2538 GetUApi().GetInputByID(UALeanLeft).Lock();
2539 GetUApi().GetInputByID(UALeanRight).Lock();
2540 }
2541 }

References GetInstanceType(), and GetUApi().

◆ OnStepEvent()

void DayZPlayer::OnStepEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

Event Processing

Definition at line 2777 of file DayZPlayerImplement.c.

2778 {
2782
2783#ifndef SERVER
2784 DayZPlayerTypeStepSoundLookupTable table = type.GetStepSoundLookupTable();
2786 if (pUserInt < 100)
2787 {
2788 string surface;
2789 if (pUserInt % 2 == 1)
2790 {
2791 surface = GetSurfaceType(SurfaceAnimationBone.LeftBackLimb);
2792 if (surface.Length() == 0)//if no surface found, try other leg
2793 surface = GetSurfaceType(SurfaceAnimationBone.RightBackLimb);
2794 }
2795 else
2796 {
2797 surface = GetSurfaceType(SurfaceAnimationBone.RightBackLimb);
2798 if (surface.Length() == 0)//if no surface found, try other leg
2799 surface = GetSurfaceType(SurfaceAnimationBone.LeftBackLimb);
2800 }
2801
2802 if (surface.Length() != 0)
2803 m_LastSurfaceUnderHash = surface.Hash();
2804
2805 soundBuilder = table.GetSoundBuilder(pUserInt, state.m_iMovement, m_LastSurfaceUnderHash, GetBootsType());
2806 }
2807 else
2808 {
2809 string surface2 = GetSurfaceType();
2810 if (surface2.Length() != 0)
2812
2813 soundBuilder = table.GetSoundBuilder(pUserInt, state.m_iMovement, m_LastSurfaceUnderHash, GetBootsType());
2814 }
2815
2816 if (soundBuilder != NULL && GetGame().GetPlayer())
2817 {
2818 vector orientation = Vector(0, 0, 0);
2819 vector edgeLength = Vector(1.5, 3.0, 1.5);
2822
2824 {
2825 for (int i = 0; i < collidedObjects.Count(); ++i)
2826 {
2827 string objectClass = collidedObjects.Get(i).GetType();
2828
2829 if (objectClass.Contains("BushSoft") || objectClass.Contains("BushHard"))
2830 {
2831 for (int j = 0; j < type.GetVegetationSounds().Count(); ++j)
2832 {
2833 VegetationSound vegetationSound = type.GetVegetationSounds().Get(j);
2834
2835 if (vegetationSound.GetAnimEventIds().Find(pUserInt) >= 0)
2836 {
2838 SoundObject vegSoundObject = vegetationSound.GetSoundObjectBuilder().BuildSoundObject();
2839
2840 if (vegSoundObject != NULL)
2841 {
2844 }
2845
2846 break;
2847 }
2848 }
2849
2850 break;
2851 }
2852 }
2853 }
2854
2855 SoundObject soundObject = soundBuilder.BuildSoundObject();
2856 if (soundObject != NULL)
2857 {
2860 }
2861 }
2862#endif
2863
2864 if (GetGame().IsServer())
2865 {
2866 m_StepCounter++;//move outside of server condition if needed on client as well
2867
2868 float noiseMultiplier = 0;
2869
2871 if (state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_ERECT || state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDERECT)
2872 noiseParams = type.GetNoiseParamsStand();
2873 else if (state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_CROUCH || state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
2874 noiseParams = type.GetNoiseParamsCrouch();
2875 else if (state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
2876 noiseParams = type.GetNoiseParamsProne();
2877 else
2878 {
2879 Debug.Log(string.Format("Wrong stance, id: %1 using backup with stand stance (id: 0)", state.m_iStanceIdx));
2880 noiseParams = type.GetNoiseParamsStand();
2881 }
2882
2884
2886
2889 }
2890 }
void PlaySound()
void ProcessFeetDamageServer(int pUserInt)
void AttenuateSoundIfNecessary(SoundObject soundObject)
AnimBootsType GetBootsType()
static float GetNoiseMultiplier(DayZPlayerImplement playerImplement)
static const int CHECK_EVERY_N_STEP
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
proto native int Length()
Returns length of string.
proto native int Hash()
Returns hash of string.

References AddNoise(), PlayerConstants::CHECK_EVERY_N_STEP, Count, DayZPlayerType(), GetDayZPlayerType(), GetGame(), GetMovementState(), NoiseAIEvaluate::GetNoiseMultiplier(), GetPlayer(), GetPosition, string::Hash(), string::Length(), Debug::Log(), NoiseParams(), PlaySound(), SoundObject(), and Vector().

◆ OnSyncJuncture()

void DayZPlayer::OnSyncJuncture ( int pJunctureID,
ParamsReadContext pCtx )
inlineprotected

SyncJunctures

Definition at line 2603 of file DayZPlayerImplement.c.

2604 {
2605 switch (pJunctureID)
2606 {
2608 if (m_DeathAnimType == -2)
2610 break;
2611
2615 m_SyncedHitDataArray.Insert(data);
2616 break;
2617 }
2618 }
static bool ReadDamageHitParamsEx(ParamsReadContext pCtx, out SyncHitInfo pData)
static bool ReadDeathParams(ParamsReadContext pCtx, out int pType, out float pHitDir)

References DayZPlayerSyncJunctures::ReadDamageHitParamsEx(), DayZPlayerSyncJunctures::ReadDeathParams(), DayZPlayerSyncJunctures::SJ_DAMAGE_HIT, and DayZPlayerSyncJunctures::SJ_DEATH.

◆ OnVariablesSynchronized()

override void DayZPlayer::OnVariablesSynchronized ( )
inlineprotected

Definition at line 480 of file DayZPlayerImplement.c.

481 {
482 if (m_TriggerPullPlayerOutOfVehicleSynch && !GetGame().IsDedicatedServer())
484
485 super.OnVariablesSynchronized();
486 }
void TriggerPullPlayerOutOfVehicleImpl()
bool m_TriggerPullPlayerOutOfVehicleSynch

References GetGame().

◆ OverrideShootFromCamera()

void DayZPlayer::OverrideShootFromCamera ( bool pState)
inlineprotected

Definition at line 224 of file DayZPlayerImplement.c.

225 {
227 }

Referenced by EmoteBase::OnBeforeStandardCallbackCreated(), and OnEmoteEnd().

◆ OverrideSlidePoseAngle()

void DayZPlayer::OverrideSlidePoseAngle ( float value)
inlineprotected

movement sliding override, originally for FB gestures

Definition at line 3245 of file DayZPlayerImplement.c.

3246 {
3247 if (!m_MoveSettings)
3248 m_MoveSettings = GetDayZPlayerType().CommandMoveSettingsW();
3249 if (m_MoveSettings.m_fSlidingPoseAngle != value)
3250 {
3251 m_MoveSettings.m_fSlidingPoseAngle = value;
3252 StartCommand_Move(); //nescessary, re-initializes with adjusted values
3253 }
3254 }
SHumanCommandMoveSettings m_MoveSettings

References GetDayZPlayerType(), and StartCommand_Move().

◆ PlaySound()

AbstractWave DayZPlayer::PlaySound ( SoundObject so,
SoundObjectBuilder sob )
inlineprotected

Sounds

Definition at line 2756 of file DayZPlayerImplement.c.

2757 {
2758 if (so == null)
2759 return null;
2760
2761 so.SetPosition(GetPosition());
2762 AbstractWave wave = GetGame().GetSoundScene().Play3D(so, sob);
2763 return wave;
2764 }

References GetGame(), and GetPosition.

◆ PlaySoundEvent()

bool DayZPlayer::PlaySoundEvent ( EPlayerSoundEventID id,
bool from_anim_system = false,
bool is_from_server = false )
inlineprotected

◆ PlaySoundEventEx()

bool DayZPlayer::PlaySoundEventEx ( EPlayerSoundEventID id,
bool from_anim_system = false,
bool is_from_server = false,
int param = 0 )
inlineprotected

Definition at line 396 of file DayZPlayerImplement.c.

396{};

Referenced by PlaySound().

◆ ProcessAttachmentEvent()

void DayZPlayer::ProcessAttachmentEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

Definition at line 2975 of file DayZPlayerImplement.c.

2976 {
2978 DayZPlayerTypeAttachmentSoundLookupTable table = type.GetAttachmentSoundLookupTable();
2979
2981 pUserString.Split(",", attachments);
2982 for (int i = 0; i < attachments.Count(); i++)
2983 {
2984 int attachmentHash = -1;
2985 if (attachments[i] == "shoulder")
2987 else if (attachments[i] == "body")
2989 else if (attachments[i] == "back")
2991
2993
2994 if (soundBuilder != NULL)
2995 {
2996 SoundObject soundObject = soundBuilder.BuildSoundObject();
2997 if (soundObject != NULL)
2998 {
3001 }
3002 }
3003 }
3004 }
AnimBackType GetBackAttachmentType()
AnimRangedWeaponType GetShoulderAttachmentType()
AnimUpperBodyType GetBodyAttachmentType()

References DayZPlayerType(), GetDayZPlayerType(), PlaySound(), and SoundObject().

◆ ProcessFeetDamageServer()

void DayZPlayer::ProcessFeetDamageServer ( int pUserInt)
protected

◆ ProcessLiftWeapon()

void DayZPlayer::ProcessLiftWeapon ( )
protected

◆ ProcessSoundEvent()

void DayZPlayer::ProcessSoundEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

Definition at line 3035 of file DayZPlayerImplement.c.

3036 {
3038 DayZPlayerTypeAnimTable table = type.GetSoundTable();
3040 if (table)
3041 soundEvent = table.GetSoundEvent(pUserInt);
3042
3043 if (soundEvent != NULL)
3044 {
3045 if (!GetGame().IsDedicatedServer())
3046 {
3047 SoundObjectBuilder objectBuilder = soundEvent.GetSoundBuilder();
3048 if (GetCommand_Ladder())
3050 objectBuilder.AddEnvSoundVariables(GetPosition());
3051
3052 SoundObject soundObject = objectBuilder.BuildSoundObject();
3053 if (soundObject != NULL)
3054 {
3057 }
3058 }
3059
3060 if (GetGame().IsServer())
3061 {
3062 if (soundEvent.m_NoiseParams != NULL)
3063 GetGame().GetNoiseSystem().AddNoise(this, soundEvent.m_NoiseParams);
3064 }
3065 }
3066 }
void SetVariablesLadderSoundObjectBuilder(SoundObjectBuilder soundObjectBuilder)
proto native HumanCommandLadder GetCommand_Ladder()

References DayZPlayerType(), GetCommand_Ladder(), GetDayZPlayerType(), GetGame(), GetPosition, PlaySound(), and SoundObject().

◆ ProcessVoiceEvent()

AbstractWave DayZPlayer::ProcessVoiceEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

Definition at line 3069 of file DayZPlayerImplement.c.

3070 {
3071#ifdef SERVER//none of this code needs to run on server, ifdef put here rather than before the method call to maintain mod compatibility
3072 return null;
3073#endif
3075 DayZPlayerTypeVoiceSoundLookupTable table = type.GetVoiceSoundLookupTable();
3076 if (!table)
3077 return null;
3079 EntityAI mask = GetInventory().FindAttachment(InventorySlots.MASK);
3080 EntityAI head_gear = GetInventory().FindAttachment(InventorySlots.HEADGEAR);
3081
3082 string category;
3083 if (mask || head_gear)
3084 {
3085 string category_mask;
3086 string category_headgear;
3087
3088 int priority_mask;
3090
3091 if (mask)
3092 {
3093 category_mask = mask.ConfigGetString("soundVoiceType");
3094 priority_mask = mask.ConfigGetInt("soundVoicePriority");
3095 }
3096 if (head_gear)
3097 {
3098 category_headgear = head_gear.ConfigGetString("soundVoiceType");
3099 priority_headgear = head_gear.ConfigGetInt("soundVoicePriority");
3100 }
3101
3104 else
3106 }
3107
3108 if (category == "")
3109 category = "none";
3110
3111 SoundObjectBuilder soundBuilder = table.GetSoundBuilder(pUserInt, category.Hash());
3112
3113 if (soundBuilder)
3114 {
3115 PlayerBase player = PlayerBase.Cast(this);
3116 //this code block looks super shady, but it's the only way the sounds play correctly, god knows what's going on on c++ side
3117 int maleVoiceType = 0;
3118 int femaleVoiceType = 0;
3119 if (player.IsMale())
3120 maleVoiceType = player.GetVoiceType();
3121 else
3122 femaleVoiceType = player.GetVoiceType();
3123
3124 soundBuilder.AddVariable("male", maleVoiceType);
3125 soundBuilder.AddVariable("female", femaleVoiceType);
3126
3127 // end of weirdness
3128 SoundObject soundObject = soundBuilder.BuildSoundObject();
3129 if (soundObject != NULL)
3130 {
3133 }
3134
3135 }
3136
3137 return wave;
3138 }

References DayZPlayerType(), GetDayZPlayerType(), PlaySound(), and SoundObject().

Referenced by Play().

◆ ProcessWeaponEvent()

void DayZPlayer::ProcessWeaponEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected

Definition at line 2923 of file DayZPlayerImplement.c.

2924 {
2927
2928 float quantity = 0;
2929
2930 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
2931 if (entityInHands && entityInHands.IsInherited(ItemBase))
2932 {
2933 ItemBase item;
2935 if (item.HasQuantity())
2936 quantity = (float)item.GetQuantity() / (item.GetQuantityMax() - item.GetQuantityMin());
2937 InventoryItemType invItemType = item.GetInventoryItemType();
2938 soundEvent = invItemType.GetSoundEvent(pUserInt);
2939 }
2940
2941 if (soundEvent == null)
2942 {
2943 quantity = 0;
2944 soundEvent = type.GetSoundWeaponEvent(pUserInt);
2945 }
2946
2947 if (soundEvent != null)
2948 {
2949 if (!GetGame().IsDedicatedServer())
2950 {
2952 if (builder)
2953 {
2954 builder.AddVariable("quantity", quantity);
2955 builder.AddVariable("interior", IsSoundInsideBuilding());
2956
2957 SoundObject soundObject = builder.BuildSoundObject();
2958 if (soundObject != NULL)
2959 {
2962 }
2963 }
2964 else
2965 {
2966 //TODO:Userful error message
2967 }
2968 }
2969
2970 if (GetGame().IsServer())
2971 AddNoise(soundEvent.m_NoiseParams);
2972 }
2973 }

References AddNoise(), Class::CastTo(), DayZPlayerType(), GetDayZPlayerType(), GetGame(), PlaySound(), and SoundObject().

◆ RequestSoundEvent()

void DayZPlayer::RequestSoundEvent ( EPlayerSoundEventID id,
bool from_server_and_client = false )
protected

◆ RequestSoundEventEx()

void DayZPlayer::RequestSoundEventEx ( EPlayerSoundEventID id,
bool from_server_and_client = false,
int param = 0 )
protected

◆ ResetDamageHitState()

void DayZPlayer::ResetDamageHitState ( bool resetTimer)
inlineprotected

Definition at line 1135 of file DayZPlayerImplement.c.

1136 {
1138 m_DamageHitFullbody = false;
1139
1140 if (resetTimer)
1141 m_HitElapsedTime = 0;
1142 }

◆ ResetDeathStartTime()

void DayZPlayer::ResetDeathStartTime ( )
inlineprotected

Definition at line 567 of file DayZPlayerImplement.c.

568 {
570 }
proto native void ResetDeathCooldown()

References ResetDeathCooldown().

◆ ResetWeaponRaiseProgress()

void DayZPlayer::ResetWeaponRaiseProgress ( )
inlineprotected

Definition at line 730 of file DayZPlayerImplement.c.

731 {
734 }

◆ RunADSTimer()

void DayZPlayer::RunADSTimer ( )
protected

◆ SendCompleteWeaponRaiseJuncture()

void DayZPlayer::SendCompleteWeaponRaiseJuncture ( )
protected

◆ SendDeathJuncture()

void DayZPlayer::SendDeathJuncture ( int pAnimTypeDeath,
float pAnimHitDirDeath )
inlineprotected

Definition at line 596 of file DayZPlayerImplement.c.

597 {
599 return;
600
602 m_DeathJuctureSent = true;
603 }
static void SendDeath(DayZPlayer pPlayer, int pType, float pHitDir)

References DayZPlayerSyncJunctures::SendDeath().

◆ SendSoundEvent()

void DayZPlayer::SendSoundEvent ( EPlayerSoundEventID id)
protected

◆ SendSoundEventEx()

void DayZPlayer::SendSoundEventEx ( EPlayerSoundEventID id,
int param = 0 )
protected

◆ SetClimbingLadderType()

void DayZPlayer::SetClimbingLadderType ( string value)
inlineprotected

Definition at line 369 of file DayZPlayerImplement.c.

370 {
372 }
string m_ClimbingLadderType

◆ SetCurrentWaterLevel()

override void DayZPlayer::SetCurrentWaterLevel ( float pWaterLevel)
inlineprotected

Definition at line 291 of file DayZPlayerImplement.c.

292 {
294 }

Referenced by DayZPlayerImplementSwimming::HandleSwimming().

◆ SetDeathDarknessLevel()

void DayZPlayer::SetDeathDarknessLevel ( float duration,
float tick_time )
protected

◆ SetFallYDiff()

void DayZPlayer::SetFallYDiff ( float value)
inlineprotected

Definition at line 281 of file DayZPlayerImplement.c.

282 {
284 }

◆ SetHandheldOpticsInUse()

void DayZPlayer::SetHandheldOpticsInUse ( bool state)
inlineprotected

Definition at line 3320 of file DayZPlayerImplement.c.

3321 {
3323 }

◆ SetIronsights()

void DayZPlayer::SetIronsights ( bool value)
inlineprotected

Definition at line 296 of file DayZPlayerImplement.c.

297 {
298 Weapon_Base weapon = Weapon_Base.Cast(GetHumanInventory().GetEntityInHands());
299 if (weapon)
301
303
304 if (value)
305 {
307 if (hcw)
308 hcw.SetADS(true);
309 }
310 }

References GetCommandModifier_Weapons().

◆ SetIsInThirdPerson()

void DayZPlayer::SetIsInThirdPerson ( bool state)
inlineprotected

Definition at line 244 of file DayZPlayerImplement.c.

245 {
247 }

◆ SetOptics()

void DayZPlayer::SetOptics ( bool value)
inlineprotected

Definition at line 312 of file DayZPlayerImplement.c.

313 {
315
316 if (value)
317 {
319 if (hcw)
320 hcw.SetADS(!IsHandheldOpticsInUse());
321 }
322 }

References GetCommandModifier_Weapons().

◆ SetReturnToOptics()

void DayZPlayer::SetReturnToOptics ( bool state)
protected

◆ SetSuicide()

void DayZPlayer::SetSuicide ( bool state)
inlineprotected

Definition at line 3275 of file DayZPlayerImplement.c.

3276 {
3277 m_Suicide = state;
3278 }

Referenced by CommitSuicide(), and EmoteBase::OnCallbackEnd().

◆ SetVariablesLadderSoundObjectBuilder()

void DayZPlayer::SetVariablesLadderSoundObjectBuilder ( SoundObjectBuilder soundObjectBuilder)
inlineprotected

Definition at line 3006 of file DayZPlayerImplement.c.

3007 {
3008 if (m_ClimbingLadderType == "wood")
3009 soundObjectBuilder.AddVariable("laddertype", 1);
3010 else
3011 soundObjectBuilder.AddVariable("laddertype", 0);
3012
3014
3015 if (pBoots == AnimBootsType.None)
3016 {
3017 soundObjectBuilder.AddVariable("bare", 1);
3018 soundObjectBuilder.AddVariable("sneakers", 0);
3019 soundObjectBuilder.AddVariable("boots", 0);
3020 }
3021 else if (pBoots == AnimBootsType.Sneakers)
3022 {
3023 soundObjectBuilder.AddVariable("bare", 0);
3024 soundObjectBuilder.AddVariable("sneakers", 1);
3025 soundObjectBuilder.AddVariable("boots", 0);
3026 }
3027 else if (pBoots == AnimBootsType.Boots)
3028 {
3029 soundObjectBuilder.AddVariable("bare", 0);
3030 soundObjectBuilder.AddVariable("sneakers", 0);
3031 soundObjectBuilder.AddVariable("boots", 1);
3032 }
3033 }

◆ ShowDeadScreen()

void DayZPlayer::ShowDeadScreen ( bool show,
float duration )
inlineprotected

Definition at line 612 of file DayZPlayerImplement.c.

613 {
614#ifndef NO_GUI
615 if (show && IsPlayerSelected())
616 {
617#ifdef PLATFORM_PS4
619#endif
620
621 string message = "";
622 if (!GetGame().GetMission().IsPlayerRespawning())
623 message = "#dayz_implement_dead";
624
625#ifdef PLATFORM_CONSOLE
626 GetGame().GetUIManager().ScreenFadeIn(duration, message, FadeColors.DARK_RED, FadeColors.WHITE);
627#else
628 GetGame().GetUIManager().ScreenFadeIn(duration, message, FadeColors.BLACK, FadeColors.WHITE);
629#endif
630 }
631 else
632 {
633 GetGame().GetUIManager().ScreenFadeOut(duration);
634
635 if (duration > 0)
636 GetGame().GetCallQueue(CALL_CATEGORY_GUI).CallLater(StopDeathDarkeningEffect, duration * 1000, false);
637 else
639 }
640#endif
641 }
override void StopDeathDarkeningEffect()
static void SetMultiplayState(bool state)
const int CALL_CATEGORY_GUI
Definition tools.c:9

References CALL_CATEGORY_GUI, GetGame(), and OnlineServices::SetMultiplayState().

◆ ShowWeaponDebug()

void DayZPlayer::ShowWeaponDebug ( bool show)
inlineprotected

Definition at line 268 of file DayZPlayerImplement.c.

269 {
270 if (show)
272 else
274 }

◆ SimulateDeath()

void DayZPlayer::SimulateDeath ( bool state)
inlineprotected

Definition at line 652 of file DayZPlayerImplement.c.

653 {
654 if (g_Game.GetMissionState() != DayZGame.MISSION_STATE_GAME)
655 return;
656
658
659 if (state)
660 {
662 if (m_KilledByHeadshot)
663 duration = 0;
664
666 {
669
671 m_DeathEffectTimer.Run(DYING_PROGRESSION_TIME, this, "SetDeathDarknessLevel", par, true);
672 }
673
675
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);
681 }
682 else
683 {
686 }
687 }
void LockControls(bool state)
void ShowDeadScreen(bool show, float duration)
ref DeathEffectTimer m_DeathEffectTimer
static const float DEFAULT_DYING_TIME
DEPRECATED.
static const float DYING_PROGRESSION_TIME
how long does it take to full death screen [s]

References g_Game, and GetGame().

◆ StopADSTimer()

void DayZPlayer::StopADSTimer ( )
protected

◆ StopDeathDarkeningEffect()

override void DayZPlayer::StopDeathDarkeningEffect ( )
inlineprotected

Definition at line 643 of file DayZPlayerImplement.c.

644 {
645 if (m_DeathEffectTimer && m_DeathEffectTimer.IsRunning())
646 {
647 m_DeathEffectTimer.Stop();
649 }
650 }

◆ StopHandEvent()

void DayZPlayer::StopHandEvent ( )
inlineprotected

Definition at line 1512 of file DayZPlayerImplement.c.

1513 {
1514 GetDayZPlayerInventory().CancelHandEvent();
1515 }

◆ StopWeaponEvent()

void DayZPlayer::StopWeaponEvent ( )
inlineprotected

Definition at line 1517 of file DayZPlayerImplement.c.

1518 {
1519 GetDayZPlayerInventory().CancelWeaponEvent();
1520 }

◆ SwitchOptics()

void DayZPlayer::SwitchOptics ( ItemOptics optic,
bool state )
inlineprotected

Definition at line 345 of file DayZPlayerImplement.c.

346 {
347 if (optic)
348 {
349 if (state)
350 {
351 if (optic.HasEnergyManager())
352 optic.GetCompEM().SwitchOn();
353 optic.EnterOptics();
354 optic.OnOpticEnter();
355 }
356 else
357 {
358 optic.ExitOptics();
359 optic.OnOpticExit();
360 if (optic.HasEnergyManager())
361 optic.GetCompEM().SwitchOff();
362 }
363 }
364
365 if (m_CameraOptics != state)
367 }

◆ TriggerPullPlayerOutOfVehicle()

void DayZPlayer::TriggerPullPlayerOutOfVehicle ( )
inlineprotected

Definition at line 432 of file DayZPlayerImplement.c.

433 {
434 if (!GetGame().IsServer())
435 return;
436
439 return;
440
441 int crewIdx = -1;
442 for (int i = 0; i < transport.CrewSize(); ++i)
443 {
444 if (transport.CrewMember(i) == this)
445 {
446 crewIdx = i;
447 break;
448 }
449 }
450
451 if (crewIdx == -1)
452 return;
453
454 transport.CrewGetOut(crewIdx);
456
457 SetSynchDirty();
458 }

References Class::CastTo(), GetGame(), and GetParent().

◆ TriggerPullPlayerOutOfVehicleImpl()

void DayZPlayer::TriggerPullPlayerOutOfVehicleImpl ( )
inlineprotected

Reset the cooldown so simulation doesn't automatically get re-disabled

Synced to re-enable simulation on client as the death processing sets disable simulation to local only

Handle own client animation freeze

Definition at line 460 of file DayZPlayerImplement.c.

461 {
464
466 DisableSimulation(false);
467
468 switch (GetInstanceType())
469 {
470 case DayZPlayerInstanceType.INSTANCETYPE_SERVER:
471 case DayZPlayerInstanceType.INSTANCETYPE_CLIENT:
472 case DayZPlayerInstanceType.INSTANCETYPE_AI_SERVER:
473 case DayZPlayerInstanceType.INSTANCETYPE_AI_SINGLEPLAYER:
476 break;
477 }
478 }

References GetInstanceType(), and ResetDeathCooldown().

Member Data Documentation

◆ DEAD_SCREEN_DELAY

const int DayZPlayer::DEAD_SCREEN_DELAY = 1000
staticprivate

Definition at line 72 of file DayZPlayerImplement.c.

◆ DEFAULT_DYING_TIME

const float DayZPlayer::DEFAULT_DYING_TIME = 2.5
staticprivate

DEPRECATED.

Definition at line 73 of file DayZPlayerImplement.c.

◆ DYING_PROGRESSION_TIME

const float DayZPlayer::DYING_PROGRESSION_TIME = 0.05
staticprivate

how long does it take to full death screen [s]

Definition at line 74 of file DayZPlayerImplement.c.

◆ HIT_INTERVAL_MIN

const float DayZPlayer::HIT_INTERVAL_MIN = 0.3
protected

Definition at line 1042 of file DayZPlayerImplement.c.

◆ m_ActionSoundCategoryHash

int DayZPlayer::m_ActionSoundCategoryHash
protected

Definition at line 142 of file DayZPlayerImplement.c.

◆ m_ADSAutomationTimer

ref Timer DayZPlayer::m_ADSAutomationTimer
protected

Definition at line 3362 of file DayZPlayerImplement.c.

◆ m_ADSTimerLaunched

bool DayZPlayer::m_ADSTimerLaunched
protected

Definition at line 3363 of file DayZPlayerImplement.c.

◆ m_AimingFinisherStarted

bool DayZPlayer::m_AimingFinisherStarted = false
protected

Definition at line 133 of file DayZPlayerImplement.c.

◆ m_AimingModel

ref DayZPlayerImplementAiming DayZPlayer::m_AimingModel
protected

Definition at line 78 of file DayZPlayerImplement.c.

◆ m_bADS

bool DayZPlayer::m_bADS
protected

Definition at line 95 of file DayZPlayerImplement.c.

◆ m_Camera3rdPerson

bool DayZPlayer::m_Camera3rdPerson
protected

Definition at line 93 of file DayZPlayerImplement.c.

◆ m_CameraEyeZoom

bool DayZPlayer::m_CameraEyeZoom
protected

Definition at line 3361 of file DayZPlayerImplement.c.

◆ m_CameraEyeZoomLevel

ECameraZoomType DayZPlayer::m_CameraEyeZoomLevel
protected

Definition at line 98 of file DayZPlayerImplement.c.

◆ m_CameraIronsight

bool DayZPlayer::m_CameraIronsight
protected

Definition at line 100 of file DayZPlayerImplement.c.

◆ m_CameraOptics

bool DayZPlayer::m_CameraOptics
protected

Definition at line 101 of file DayZPlayerImplement.c.

◆ m_CameraZoomToggle

bool DayZPlayer::m_CameraZoomToggle
protected

Definition at line 94 of file DayZPlayerImplement.c.

◆ m_ClimbingLadderType

string DayZPlayer::m_ClimbingLadderType
protected

Definition at line 123 of file DayZPlayerImplement.c.

◆ m_ContinueFirearmMelee

bool DayZPlayer::m_ContinueFirearmMelee
protected

Definition at line 117 of file DayZPlayerImplement.c.

◆ m_CurrentWaterLevel

float DayZPlayer::m_CurrentWaterLevel
private

Definition at line 136 of file DayZPlayerImplement.c.

◆ m_DamageHealth

float DayZPlayer::m_DamageHealth = 0.0
protected

Definition at line 1040 of file DayZPlayerImplement.c.

◆ m_DamageHitAnimType

int DayZPlayer::m_DamageHitAnimType = -1.0
protected

Definition at line 1038 of file DayZPlayerImplement.c.

◆ m_DamageHitDir

float DayZPlayer::m_DamageHitDir = 0.0
protected

Definition at line 1039 of file DayZPlayerImplement.c.

◆ m_DamageHitFullbody

bool DayZPlayer::m_DamageHitFullbody = false
protected

HandleDamageHit

Definition at line 1037 of file DayZPlayerImplement.c.

◆ m_DeathAnimType

int DayZPlayer::m_DeathAnimType = -2
protected

HandleDeath

Definition at line 413 of file DayZPlayerImplement.c.

◆ m_DeathDarkeningCurrentTime

float DayZPlayer::m_DeathDarkeningCurrentTime
protected

Definition at line 103 of file DayZPlayerImplement.c.

◆ m_DeathEffectTimer

ref DeathEffectTimer DayZPlayer::m_DeathEffectTimer
protected

Definition at line 114 of file DayZPlayerImplement.c.

◆ m_DeathHitDir

float DayZPlayer::m_DeathHitDir = 0
protected

Definition at line 414 of file DayZPlayerImplement.c.

◆ m_DeathJuctureSent

bool DayZPlayer::m_DeathJuctureSent = false
protected

Definition at line 415 of file DayZPlayerImplement.c.

◆ m_DebugDirectionVal

float DayZPlayer::m_DebugDirectionVal = -180
protected

VKOSTIK - tady dat 0 misto -1.

Definition at line 2228 of file DayZPlayerImplement.c.

◆ m_DebugTypeVal

bool DayZPlayer::m_DebugTypeVal = false
protected

Definition at line 2229 of file DayZPlayerImplement.c.

◆ m_DebugWeaponChangeItem

string DayZPlayer::m_DebugWeaponChangeItem
protected

Definition at line 2232 of file DayZPlayerImplement.c.

◆ m_DebugWeaponChangeShowSlot

int DayZPlayer::m_DebugWeaponChangeShowSlot
protected

Definition at line 2233 of file DayZPlayerImplement.c.

◆ m_DebugWeaponChangeStage

int DayZPlayer::m_DebugWeaponChangeStage = 0
protected

Definition at line 2231 of file DayZPlayerImplement.c.

◆ m_dT

float DayZPlayer::m_dT
protected

Definition at line 144 of file DayZPlayerImplement.c.

◆ m_FallDamage

ref DayZPlayerImplementFallDamage DayZPlayer::m_FallDamage
protected

Definition at line 84 of file DayZPlayerImplement.c.

◆ m_FallYDiff

float DayZPlayer::m_FallYDiff
protected

Definition at line 87 of file DayZPlayerImplement.c.

◆ m_FightEndBlendTimer

ref Timer DayZPlayer::m_FightEndBlendTimer
protected

Definition at line 115 of file DayZPlayerImplement.c.

◆ m_fLastHeadingDiff

float DayZPlayer::m_fLastHeadingDiff = 0
protected

This HeadingModel

Definition at line 1319 of file DayZPlayerImplement.c.

◆ m_HandheldOpticsInUse

bool DayZPlayer::m_HandheldOpticsInUse
protected

Definition at line 125 of file DayZPlayerImplement.c.

◆ m_HitElapsedTime

float DayZPlayer::m_HitElapsedTime = HIT_INTERVAL_MIN
protected

Definition at line 1043 of file DayZPlayerImplement.c.

◆ m_isFBsymptomPlaying

bool DayZPlayer::m_isFBsymptomPlaying
protected

◆ m_IsFireWeaponRaised

bool DayZPlayer::m_IsFireWeaponRaised
protected

Definition at line 3365 of file DayZPlayerImplement.c.

◆ m_IsRaised

bool DayZPlayer::m_IsRaised
protected

Definition at line 91 of file DayZPlayerImplement.c.

◆ m_IsShootingFromCamera

bool DayZPlayer::m_IsShootingFromCamera
protected

Definition at line 105 of file DayZPlayerImplement.c.

◆ m_IsTryingHoldBreath

bool DayZPlayer::m_IsTryingHoldBreath
protected

Definition at line 104 of file DayZPlayerImplement.c.

◆ m_IsUnconscious

bool DayZPlayer::m_IsUnconscious
protected

Definition at line 108 of file DayZPlayerImplement.c.

◆ m_IsUnconsciousFalling

bool DayZPlayer::m_IsUnconsciousFalling
protected

Definition at line 110 of file DayZPlayerImplement.c.

◆ m_IsWeapon

bool DayZPlayer::m_IsWeapon
protected

Definition at line 134 of file DayZPlayerImplement.c.

◆ m_JumpClimb

ref DayZPlayerImplementJumpClimb DayZPlayer::m_JumpClimb
protected

Definition at line 83 of file DayZPlayerImplement.c.

◆ m_LastBackSoundTime

int DayZPlayer::m_LastBackSoundTime
protected

Definition at line 1838 of file DayZPlayerImplement.c.

◆ m_LastBackSoundTime2

int DayZPlayer::m_LastBackSoundTime2
protected

Definition at line 1839 of file DayZPlayerImplement.c.

◆ m_LastCommandBeforeUnconscious

int DayZPlayer::m_LastCommandBeforeUnconscious
protected

Definition at line 112 of file DayZPlayerImplement.c.

◆ m_LastHeadingAngle

float DayZPlayer::m_LastHeadingAngle
protected

Definition at line 1837 of file DayZPlayerImplement.c.

◆ m_LastHeadingAngleBlock

float DayZPlayer::m_LastHeadingAngleBlock
protected

Definition at line 1835 of file DayZPlayerImplement.c.

◆ m_LastHeadingAngleBlock2

float DayZPlayer::m_LastHeadingAngleBlock2
protected

Definition at line 1836 of file DayZPlayerImplement.c.

◆ m_LastSurfaceUnderHash

int DayZPlayer::m_LastSurfaceUnderHash
protected

Definition at line 121 of file DayZPlayerImplement.c.

◆ m_LiftWeapon_player

bool DayZPlayer::m_LiftWeapon_player
protected

Definition at line 118 of file DayZPlayerImplement.c.

◆ m_MeleeCombat

ref DayZPlayerImplementMeleeCombat DayZPlayer::m_MeleeCombat
protected

Definition at line 79 of file DayZPlayerImplement.c.

◆ m_MeleeFightLogic

ref DayZPlayerMeleeFightLogic_LightHeavy DayZPlayer::m_MeleeFightLogic
protected

Definition at line 80 of file DayZPlayerImplement.c.

◆ m_MovementState

ref HumanMovementState DayZPlayer::m_MovementState = new HumanMovementState()
private

time step for gradual update of dead screen visibilibty up to full visbility [s]

cached ptr for movement state

Definition at line 77 of file DayZPlayerImplement.c.

◆ m_MoveSettings

SHumanCommandMoveSettings DayZPlayer::m_MoveSettings
protected

Definition at line 86 of file DayZPlayerImplement.c.

◆ m_NextVoNNoiseTime

int DayZPlayer::m_NextVoNNoiseTime
protected

Definition at line 128 of file DayZPlayerImplement.c.

◆ m_PlayerSelected

bool DayZPlayer::m_PlayerSelected
protected

Definition at line 106 of file DayZPlayerImplement.c.

◆ m_PlayerSoundEventHandler

ref PlayerSoundEventHandler DayZPlayer::m_PlayerSoundEventHandler
protected

Definition at line 85 of file DayZPlayerImplement.c.

◆ m_ProcessFirearmMeleeHit

bool DayZPlayer::m_ProcessFirearmMeleeHit
protected

Definition at line 116 of file DayZPlayerImplement.c.

◆ m_ProcessLiftWeapon

bool DayZPlayer::m_ProcessLiftWeapon
protected

Definition at line 119 of file DayZPlayerImplement.c.

◆ m_ProcessLiftWeaponState

bool DayZPlayer::m_ProcessLiftWeaponState
protected

Definition at line 120 of file DayZPlayerImplement.c.

◆ m_ProcessWeaponRaiseCompleted

bool DayZPlayer::m_ProcessWeaponRaiseCompleted
protected

Definition at line 3364 of file DayZPlayerImplement.c.

◆ m_PullPlayerOutOfVehicleKeepsInLocalSpace

bool DayZPlayer::m_PullPlayerOutOfVehicleKeepsInLocalSpace = false
protected

Definition at line 140 of file DayZPlayerImplement.c.

◆ m_PullPlayerOutOfVehicleState

int DayZPlayer::m_PullPlayerOutOfVehicleState = -1
protected

Definition at line 141 of file DayZPlayerImplement.c.

◆ m_RaiseStarted

bool DayZPlayer::m_RaiseStarted = false
protected

Definition at line 132 of file DayZPlayerImplement.c.

◆ m_ResetADS

bool DayZPlayer::m_ResetADS
protected

Definition at line 126 of file DayZPlayerImplement.c.

◆ m_ShouldBeUnconscious

bool DayZPlayer::m_ShouldBeUnconscious
protected

Definition at line 109 of file DayZPlayerImplement.c.

◆ m_ShouldReload

bool DayZPlayer::m_ShouldReload
protected

Definition at line 92 of file DayZPlayerImplement.c.

◆ m_SoundOffset

float DayZPlayer::m_SoundOffset
protected

Definition at line 1840 of file DayZPlayerImplement.c.

◆ m_SprintedTime

float DayZPlayer::m_SprintedTime
protected

Definition at line 88 of file DayZPlayerImplement.c.

◆ m_SprintedTimePerStanceMin

float DayZPlayer::m_SprintedTimePerStanceMin
protected

Definition at line 89 of file DayZPlayerImplement.c.

◆ m_SprintFull

bool DayZPlayer::m_SprintFull
protected

Definition at line 90 of file DayZPlayerImplement.c.

◆ m_StepCounter

int DayZPlayer::m_StepCounter
protected

Definition at line 127 of file DayZPlayerImplement.c.

◆ m_Suicide

bool DayZPlayer::m_Suicide
protected

Definition at line 107 of file DayZPlayerImplement.c.

◆ m_Swimming

ref DayZPlayerImplementSwimming DayZPlayer::m_Swimming
protected

Definition at line 81 of file DayZPlayerImplement.c.

◆ m_SyncedHitDataArray

ref array<ref SyncHitInfo> DayZPlayer::m_SyncedHitDataArray
protected

Definition at line 129 of file DayZPlayerImplement.c.

◆ m_TestDamageCounter

float DayZPlayer::m_TestDamageCounter = -1
protected

This is Debug functionality

Definition at line 2227 of file DayZPlayerImplement.c.

◆ m_Throwing

ref DayZPlayerImplementThrowing DayZPlayer::m_Throwing
protected

Definition at line 82 of file DayZPlayerImplement.c.

◆ m_TransportCache

Transport DayZPlayer::m_TransportCache
protected

Definition at line 122 of file DayZPlayerImplement.c.

◆ m_TriggerPullPlayerOutOfVehicleSynch

bool DayZPlayer::m_TriggerPullPlayerOutOfVehicleSynch
protected

Definition at line 139 of file DayZPlayerImplement.c.

◆ m_UnconsciousDebug

bool DayZPlayer::m_UnconsciousDebug
protected

Definition at line 111 of file DayZPlayerImplement.c.

◆ m_WasInVehicle

bool DayZPlayer::m_WasInVehicle
private

Definition at line 138 of file DayZPlayerImplement.c.

◆ m_WasIronsight

bool DayZPlayer::m_WasIronsight
protected

Definition at line 99 of file DayZPlayerImplement.c.

◆ m_WeaponDebug

ref WeaponDebug DayZPlayer::m_WeaponDebug
protected

Definition at line 113 of file DayZPlayerImplement.c.

◆ m_WeaponRaiseCompleted

bool DayZPlayer::m_WeaponRaiseCompleted
protected

measures time from the weapon raise start to complete raise (once per)

Definition at line 97 of file DayZPlayerImplement.c.

◆ m_WeaponRaiseTime

float DayZPlayer::m_WeaponRaiseTime
private

Definition at line 96 of file DayZPlayerImplement.c.


The documentation for this class was generated from the following file: