DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс DayZPlayer

Защищенные члены

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 PlaySoundEventType (ESoundEventType soundType, int soundEventID, int param=0)
 Handle sound event by respective sound handler based on its type.
 
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 ()
 
Transport GetTransportCache ()
 Get the transport that was cached when entering unconsciousness.
 
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)
 is replayed after correction when 'NetworkRewindType.REPLAY' is used
 
override bool AimingModel (float pDt, SDayZPlayerAimingModel pModel)
 
bool ProcessJumpOrClimb (float pDt, int pCurrentCommandID)
 
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 ()
 

Защищенные данные

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
 
ref ReplaceSoundEventHandler m_ReplaceSoundEventHandler
 
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
 
bool m_CameraOpticsAimOverride
 
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
 
ref array< AbstractWavem_PerformedActionSounds
 
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
 

Закрытые данные

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 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]
 

Подробное описание

Конструктор(ы)

◆ ~DayZPlayerImplement()

void ~DayZPlayerImplement ( )
inlineprotected
282 {
283 }

Методы

◆ AbortWeaponEvent()

void AbortWeaponEvent ( )
inlineprotected
1766 {
1767 GetDayZPlayerInventory().AbortWeaponEvent();
1768 }
DayZPlayerInventory GetDayZPlayerInventory()
Definition DayZPlayerImplement.c:898

◆ AddNoise()

void AddNoise ( NoiseParams noisePar,
float noiseMultiplier = 1.0 )
inlineprotected
3158 {
3159 if (noisePar != null)
3160 GetGame().GetNoiseSystem().AddNoise(this, noisePar, noiseMultiplier);
3161 }
Definition EntityAI.c:95
proto native CGame GetGame()

Перекрестные ссылки GetGame().

◆ AimingModel()

override bool AimingModel ( float pDt,
SDayZPlayerAimingModel pModel )
inlineprotected

This Aiming Model

1618 {
1620 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_MELEE2)
1621 {
1623 if (hcm.IsFinisher())
1624 {
1626 {
1627 m_AimingModel.OnFinisherBegin(pModel.m_fCurrentAimY);
1629 }
1630 m_AimingModel.ProcessStealthFilters(pDt, pModel);
1631 }
1632
1633 return true;
1634 }
1635
1636 if (m_MovementState.IsRaised())
1637 {
1638 if (!m_RaiseStarted)
1639 {
1640 m_AimingModel.OnRaiseBegin(this);
1641 m_RaiseStarted = true;
1642 }
1643 m_AimingModel.ProcessAimFilters(pDt, pModel, m_MovementState.m_iStanceIdx);
1644
1645 return true;
1646 }
1647
1648 m_RaiseStarted = false;
1650
1651 return true;
1652 }
bool m_AimingFinisherStarted
Definition DayZPlayerImplement.c:176
ref HumanMovementState m_MovementState
time step for gradual update of dead screen visibilibty up to full visbility [s]
Definition DayZPlayerImplement.c:117
ref DayZPlayerImplementAiming m_AimingModel
Definition DayZPlayerImplement.c:118
bool m_RaiseStarted
Definition DayZPlayerImplement.c:175
Definition human.c:537
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки m_MovementState.

◆ AttenuateSoundIfNecessary()

void AttenuateSoundIfNecessary ( SoundObject soundObject)
inlineprotected
3775 {
3776 if (GetGame().GetPlayer() != NULL && (IsSoundInsideBuilding() != GetGame().GetPlayer().IsSoundInsideBuilding() || IsCameraInsideVehicle() != GetGame().GetPlayer().IsCameraInsideVehicle()))
3777 {
3778 soundObject.SetKind(WaveKind.WAVEATTALWAYS);
3779 }
3780 else
3781 {
3782 soundObject.SetKind(WaveKind.WAVEEFFECTEX);
3783 }
3784 }
PlayerBase GetPlayer()
Definition ModifierBase.c:51
WaveKind
Definition Sound.c:2

Перекрестные ссылки GetGame() и GetPlayer().

◆ CameraHandler()

override int 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

2712 {
2715 {
2717 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
2719 if (weapon)
2720 optics = weapon.GetAttachedOptics();
2721 else if (entityInHands)
2723
2724 if (m_CameraOptics && optics)
2725 {
2727 }
2728 else if (m_CameraIronsight && weapon)
2729 {
2731 }
2732 }
2733
2734 // If the logic above doesn't reach optics nor ironsights camera,
2735 // yet weapon is still raised and ads is wanted, enforce 1pv camera
2736 // as this will reduce erratic behaviour of camera switching in 3pv
2737 HumanInputController hic = GetInputController();
2738 if (m_Camera3rdPerson && m_IsWeapon && m_IsRaised && hic && hic.WeaponADS())
2739 {
2741 }
2742
2743 //uncon
2744 if ( GetCurrentCommandID() == DayZPlayerConstants.COMMANDID_UNCONSCIOUS )
2745 {
2747 }
2748
2750
2751 if (!m_Camera3rdPerson)
2752 {
2753 if (vehicleCommand)
2754 {
2756 }
2757
2759 }
2760 else
2761 {
2762 if (vehicleCommand)
2763 {
2764 Transport transport = vehicleCommand.GetTransport();
2765 if (transport && GetParent())
2766 {
2767 return transport.Get3rdPersonCameraType();
2768 }
2769 }
2770
2773
2777
2779
2781
2782 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_CLIMB)
2783 {
2785 }
2786
2787 if (m_JumpClimb.m_bIsJumpInProgress)
2788 {
2790 }
2791
2792 int targetStanceIndex = m_MovementState.m_iStanceIdx;
2793
2796 if (commandMove && commandMove.IsChangingStance() && m_MovementState.IsRaised())
2797 {
2798 targetStanceIndex = m_MovementState.m_iStanceIdx - DayZPlayerConstants.STANCEIDX_RAISED;
2799 }
2800
2801 //
2802 // normal movement cameras
2803 if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_CROUCH)
2804 {
2806 }
2807 else if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
2808 {
2810 }
2811 else if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_PRONE)
2812 {
2814 }
2815 else if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
2816 {
2818 }
2819
2820 if (targetStanceIndex == DayZPlayerConstants.STANCEIDX_RAISEDERECT)
2821 {
2822 if (m_IsWeapon)
2823 {
2825 }
2826 else
2827 {
2829 }
2830 }
2831 else if (targetStanceIndex == DayZPlayerConstants.MOVEMENTIDX_SPRINT)
2832 {
2834 }
2835
2836 // DayZPlayerConstants.STANCEIDX_ERECT
2838 }
2839
2841 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition DayZPlayerCameras.c:2
static const int DAYZCAMERA_3RD_ERC_RAISED
3rd - standing raised
Definition DayZPlayerCameras.c:6
static const int DAYZCAMERA_3RD_CRO_RAISED
3rd - crouch
Definition DayZPlayerCameras.c:8
static const int DAYZCAMERA_IRONSIGHTS
ironsights camera
Definition DayZPlayerCameras.c:12
static const int DAYZCAMERA_3RD_CRO
3rd - crouch
Definition DayZPlayerCameras.c:7
static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE
3rd - laying raised
Definition DayZPlayerCameras.c:11
static const int DAYZCAMERA_1ST
1st person camera
Definition DayZPlayerCameras.c:3
static const int DAYZCAMERA_1ST_VEHICLE
vehicle 1st person
Definition DayZPlayerCameras.c:18
static const int DAYZCAMERA_3RD_PRO_RAISED
3rd - laying raised
Definition DayZPlayerCameras.c:10
static const int DAYZCAMERA_3RD_PRO
3rd - laying
Definition DayZPlayerCameras.c:9
static const int DAYZCAMERA_3RD_JUMP
jump
Definition DayZPlayerCameras.c:15
static const int DAYZCAMERA_3RD_CLIMB
climb / vault
Definition DayZPlayerCameras.c:16
static const int DAYZCAMERA_3RD_ERC_SPR
3rd - standing sprint
Definition DayZPlayerCameras.c:5
static const int DAYZCAMERA_1ST_UNCONSCIOUS
unconscious
Definition DayZPlayerCameras.c:14
static const int DAYZCAMERA_3RD_ERC
3rd - standing
Definition DayZPlayerCameras.c:4
static const int DAYZCAMERA_OPTICS
optics
Definition DayZPlayerCameras.c:13
bool m_LiftWeapon_player
Definition DayZPlayerImplement.c:160
bool m_CameraIronsight
Definition DayZPlayerImplement.c:141
bool m_CameraOptics
Definition DayZPlayerImplement.c:142
bool m_Camera3rdPerson
Definition DayZPlayerImplement.c:134
ref DayZPlayerImplementJumpClimb m_JumpClimb
Definition DayZPlayerImplement.c:123
bool m_IsRaised
Definition DayZPlayerImplement.c:132
bool m_IsWeapon
Definition DayZPlayerImplement.c:177
Definition Building.c:6
Definition human.c:434
Definition human.c:690
Definition human.c:18
Definition ItemOptics.c:2
Base native class for all motorized wheeled vehicles.
Definition Boat.c:28
script counterpart to engine's class Weapon
Definition InventoryItem.c:49
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:407

Перекрестные ссылки 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, GetParent() и m_MovementState.

◆ CanClimb()

bool CanClimb ( int climbType,
SHumanCommandClimbResult climbRes )
inlineprotected
1716 {
1717 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1718 return false;
1719
1720 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
1721 return false;
1722
1723 if (IsRaised() && GetInputInterface().SyncedPress("UAGetOverControllerHelper")) //no raised climb on cotroller
1724 {
1725 return false;
1726 }
1727
1728 HumanItemBehaviorCfg hibcfg = GetItemAccessor().GetItemInHandsBehaviourCfg();
1729 if (!hibcfg.m_bJumpAllowed)
1730 return false;
1731
1732 if (climbRes)
1733 {
1735 if (Class.CastTo(entity,climbRes.m_GrabPointParent) && entity.IsHologram())
1736 return false;
1737 if (Class.CastTo(entity,climbRes.m_ClimbStandPointParent) && entity.IsHologram())
1738 return false;
1739 if (Class.CastTo(entity,climbRes.m_ClimbOverStandPointParent) && entity.IsHologram())
1740 return false;
1741 }
1742
1743 return true;
1744 }
bool IsRaised()
Definition DayZPlayerImplement.c:3800
bool IsFBSymptomPlaying()
Definition DayZPlayerImplement.c:496
bool IsInFBEmoteState()
Checks if fullbody animation or specific locked state is active in emote manager.
bool IsRestrained()
Definition humanitems.c:6

Перекрестные ссылки Class::CastTo() и m_MovementState.

◆ CanConsumeStamina()

bool CanConsumeStamina ( EStaminaConsumers consumer)
inlineprotected

Implementations only! - used on PlayerBase.

472{};

Используется в GetAttackTypeByWeaponAttachments(), GetAttackTypeFromInputs() и HandleFightLogic().

◆ CanJump()

bool CanJump ( )
inlineprotected
1680 {
1681 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1682 return false;
1683
1684 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
1685 return false;
1686
1687 if (IsRaised() && GetInputInterface().SyncedPress("UAGetOverControllerHelper")) //no raised jump on cotroller
1688 {
1689 return false;
1690 }
1691
1692 HumanItemBehaviorCfg hibcfg = GetItemAccessor().GetItemInHandsBehaviourCfg();
1693 if (!hibcfg.m_bJumpAllowed)
1694 return false;
1695
1696 if (!DayZPlayerUtils.PlayerCanChangeStance(this, DayZPlayerConstants.STANCEIDX_ERECT) || !DayZPlayerUtils.PlayerCanChangeStance(this, DayZPlayerConstants.STANCEIDX_RAISEDERECT))
1697 return false;
1698
1700 if (hcm)
1701 {
1702 if (hcm.IsChangingStance())
1703 return false;
1704 }
1705
1707 if (hcs)
1708 {
1709 return false;
1710 }
1711
1712 return true;
1713 }
void DayZPlayerUtils()
cannot be instantiated
Definition DayZPlayerUtils.c:465
class HumanCommandLadder HumanCommandSwim()
Definition human.c:673

Перекрестные ссылки DayZPlayerUtils(), HumanCommandSwim() и m_MovementState.

◆ CanPickupHeavyItem()

bool CanPickupHeavyItem ( notnull EntityAI item)
inlineprotected

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

3810 {
3811 return !item.IsHeavyBehaviour() || (item.IsHeavyBehaviour() && DayZPlayerUtils.PlayerCanChangeStance(this, DayZPlayerConstants.STANCEIDX_ERECT));
3812 }

Перекрестные ссылки DayZPlayerUtils().

◆ CanPickupHeavyItemSwap()

bool CanPickupHeavyItemSwap ( notnull EntityAI item1,
notnull EntityAI item2 )
inlineprotected
3815 {
3817 }
bool CanPickupHeavyItem(notnull EntityAI item)
-------------— Checks if player can pick up heavy item ----------------------—
Definition DayZPlayerImplement.c:3809

◆ CanStartConsumingStamina()

bool CanStartConsumingStamina ( EStaminaConsumers consumer)
inlineprotected
473{};

◆ CheckAnimationOverrides()

void CheckAnimationOverrides ( )
inlineprotected
3725 {
3726 }

◆ CheckForDropItem()

bool CheckForDropItem ( EntityAI item)
inlineprotected
3621 {
3622 /*
3623 bool restrained = IsRestrained(); // IsRestrained()
3624 bool unconscious = IsUnconscious(); // IsRestrained()
3625
3626 ItemBase ib = ItemBase.Cast(item);
3627 if (!IsAlive() || restrained || unconscious || ib.CanBeMovedOverride())
3628 return true;
3629 return false;
3630 */
3631 return CheckForTakeItem(item); //the two functions are currently identical
3632 }
bool CheckForTakeItem(EntityAI item)
Definition DayZPlayerImplement.c:3609

◆ CheckForRespawn()

bool CheckForRespawn ( EntityAI item)
inlineprotected

Player respawn

3639 {
3640 PlayerBase player = PlayerBase.Cast(this);
3641 if (!player)
3642 return true;
3643
3644 if (!IsAlive() || player.IsUnconscious())
3645 return true;
3646 return false;
3647 }
Definition PlayerBaseClient.c:2

◆ CheckForTakeItem()

bool CheckForTakeItem ( EntityAI item)
inlineprotected

anti-cheat condition

3610 {
3611 bool restrained = IsRestrained(); // IsRestrained()
3612 bool unconscious = IsUnconscious(); // IsRestrained()
3613
3614 ItemBase ib = ItemBase.Cast(item);
3615 if (ib && (PlayerBase.DEBUG_INVENTORY_ACCESS || !IsAlive() || restrained || unconscious || ib.CanBeMovedOverride()))
3616 return true;
3617 return false;
3618 }
Definition InventoryItem.c:731

◆ CheckLiftWeapon()

void CheckLiftWeapon ( )
protected

◆ CommandHandler()

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

This is main command logic

handle all Camera changes, switch + zoom

handle death with high priority

check for water depth while getting out and start swimming if necessary this also handles the last frame of the vehicle command hence it doens't need separate check on pCurrentCommandFinished

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

2175 {
2176 m_dT = pDt;
2177
2179
2181 {
2182 return;
2183 }
2184
2185 HumanInputController hic = GetInputController();
2186 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
2188
2189 bool isRaisedNow = m_MovementState.IsRaised();
2190 bool isWeapon = entityInHands && entityInHands.IsInherited(Weapon);
2191
2192 bool updateAimingMdfr = false;
2193 if (isWeapon != m_IsWeapon)
2194 {
2196 updateAimingMdfr = true;
2197 }
2198
2199 if (isRaisedNow != m_IsRaised)
2200 {
2201 updateAimingMdfr = true;
2202 m_IsRaised = m_MovementState.IsRaised();
2203 }
2204
2205 if (updateAimingMdfr)
2206 {
2207 if (isRaisedNow && isWeapon)
2208 GetUApi().ActivateModificator("aiming");
2209 else
2210 GetUApi().DeactivateModificator("aiming");
2211 }
2212
2213 // handle ADS ironsights/optics transition logic
2214 HandleADS();
2215
2216 // handle weapons
2217 if (hic)
2218 {
2221 {
2223 bool exitIronSights = false;
2225 }
2227 {
2228 bool exitOptic = false;
2230 }
2231 }
2232
2234 HandleView();
2235
2236 if (m_MovementState.m_iMovement != m_MovementState.m_LocalMovement)
2237 {
2239 m_MovementState.m_LocalMovement = m_MovementState.m_iMovement;
2240 }
2241
2244 {
2245 return;
2246 }
2247
2250 if ( pCurrentCommandID == DayZPlayerConstants.COMMANDID_VEHICLE )
2251 {
2253 if ( cmdVehicle && cmdVehicle.IsGettingOut() )
2254 {
2256 if ( m_Swimming.CheckSwimmingStart( waterLevel ) )
2257 {
2258 // not all the events may have been called as getting out could have occurred while under water
2259 cmdVehicle.ProcessLeaveEvents();
2260
2262 return;
2263 }
2264 }
2265 }
2266
2269 {
2270 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_UNCONSCIOUS)
2271 {
2273 {
2274 int crew_index = m_TransportCache.CrewMemberIndex(this);
2275 int seat = m_TransportCache.GetSeatAnimationType(crew_index);
2278 return;
2279 }
2280 }
2281 // start moving
2282
2283 // start falling ? (could happen after climbing)
2284 if (PhysicsIsFalling(true))
2285 {
2288 return;
2289 }
2290
2292 if (m_Swimming.m_bWasSwimming)
2293 {
2295 return;
2296 }
2297
2298 StartCommand_Move();
2299
2300 if (GetHumanInventory().GetEntityInHands())
2301 ForceStandUpForHeavyItems(GetHumanInventory().GetEntityInHands());
2302
2303 return;
2304 }
2305
2306
2307 //--------------------------------------------
2309
2311 {
2312 return;
2313 }
2314
2315
2316 //--------------------------------------------
2317 // vehicle handling
2318 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_VEHICLE)
2319 {
2321 if (hcv.WasGearChange())
2322 {
2324 cb.SetVehicleCommand(hcv);
2325 }
2326
2327 return;
2328 }
2329
2331 //--------------------------------------------
2333 if (hcm && hcm.GetCurrentMovementSpeed() > 2.99 && m_MovementState.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SPRINT)
2334 {
2337 {
2338 m_SprintFull = true;
2340 }
2341 else
2342 m_SprintFull = false;
2343 }
2344 else
2345 {
2346 m_SprintedTime = 0.0;
2347 m_SprintFull = false;
2348 }
2349
2350 //--------------------------------------------
2351 // swimming handling
2352 if (m_Swimming.HandleSwimming(pCurrentCommandID, hcm, m_MovementState))
2353 {
2355 {
2356 return;
2357 }
2358
2359 m_JumpClimb.CheckAndFinishJump();
2360 return;
2361 }
2362
2363 //--------------------------------------------
2364 // ladder handling
2365 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_LADDER)
2366 {
2368 return;
2369 }
2370
2371 //--------------------------------------------
2372 // climb handling
2373 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_CLIMB)
2374 {
2375 return;
2376 }
2377
2378 //--------------------------------------------
2379 // fall handling
2380
2382 {
2384 {
2387
2390
2391 // land
2392 if (fallDamageData.m_Height < 0.5)
2393 {
2394 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_NONE;
2396 npar = type.GetNoiseParamsLandLight();
2398 }
2399 else if (fallDamageData.m_Height < 3.0)
2400 {
2401 if (m_MovementState.IsInProne() || m_MovementState.IsInRaisedProne())
2402 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_NONE;
2403 else
2404 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_LIGHT;
2405
2407 npar = type.GetNoiseParamsLandLight();
2409 }
2410 else if (fallDamageData.m_Height < 5.0)
2411 {
2412 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_MEDIUM;
2414 npar = type.GetNoiseParamsLandHeavy();
2416 }
2417 else
2418 {
2419 fallDamageData.m_LandType = HumanCommandFall.LANDTYPE_HEAVY;
2421 npar = type.GetNoiseParamsLandHeavy();
2423 }
2424
2425 if (fallDamageData.m_Height >= DayZPlayerImplementFallDamage.HEALTH_HEIGHT_LOW && GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT)
2426 {
2427 OnPlayerRecievedHit();
2428 }
2429
2430 m_FallDamage.HandleFallDamage(fallDamageData);
2431 m_JumpClimb.CheckAndFinishJump(fallDamageData.m_LandType);
2432 }
2433
2435 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL)
2436 {
2437 return;
2438 }
2439 }
2440 else if (PhysicsIsFalling(false))
2441 {
2442 // Not in a falling command but the controller is falling, start default fall
2445 return;
2446 }
2447
2448 //--------------------------------------------
2449 // handle jumping
2450
2451#ifndef NO_GUI
2452#ifdef DEVELOPER
2454
2455 if (DiagMenu.GetEngineValue(DayZPlayerConstants.DEBUG_ENABLEJUMP))
2456 {
2457 SHumanCommandClimbSettings hcls = GetDayZPlayerType().CommandClimbSettingsW();
2458
2459 if (m_MovementState.m_iMovement != DayZPlayerConstants.MOVEMENTIDX_IDLE)
2460 hcls.m_fFwMaxDistance = 3;
2461 else
2462 hcls.m_fFwMaxDistance = 1.2;
2463
2465
2467 HumanCommandClimb.DoClimbTest(this, ret, 0x3);
2468 }
2469
2470#endif
2471#endif
2472
2473 // start jump
2475 {
2476 return;
2477 }
2478
2480
2481 bool force = false;
2482#ifndef NO_GUI
2483#ifdef DEVELOPER
2485 force = DiagMenu.GetEngineValue(DayZPlayerConstants.DEBUG_ENABLETALKING);
2486#endif
2487#endif
2488 float amplitude = IsPlayerSpeaking();
2489
2490 if (amplitude > 0.1 || force)
2491 {
2492 if (ad)
2493 ad.SetTalking(true);
2494
2495 // add noises on server
2496 if (GetGame().IsServer())
2497 {
2498 int now = GetGame().GetTime();
2499 if (now >= m_NextVoNNoiseTime)
2500 {
2501 m_NextVoNNoiseTime = now + 1000;
2502
2503 int voiceLevel = GetGame().GetVoiceLevel(this);
2505
2506 // add noise every second while talking
2508 switch (voiceLevel)
2509 {
2510 case VoiceLevelWhisper:
2511 vonpar = pt.GetNoiseParamsWhisper();
2512 break;
2513 case VoiceLevelTalk:
2514 vonpar = pt.GetNoiseParamsTalk();
2515 break;
2516 case VoiceLevelShout:
2517 vonpar = pt.GetNoiseParamsShout();
2518 break;
2519 }
2521 }
2522 }
2523 }
2524 else
2525 {
2526 if (ad)
2527 ad.SetTalking(false);
2528 }
2529
2530 //--------------------------------------------
2531 // anything whats handled by InputController
2532
2534
2535 if (hic)
2536 {
2539 m_Throwing.HandleThrowing(hic, hcw, entityInHands, pDt);
2540
2542 if (m_MeleeFightLogic.CanFight())
2543 {
2545 {
2547 return;
2548 }
2549 }
2550 }
2551
2552
2555 {
2556 return;
2557 }
2558 }
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
Definition DayZPlayerImplementFallDamage.c:73
class NoiseSystem NoiseParams()
Definition Noise.c:15
proto native UAInputAPI GetUApi()
bool IsLanded(int pCurrentCommandID)
Definition DayZPlayerImplement.c:3671
bool m_ProcessFirearmMeleeHit
Definition DayZPlayerImplement.c:158
float m_dT
Definition DayZPlayerImplement.c:187
bool m_SprintFull
Definition DayZPlayerImplement.c:131
bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
Definition DayZPlayerImplement.c:3686
bool IsAlreadyInFallingCommand(int pCurrentCommandID)
Definition DayZPlayerImplement.c:3702
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZPlayerImplement.c:2157
void HandleView()
Definition DayZPlayerImplement.c:1905
bool HandleDeath(int pCurrentCommandID)
Definition DayZPlayerImplement.c:615
ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
Definition DayZPlayerImplement.c:120
bool m_ContinueFirearmMelee
Definition DayZPlayerImplement.c:159
float m_FallYDiff
Definition DayZPlayerImplement.c:128
float m_SprintedTime
Definition DayZPlayerImplement.c:129
float m_SprintedTimePerStanceMin
Definition DayZPlayerImplement.c:130
Transport m_TransportCache
Definition DayZPlayerImplement.c:164
void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
ref DayZPlayerImplementFallDamage m_FallDamage
Definition DayZPlayerImplement.c:124
void AddNoise(NoiseParams noisePar, float noiseMultiplier=1.0)
Definition DayZPlayerImplement.c:3157
void HandleADS()
Definition DayZPlayerImplement.c:1774
void SetFallYDiff(float value)
Definition DayZPlayerImplement.c:362
void OnMovementChanged()
Event, called when HumanMovementState.m_iMovement changes...walk, run, sprint, etc....
Definition DayZPlayerImplement.c:2844
bool IsHandheldOpticsInUse()
Definition DayZPlayerImplement.c:3794
ref DayZPlayerImplementThrowing m_Throwing
Definition DayZPlayerImplement.c:122
int m_NextVoNNoiseTime
Definition DayZPlayerImplement.c:170
void HandleWeapons(float pDt, Entity pInHands, HumanInputController pInputs, out bool pExitIronSights)
Definition DayZPlayerImplement.c:973
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZPlayerImplement.c:2152
ref DayZPlayerImplementSwimming m_Swimming
Definition DayZPlayerImplement.c:121
bool ProcessJumpOrClimb(float pDt, int pCurrentCommandID)
Definition DayZPlayerImplement.c:1660
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZPlayerImplement.c:2162
void HandleOptic(notnull ItemOptics optic, bool inHands, HumanInputController pInputs, out bool pExitOptics)
Definition DayZPlayerImplement.c:1140
int m_LastCommandBeforeUnconscious
Definition DayZPlayerImplement.c:154
Definition EnDebug.c:233
Definition DayZPlayerImplementFallDamage.c:2
Definition DayZPlayerImplementVehicle.c:2
command itself
Definition human.c:773
proto static native bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
Definition human.c:994
Definition SensesAIEvaluate.c:2
static float GetNoiseReduction(Weather weather)
Definition SensesAIEvaluate.c:18
Definition PlayerConstants.c:2
static const float FULL_SPRINT_DELAY_DEFAULT
Definition PlayerConstants.c:7
Definition EnConvert.c:106
void DayZPlayerType()
Definition dayzplayer.c:512
void ForceStandUpForHeavyItems(notnull EntityAI item)
-------------— Forces player to stand up when swapping to heavy item ----------------------—
Definition dayzplayer.c:1361
DayZPlayerInstanceType
defined in C++
Definition dayzplayer.c:1068
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.
class HumanCommandMelee2 HumanCommandFall()
Definition human.c:574
class HumanCommandWeapons HumanCommandAdditives()
Definition human.c:1112
class SHumanCommandSwimSettings SHumanCommandClimbSettings()
Definition humansettings.c:74

Перекрестные ссылки AddNoise(), DayZPlayerImplementFallDamage(), DayZPlayerType(), HumanCommandClimb::DoClimbTest(), ForceStandUpForHeavyItems(), PlayerConstants::FULL_SPRINT_DELAY_DEFAULT, GetDayZPlayerType(), DiagMenu::GetEngineValue(), GetGame(), GetInstanceType(), NoiseAIEvaluate::GetNoiseReduction(), GetUApi(), HumanCommandAdditives(), HumanCommandFall(), IsPlayerSpeaking(), m_MovementState, ModCommandHandlerAfter(), ModCommandHandlerBefore(), ModCommandHandlerInside(), NoiseParams() и SHumanCommandClimbSettings().

◆ CommandHandlerDebug()

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

debug handling of adding commands

set item in hands

fuj

start show

damage test

2577 {
2578 if (GetPluginManager())
2579 {
2581 if (playerDebug)
2582 {
2583 playerDebug.CommandHandler();
2584
2586 if (m_DebugWeaponChangeStage == 0)
2587 {
2588
2589 // debug weapon change
2590 int hideSlot;
2591
2593 {
2594 //Print("Change Weapon started: " + m_DebugWeaponChangeItem + "," + hideSlot.ToString() + "," + m_DebugWeaponChangeShowSlot.ToString());
2595
2597 w.StartAction(WeaponActions.HIDE, hideSlot);
2598
2600 }
2601 }
2602 else if (m_DebugWeaponChangeStage == 1)
2603 {
2604 // wait for weapon hide to meet event
2606 if (w2 && w2.GetRunningAction() == WeaponActions.HIDE)
2607 {
2608 if (w2.IsEvent() == WeaponEvents.CHANGE_HIDE)
2609 {
2611 //Print("Change Weapon - hidden: ");
2612
2614 PlayerBase player = PlayerBase.Cast(this);
2615 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
2616 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) && GetGame().GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2617 {
2618 player.PredictiveDropEntity(item_in_hands);
2619 }
2620
2621 if (m_DebugWeaponChangeItem != "")
2622 {
2624 dst.SetHands(this, NULL);
2626 }
2627
2629 w2.StartAction(WeaponActions.SHOW, 3);
2630
2632 }
2633 }
2634 }
2635 else if (m_DebugWeaponChangeStage == 2)
2636 {
2638 if (w3 && w3.IsActionFinished())
2639 {
2641 }
2642 }
2643 }
2644 }
2645
2646
2648 if (m_TestDamageCounter >= 0)
2649 {
2650 if (m_TestDamageCounter > 3)
2651 {
2654
2655 if (m_DebugDirectionVal > 90)
2656 {
2657 m_DebugDirectionVal = -180;
2659 }
2660
2661 if (m_DebugTypeVal)
2662 {
2664 }
2665 else
2666 {
2667 StartCommand_Damage(0, m_DebugDirectionVal); // starts heavy (full body)
2668 }
2669 // 0.. types
2670 // from: -180 back, -90 left, 0 front, 90 right, 180 back
2671 //AddCommandModifier_Damage(0, directionVal); // starts light
2672 //StartCommand_Damage(0, 0); // starts heavy (full body)
2673 }
2674
2676 }
2677
2678
2679#ifndef NO_GUI
2680#ifdef DEVELOPER
2681
2682 // injury / exhaustion
2683 {
2685
2687 float v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWINJURY);
2688 if (v > 0)
2689 {
2690 ad.SetInjured(v, true);
2691 }
2692
2694 v = DiagMenu.GetEngineRangeValue(DayZPlayerConstants.DEBUG_SHOWEXHAUSTION);
2695 if (v > 0)
2696 {
2697 ad.SetExhaustion(v, true);
2698 }
2699 }
2700#endif
2701#endif
2702
2703 }
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
Definition CentralEconomy.c:36
const int RF_DEFAULT
Definition CentralEconomy.c:65
void PluginDayzPlayerDebug()
Definition PluginDayzPlayerDebug.c:275
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
Definition PluginManager.c:274
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
Definition DayZPlayerImplement.c:2568
float m_TestDamageCounter
Definition DayZPlayerImplement.c:2567
int m_DebugWeaponChangeShowSlot
Definition DayZPlayerImplement.c:2573
int m_DebugWeaponChangeStage
Definition DayZPlayerImplement.c:2571
bool m_DebugTypeVal
Definition DayZPlayerImplement.c:2569
string m_DebugWeaponChangeItem
Definition DayZPlayerImplement.c:2572
InventoryLocation.
Definition InventoryLocation.c:29
static proto float GetEngineRangeValue(int id)
Get range value at the given engine id.
WeaponActions
actions
Definition human.c:816
WeaponEvents
events
Definition human.c:963

Перекрестные ссылки ECE_IN_INVENTORY, DiagMenu::GetEngineRangeValue(), GetGame(), GetPlayer(), GetPluginManager(), HumanCommandAdditives(), PluginDayzPlayerDebug(), RF_DEFAULT и SpawnEntity().

◆ CommitedSuicide()

bool CommitedSuicide ( )
inlineprotected
3744 {
3745 return m_Suicide;
3746 }
bool m_Suicide
Definition DayZPlayerImplement.c:149

◆ CompleteWeaponRaise()

void CompleteWeaponRaise ( )
inlineprotected
882 {
885 }
bool m_WeaponRaiseCompleted
measures time from the weapon raise start to complete raise (once per)
Definition DayZPlayerImplement.c:138
float m_WeaponRaiseTime
Definition DayZPlayerImplement.c:137

◆ DayZPlayerImplement()

void DayZPlayerImplement ( )
inlineprotected

constructor

191 {
192 m_SprintFull = false;
193 m_SprintedTime = 0;
203 m_bADS = false;
205 SetOptics(false);
209 m_WasIronsight = true; //initially uses ironsights by default
210 #ifdef PLATFORM_CONSOLE
211 m_Camera3rdPerson = !GetGame().GetWorld().Is3rdPersonDisabled();
212 #endif
213 m_LastSurfaceUnderHash = ("cp_gravel").Hash();
219
220 RegisterNetSyncVariableBoolSignal("m_TriggerPullPlayerOutOfVehicleSynch");
221 }
void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)
Definition DayZPlayerImplementMeleeCombat.c:90
void DayZPlayerMeleeFightLogic_LightHeavy(DayZPlayerImplement player)
Definition DayZPlayerMeleeFightLogic_LightHeavy.c:31
bool m_bADS
Definition DayZPlayerImplement.c:136
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
Definition DayZPlayerImplement.c:119
bool m_IsShootingFromCamera
Definition DayZPlayerImplement.c:147
void SetOptics(bool value)
Definition DayZPlayerImplement.c:397
float m_CurrentWaterLevel
Definition DayZPlayerImplement.c:179
int m_LastSurfaceUnderHash
Definition DayZPlayerImplement.c:163
bool m_WasIronsight
Definition DayZPlayerImplement.c:140
ref array< AbstractWave > m_PerformedActionSounds
Definition DayZPlayerImplement.c:172
ref Timer m_ADSAutomationTimer
Definition DayZPlayerImplement.c:3831
ref array< ref SyncHitInfo > m_SyncedHitDataArray
Definition DayZPlayerImplement.c:171
Definition DayZPlayerImplementAiming.c:32
Definition DayZPlayerImplementJumpClimb.c:2
Definition DayZPlayerImplementSwimming.c:3
Definition DayZPlayerImplementThrowing.c:2
Definition DayZPlayerImplement.c:63

Перекрестные ссылки DayZPlayerImplementFallDamage(), DayZPlayerImplementMeleeCombat(), DayZPlayerMeleeFightLogic_LightHeavy(), PlayerConstants::FULL_SPRINT_DELAY_DEFAULT, GetGame() и m_MeleeCombat.

◆ DepleteStamina()

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

◆ EEHitBy()

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

event from damage system

1458 {
1460
1461 m_TransportHitRegistered = false;
1462
1463 if (!IsAlive())
1464 {
1465 int animTypeDeath;
1466 float animHitDirDeath;
1468 {
1470 }
1471
1472 if (!m_DeathSyncSent) //checked until the death is evaluated by 'OnCommandHandlerTick' higher up the road
1473 {
1474 Man killer = source.GetHierarchyRootPlayer();
1475
1476 if (!m_KillerData) //only one player is considered killer in the event of crossfire
1477 {
1478 m_KillerData = new KillerData();
1479 m_KillerData.m_Killer = killer;
1480 m_KillerData.m_MurderWeapon = source;
1481 }
1482
1483 if (killer && killer.IsPlayer())
1484 {
1485 // was player killed by headshot?
1486 if (dmgZone == "Brain")
1487 {
1488 m_KilledByHeadshot = true;
1489 if (m_KillerData.m_Killer == killer)
1490 m_KillerData.m_KillerHiTheBrain = true;
1491 }
1492 }
1493 }
1494 }
1495 else
1496 {
1497 int animType;
1498 float animHitDir;
1499 bool animHitFullbody;
1502 else
1503 {
1504 bool skipSoundRequest = false;
1505 if (damageType == DamageType.CUSTOM && GetCommand_Fall())
1506 skipSoundRequest = GetFallDamage().GetLandType() < HumanCommandFall.LANDTYPE_MEDIUM;
1507
1508 if (!skipSoundRequest)
1509 RequestSoundEvent(EPlayerSoundEventID.TAKING_DMG_LIGHT);
1510 }
1511 }
1512
1513 // interupt melee for non-blocked hit or heavy hit
1514 if (animHitFullbody)
1515 {
1517 if (hcm)
1518 hcm.Cancel();
1519 }
1520 }
DamageType
exposed from C++ (do not change)
Definition DamageSystem.c:11
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
EPlayerSoundEventID
Definition PlayerSoundEventHandler.c:2
DayZPlayerImplementFallDamage GetFallDamage()
Definition DayZPlayerImplement.c:276
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
Definition DayZPlayerImplement.c:745
void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
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
Definition DayZPlayerImplement.c:1379
bool EvaluateDeathAnimation(int pDamageType, EntityAI pSource, string pAmmoType, out int pAnimType, out float pAnimHitDir)
selects animation type and direction based on damage system data
Definition DayZPlayerImplement.c:1350
Definition DayZPlayerSyncJunctures.c:5
static void SendDamageHitEx(DayZPlayer pPlayer, int pType, float pHitDir, bool pFullbody, TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos)
Definition DayZPlayerSyncJunctures.c:99
Definition KillerData.c:2

Перекрестные ссылки component, HumanCommandFall() и DayZPlayerSyncJunctures::SendDamageHitEx().

◆ EEKilled()

override void EEKilled ( Object killer)
inlineprotected
755 {
756 SendDeathJuncture(-1, 0);
757
758 super.EEKilled(killer);
759 }

◆ EOnContact()

void EOnContact ( IEntity other,
Contact extra )
inlineprotected

Phx contact event

3757 {
3758 if (!IsAlive())
3759 return;
3760
3761 if (GetParent() == other)
3762 return;
3763
3765 if (transport)
3766 {
3767 if (GetGame().IsServer())
3768 {
3769 RegisterTransportHit(transport);
3770 }
3771 }
3772 }

Перекрестные ссылки GetGame() и GetParent().

◆ EvaluateDamageHit()

void 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)

1247 {
1250
1251 if (!m_SyncedHitDataArray || m_SyncedHitDataArray.Count() == 0)
1252 {
1253 return;
1254 }
1255
1256 //evaluate all hit data
1259 for (int i = 0; i < m_SyncedHitDataArray.Count(); i++)
1260 {
1262 m_DamageHitDir = data.m_HitDir;
1263
1264 //client-side effects
1265 #ifndef SERVER
1266 if (IsAlive() && !IsUnconscious() && data.m_HasSource && GetGame().GetMission().GetHud() && GetGame().GetPlayer() == this) //only for controlled players
1267 {
1268 m_DamageHealth = data.m_HealthDamage;
1269 if (m_DamageHealth > 0.0)
1270 {
1271 float rel = m_DamageHealth / (GetMaxHealth("","Health") * PlayerConstants.HEAVY_HIT_THRESHOLD);
1272 GetGame().GetMission().GetHud().SpawnHitDirEffect(this,m_DamageHitDir,rel);
1273 }
1274 }
1275 #endif
1276
1277 if (!greatest_hit)
1278 {
1280 }
1281 //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)
1282 else if (data.m_Fullbody) //temporary solution; last fullbody hit is used for animation purposes, some light hit otherwise
1283 {
1285 }
1286 }
1287
1288 m_SyncedHitDataArray.Clear();
1289 m_DamageHealth = 0.0;
1290
1292 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE || IsUnconscious())
1293 {
1294 return;
1295 }
1296
1297 //general effects
1298 m_DamageHitFullbody = greatest_hit.m_Fullbody;
1299 m_DamageHitAnimType = greatest_hit.m_AnimType;
1300 m_DamageHitDir = greatest_hit.m_HitDir;
1301 }
int m_DamageHitAnimType
Definition DayZPlayerImplement.c:1233
bool m_DamageHitFullbody
Definition DayZPlayerImplement.c:1232
float m_DamageHitDir
Definition DayZPlayerImplement.c:1234
float m_DamageHealth
Definition DayZPlayerImplement.c:1235
static const float HEAVY_HIT_THRESHOLD
Definition PlayerConstants.c:5

Перекрестные ссылки GetGame(), GetPlayer(), PlayerConstants::HEAVY_HIT_THRESHOLD и m_MovementState.

◆ EvaluateDamageHitAnimation()

bool 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

1380 {
1381 int invertHitDir = 0; //Used to flip the heavy hit animation direction
1382
1383 pAnimType = 0;
1384 pAnimHitFullbody = false; // additive anm
1386
1387 switch (pDamageType)
1388 {
1389 case DT_CLOSE_COMBAT:
1391 if (pSource.IsInherited(DayZInfected))
1392 break;
1393
1394 pAnimType = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " hitAnimation");
1395 invertHitDir = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " invertHitDir");
1396 if (!IsUnconscious() && pAnimType == 1 && !m_MeleeFightLogic.IsInBlock())
1397 pAnimHitFullbody = true;
1398 break;
1399
1400 case DT_FIRE_ARM:
1401 int impactBehaviour = 0;
1402
1403 if (!IsUnconscious() && GetHealth("", "Shock") > 25)
1404 {
1406 if (pComponent == "Torso" || pComponent == "Head")
1407 {
1408 impactBehaviour = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " impactBehaviour");
1409 float fireDamage = pDamageResult.GetHighestDamage("Health");
1410 float shockDamage = pDamageResult.GetHighestDamage("Shock");
1411 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1412 pAnimHitFullbody = true;
1413 }
1414 }
1415
1416 break;
1417
1418 case DT_EXPLOSION:
1419 break;
1420
1421 case DT_CUSTOM:
1422 pAnimType = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " hitAnimation");
1423 if (pAnimType == 1)
1424 pAnimHitFullbody = true;
1425 else if (pAmmoType != "HeatDamage" || IsSwimming())
1426 return false;
1427
1428 break;
1429 }
1430
1432 vector targetDirection = GetDirection();
1433 vector toSourceDirection = (pSource.GetPosition() - GetPosition());
1434
1435 targetDirection[1] = 0;
1436 toSourceDirection[1] = 0;
1437
1438 targetDirection.Normalize();
1439 toSourceDirection.Normalize();
1440
1443
1445
1446 // We will invert direction of the hit
1447 if (invertHitDir > 0)
1448 pAnimHitDir -= 180;
1449
1450 if (cross[1] < 0)
1452
1453 return true;
1454 }
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Definition ZombieBase.c:2
bool IsSwimming()
Definition DayZPlayerImplement.c:481
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

Перекрестные ссылки Math::Acos(), vector::Dot(), GetGame(), GetPosition, m_MovementState и Math::RAD2DEG.

◆ EvaluateDeathAnimation()

bool 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

1351 {
1352 bool doPhxImpulse = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " doPhxImpulse") > 0;
1353
1354 pAnimType = DayZPlayerConstants.DEATH_DEFAULT;
1355 if (doPhxImpulse)
1356 pAnimType = DayZPlayerConstants.DEATH_FAST;
1357
1359 vector targetDirection = GetDirection();
1360 vector toSourceDirection = (pSource.GetPosition() - GetPosition());
1361
1362 targetDirection[1] = 0;
1363 toSourceDirection[1] = 0;
1364
1365 targetDirection.Normalize();
1366 toSourceDirection.Normalize();
1367
1370
1372 if (cross[1] < 0)
1374
1375 return true;
1376 }

Перекрестные ссылки Math::Acos(), vector::Dot(), GetGame(), GetPosition и Math::RAD2DEG.

◆ ExitSights()

void ExitSights ( )
inlineprotected
412 {
414 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
416 if (weapon)
417 {
418 optics = weapon.GetAttachedOptics();
419 }
420 else
421 {
423 }
424
425 SetIronsights(false);
426 SetOptics(false);
427
428 if (optics)
429 {
430 SwitchOptics(optics,false);
431 }
432
434 if (hcw)
435 {
436 hcw.SetADS(false);
437 }
438 }
void SwitchOptics(ItemOptics optic, bool state)
Definition DayZPlayerImplement.c:440
void SetIronsights(bool value)
Definition DayZPlayerImplement.c:377

◆ GetAimingModel()

DayZPlayerImplementAiming GetAimingModel ( )
inlineprotected
257 {
258 return m_AimingModel;
259 }

◆ GetBackAttachmentType()

AnimBackType GetBackAttachmentType ( )
inlineprotected
3061 {
3062 EntityAI back = GetInventory().FindAttachment(InventorySlots.BACK);
3063 if (back)
3064 {
3065 switch (back.GetAttachmentSoundType())
3066 {
3067 case "Small":
3068 return AnimBackType.Small;
3069 case "Military":
3070 return AnimBackType.Military;
3071 case "Outdoor":
3072 return AnimBackType.Outdoor;
3073 case "Ghillie":
3074 return AnimBackType.Ghillie;
3075 }
3076 }
3077
3078 return AnimBackType.None;
3079 }
provides access to slot configuration
Definition InventorySlots.c:6

◆ GetBodyAttachmentType()

AnimUpperBodyType GetBodyAttachmentType ( )
inlineprotected
3030 {
3031 EntityAI attachment = GetInventory().FindAttachment(InventorySlots.BODY);
3032 if (attachment)
3033 {
3034 switch (attachment.GetAttachmentSoundType())
3035 {
3036 case "NylonJacket":
3037 return AnimUpperBodyType.NylonJacket;
3038 case "TShirt":
3039 return AnimUpperBodyType.TShirt;
3040 case "WoolShirt":
3041 return AnimUpperBodyType.WoolShirt;
3042 case "HeavyJacket":
3043 return AnimUpperBodyType.HeavyJacket;
3044 case "LeatherJacket":
3045 return AnimUpperBodyType.LeatherJacket;
3046 case "Coat":
3047 return AnimUpperBodyType.Coat;
3048 case "ChemlonDress":
3049 return AnimUpperBodyType.ChemlonDress;
3050 case "Ghillie":
3051 return AnimUpperBodyType.Ghillie;
3052 case "Chainmail":
3053 return AnimUpperBodyType.Chainmail;
3054 }
3055 }
3056
3057 return AnimUpperBodyType.None;
3058 }

◆ GetBootsType()

AnimBootsType GetBootsType ( )
inlineprotected
3012 {
3013 EntityAI boots = GetInventory().FindAttachment(InventorySlots.FEET);
3014 if (boots)
3015 {
3016 switch (boots.GetAttachmentSoundType())
3017 {
3018 case "Sneakers":
3019 return AnimBootsType.Sneakers;
3020 case "Boots":
3021 return AnimBootsType.Boots;
3022 }
3023 }
3024
3025 return AnimBootsType.None;
3026 }
AnimBootsType
Definition DayZAnimEvents.c:98

◆ GetCurrentWaterLevel()

override float GetCurrentWaterLevel ( )
inlineprotected
368 {
369 return m_CurrentWaterLevel;
370 }

Используется в InterruptWaterCheck().

◆ GetDayZPlayerInventory()

DayZPlayerInventory GetDayZPlayerInventory ( )
inlineprotected
899 {
900 DayZPlayerInventory inv = DayZPlayerInventory.Cast(GetInventory());
901 return inv;
902 }
Definition DayZPlayerInventory.c:125

Используется в ActionPossibilityCheck() и CanPlayEmote().

◆ GetDebugText()

override string GetDebugText ( )
inlineprotected
522 {
523 string text = super.GetDebugText();
524 text += "Parent: " + Object.GetDebugName(Object.Cast(GetParent())) + "\n";//keep
525 text += "IsSimulationDisabled: " + GetIsSimulationDisabled() + "\n";//keep
526 /*
527 text += "DamageDestroyed: " + IsDamageDestroyed() + "\n";
528 text += "DeathProcessed: " + IsDeathProcessed() + "\n";
529 text += "DeathConditionMet: " + IsDeathConditionMet() + "\n";
530 text += "PullOutOfVehicleState: " + m_PullPlayerOutOfVehicleState + "\n";
531 text += "PullOutOfVehicleSynch: " + m_TriggerPullPlayerOutOfVehicleSynch + "\n";
532 text += "Position: " + GetPosition() + "\n";*/
533 return text;
534 }
Definition ObjectTyped.c:2

Перекрестные ссылки GetParent().

◆ GetDeltaT()

float GetDeltaT ( )
inlineprotected
502 {
503 return m_dT;
504 }

◆ GetEyeZoomLevel()

override int GetEyeZoomLevel ( )
inlineprotected
292 {
294 }
ECameraZoomType m_CameraEyeZoomLevel
Definition DayZPlayerImplement.c:139

Используется в DayZPlayerCameraBase(), HoldBreathFOVEffect() и StdFovUpdate().

◆ GetFallDamage()

DayZPlayerImplementFallDamage GetFallDamage ( )
inlineprotected
277 {
278 return m_FallDamage;
279 }

◆ GetMeleeCombat()

DayZPlayerImplementMeleeCombat GetMeleeCombat ( )
inlineprotected
262 {
263 return m_MeleeCombat;
264 }

Перекрестные ссылки m_MeleeCombat.

Используется в Init().

◆ GetMeleeFightLogic()

DayZPlayerMeleeFightLogic_LightHeavy GetMeleeFightLogic ( )
inlineprotected
267 {
268 return m_MeleeFightLogic;
269 }

◆ GetShoulderAttachmentType()

AnimRangedWeaponType GetShoulderAttachmentType ( )
inlineprotected
3083 {
3084 EntityAI shoulderAttachment = GetInventory().FindAttachment(InventorySlots.SHOULDER);
3085 EntityAI meleeAttachment = GetInventory().FindAttachment(InventorySlots.MELEE);
3086
3089
3091 {
3092 switch (shoulderAttachment.GetAttachmentSoundType())
3093 {
3094 case "Shotgun":
3095 {
3097 break;
3098 }
3099 case "Rifle":
3100 {
3102 break;
3103 }
3104 }
3105 }
3106 if (meleeAttachment)
3107 {
3108 switch (meleeAttachment.GetAttachmentSoundType())
3109 {
3110 case "Shotgun":
3111 {
3113 break;
3114 }
3115 case "Rifle":
3116 {
3118 break;
3119 }
3120 }
3121 }
3122
3124 return AnimRangedWeaponType.Shotgun;
3125
3127 return AnimRangedWeaponType.Rifle;
3128
3129 return AnimRangedWeaponType.None;
3130 }

◆ GetSlidePoseAngle()

float GetSlidePoseAngle ( )
inlineprotected
3720 {
3721 return GetDayZPlayerType().CommandMoveSettingsW().m_fSlidingPoseAngle;
3722 }

Перекрестные ссылки GetDayZPlayerType().

◆ GetSurfaceType()

string GetSurfaceType ( SurfaceAnimationBone limbType)
inlineprotected
3133 {
3134 string surfaceType;
3135 int liquidType;
3136
3137 g_Game.SurfaceUnderObjectByBoneCorrectedLiquid(this, limbType, surfaceType, liquidType);
3138
3139 return surfaceType;
3140 }
DayZGame g_Game
Definition DayZGame.c:3815

Перекрестные ссылки g_Game.

Используется в ReplaceSoundEventBase::SelectSoundID().

◆ GetThrowing()

DayZPlayerImplementThrowing GetThrowing ( )
inlineprotected
272 {
273 return m_Throwing;
274 }

Используется в ActionPossibilityCheck() и CanPlayEmote().

◆ GetTransportCache()

Transport GetTransportCache ( )
inlineprotected

Get the transport that was cached when entering unconsciousness.

517 {
518 return m_TransportCache;
519 }

◆ GetTypeOfDeath()

int GetTypeOfDeath ( int pCurrentCommandID)
inlineprotected
722 {
723 switch (pCurrentCommandID)
724 {
725 case DayZPlayerConstants.COMMANDID_SWIM:
726 return DayZPlayerConstants.DEATH_WATER;
727 case DayZPlayerConstants.COMMANDID_FALL:
728 return DayZPlayerConstants.DEATH_FALL;
729 case DayZPlayerConstants.COMMANDID_UNCONSCIOUS:
731 if (hcu)
732 {
733 if (hcu.IsOnLand())
734 return DayZPlayerConstants.DEATH_UNCON_ON_LAND;
735 if (hcu.IsInWater())
736 return DayZPlayerConstants.DEATH_UNCON_IN_WATER;
737 }
738
739 break;
740 }
741
742 return DayZPlayerConstants.DEATH_BODY;
743 }
Definition human.c:620

◆ GetWeaponManager()

◆ HandleADS()

void HandleADS ( )
inlineprotected

This is main command logic

artificial Auto-ADS delay

if !raised if sprinting

1775 {
1776 if (!IsAlive())
1777 {
1779 {
1780 ExitSights();
1781 }
1782 return;
1783 }
1784
1785 bool bADSToggle = false;
1786 bool exitSights = false;
1787 HumanInputController hic = GetInputController();
1790 PlayerBase playerPB = PlayerBase.Cast(this);
1792
1793 if (playerPB.IsRolling())
1794 {
1795 exitSights = true;
1796 }
1797
1798 if (m_ResetADS || (!hia.IsItemInHandsWeapon() && hic.WeaponADS()))
1799 {
1800 hic.ResetADS();
1801 m_ResetADS = false;
1802 }
1803
1804 if (!m_MovementState.IsRaised() || m_LiftWeapon_player)
1805 {
1807 exitSights = true;
1808 }
1809 else
1810 {
1811 if (m_bADS != hic.WeaponADS())
1812 {
1813 m_bADS = hic.WeaponADS();
1814 bADSToggle = true;
1815 }
1816
1818 {
1821 {
1822 bADSToggle = false;
1823 exitSights = true;
1824 }
1825 else
1826 {
1827 bADSToggle = true;
1828 }
1829 }
1830 }
1831
1832 if (bADSToggle && !GetCommand_Melee2() && !GetThrowing().IsThrowingModeEnabled())
1833 {
1834 if (hia.IsItemInHandsWeapon() && playerPB.GetItemInHands() && playerPB.GetItemInHands().IsWeapon() && playerPB.GetWeaponManager() && !playerPB.GetWeaponManager().IsRunning())
1835 {
1836 Weapon_Base weapon = Weapon_Base.Cast(GetHumanInventory().GetEntityInHands());
1837 ItemOptics optic = weapon.GetAttachedOptics();
1838 bool switchToADS = false;
1839 bool canUseIronsights = weapon.CanEnterIronsights();
1840 bool canUseOptics = optic != NULL;
1841
1844
1845 // go to ironsights - disable ironsights when
1848 if (!m_MovementState.IsRaised() || m_MovementState.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SPRINT)
1849 {
1850 switchToADS = false;
1851 }
1852
1853 // fixes camera switching during item transitions
1855 {
1856 exitSights = true;
1857 }
1858 else if (switchToADS) // enter ironsights or optics
1859 {
1860 // filter by usability
1862 {
1863 m_WasIronsight = false;
1864 }
1865 else if (!m_WasIronsight && !canUseOptics)
1866 {
1867 m_WasIronsight = true;
1868 }
1869
1870 if (m_WasIronsight)
1871 {
1872 hic.ResetFreeLookToggle();
1873 SwitchOptics(optic,false);
1874 SetIronsights(true);
1875 }
1876 else if (!m_WasIronsight || (!canUseIronsights && canUseOptics))
1877 {
1878 SetIronsights(false);
1879 SwitchOptics(optic,true);
1880 }
1881 else
1882 {
1883 exitSights = true;
1884 }
1885
1886 if (hcw && (m_CameraOptics/* || m_CameraIronsight*/))
1887 {
1888 hcw.SetADS(true);
1889 }
1890 }
1891 else
1892 {
1893 exitSights = true;
1894 }
1895 }
1896 }
1897
1898 // leave ironsight and/ or optics
1900 {
1901 ExitSights();
1902 }
1903 }
bool IsProcessing()
Definition DayZPlayerInventory.c:2501
bool IsWeaponRaiseCompleted()
Definition DayZPlayerImplement.c:893
bool IsFighting()
bool IsLiftWeapon()
bool m_ResetADS
Definition DayZPlayerImplement.c:168
void ResetWeaponRaiseProgress()
Definition DayZPlayerImplement.c:887
void ExitSights()
Definition DayZPlayerImplement.c:411
DayZPlayerImplementThrowing GetThrowing()
Definition DayZPlayerImplement.c:271
shorthand
Definition BoltActionRifle_Base.c:6
void HumanItemAccessor()
Definition humanitems.c:141

Перекрестные ссылки HumanItemAccessor(), IsProcessing() и m_MovementState.

◆ HandleDamageHit()

bool HandleDamageHit ( int pCurrentCommandID)
inlineprotected
1304 {
1305 // Update elapsed time since hit first
1306 if ( pCurrentCommandID == DayZPlayerConstants.COMMANDID_DAMAGE )
1307 {
1308 // Throttle heavy hit command up to a fixed rate
1310 {
1312 ResetDamageHitState(false);
1313 return false;
1314 }
1315 }
1316
1317 // If transportcache is not null, player is unconscious inside of a car and should not head into a damage command
1319 {
1321 if (m_DamageHitFullbody && (!vehCommand || vehCommand.IsGettingIn() || vehCommand.IsGettingOut()))
1322 {
1324 ResetDamageHitState(true);
1325 return true;
1326 }
1327 else
1328 {
1330 ResetDamageHitState(false);
1331 return false;
1332 }
1333 }
1334
1335 return pCurrentCommandID == DayZPlayerConstants.COMMANDID_DAMAGE;
1336 }
void ResetDamageHitState(bool resetTimer)
Definition DayZPlayerImplement.c:1338
float m_HitElapsedTime
Definition DayZPlayerImplement.c:1238
const float HIT_INTERVAL_MIN
Definition DayZPlayerImplement.c:1237
bool CommitedSuicide()
Definition DayZPlayerImplement.c:3743

◆ HandleDeath()

bool HandleDeath ( int pCurrentCommandID)
inlineprotected

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

player looks to be dead now, not unconscious

we don't want the vehicle to be haunted, re-possess the dead player so other players can use the vehicle

616 {
617 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_DEATH)
618 {
620 {
621 case -1:
622 break;
623 case 0:
625
626 PhysicsSetSolid(true);
627
631 Class.CastTo(callbackVeh.m_pPlayer, this);
632 break;
633 }
634
635 return true;
636 }
637
638 if (m_DeathAnimType != -2 && g_Game.GetMissionState() == g_Game.MISSION_STATE_GAME)
639 {
640 if (!CommitedSuicide())
641 {
642 int type = m_DeathAnimType;
643 if (type == DayZPlayerConstants.DEATH_DEFAULT)
645
646 m_WasInVehicle = false;
648 if (hcv)
649 {
650 m_TransportCache = hcv.GetTransport();
651 m_WasInVehicle = !hcv.IsGettingIn() && !hcv.IsGettingOut();
652 }
653
654 int seatIndex = -1;
656 {
657 seatIndex = m_TransportCache.CrewMemberIndex(this);
658 }
659
661 m_ShouldBeUnconscious = false;
662
665 {
666 if (IsUnconscious() || m_WasInVehicle)
667 {
668 keepInLocalSpace = true;
669 m_TransportCache.CrewDeath(seatIndex);
670 }
671 else
672 {
673 m_TransportCache.CrewGetOut(seatIndex);
674 }
675
676 m_TransportCache.MarkCrewMemberDead(seatIndex);
677
678 if (seatIndex == DayZPlayerConstants.VEHICLESEAT_DRIVER)
679 {
681
682#ifdef FEATURE_NETWORK_RECONCILIATION
683 PlayerIdentity identity = GetIdentity();
684
685 if (identity)
686 {
688 identity.Possess(this);
689 }
690#endif
691 }
692 }
693
694 DisableSimulation(false);
695 GetItemAccessor().HideItemInHands(false);
697
700 Class.CastTo(callback.m_pPlayer, this);
701 }
702 else
703 {
704 PhysicsSetRagdoll(true);
705 }
706
707 // disable voice communication
708 GetGame().GetWorld().SetVoiceOn(false, false);
709
710 return true;
711 }
712
713 return false;
714 }
Definition DayZPlayerImplement.c:11
int m_PullPlayerOutOfVehicleState
Definition DayZPlayerImplement.c:184
float m_DeathHitDir
Definition DayZPlayerImplement.c:512
bool m_PullPlayerOutOfVehicleKeepsInLocalSpace
Definition DayZPlayerImplement.c:183
int GetTypeOfDeath(int pCurrentCommandID)
Definition DayZPlayerImplement.c:721
bool m_ShouldBeUnconscious
Definition DayZPlayerImplement.c:151
int m_DeathAnimType
Definition DayZPlayerImplement.c:511
bool m_WasInVehicle
Definition DayZPlayerImplement.c:181
The class that will be instanced (moddable)
Definition gameplay.c:388

Перекрестные ссылки Class::CastTo(), g_Game и GetGame().

◆ HandleOptic()

void HandleOptic ( notnull ItemOptics optic,
bool inHands,
HumanInputController pInputs,
out bool pExitOptics )
inlineprotected
1141 {
1142 UAInterface input = GetInputInterface();
1143 if (!input)
1144 {
1145 return;
1146 }
1147
1149 int FOVcount;
1150 bool controllerPressIn;
1151 bool controllerPressOut;
1152
1153 if (input.SyncedPress_ID(UAZoomInOptics))
1154 {
1155 weapon = Weapon_Base.Cast(optic.GetHierarchyParent());
1156 FOVcount = optic.GetStepFOVCount();
1158
1160 {
1161 SetIronsights(false);
1162 SwitchOptics(optic,true);
1163 optic.SetStepFOVIndex(0);
1164 }
1165 else if (m_CameraOptics)
1166 {
1167 if (controllerPressIn) //controller
1168 {
1169 if (!optic.StepFOVUp())
1170 {
1171 if (FOVcount > 0)
1172 {
1173 optic.SetStepFOVIndex(0); //loop to minimum magnification
1174 }
1175
1176 if (weapon && weapon.CanEnterIronsights()) //loop into ironsights
1177 {
1178 SwitchOptics(optic,false);
1179 pInputs.ResetFreeLookToggle();
1180 SetIronsights(true);
1181 }
1182 }
1183 }
1184 else //m&k
1185 {
1186 optic.StepFOVUp();
1187 }
1188 }
1189 }
1190
1191 if (input.SyncedPress_ID(UAZoomOutOptics))
1192 {
1193 weapon = Weapon_Base.Cast(optic.GetHierarchyParent());
1194 FOVcount = optic.GetStepFOVCount();
1196 if (m_CameraOptics)
1197 {
1198 if (!optic.StepFOVDown())
1199 {
1201 {
1202 if (FOVcount > 0 && (!weapon || !weapon.CanEnterIronsights()))
1203 {
1204 optic.SetStepFOVIndex(FOVcount - 1); //loop to maximum magnification
1205 }
1206 }
1207
1208 if (weapon && weapon.CanEnterIronsights())
1209 {
1210 SwitchOptics(optic,false);
1211 pInputs.ResetFreeLookToggle();
1212 SetIronsights(true);
1213 }
1214 }
1215 }
1217 {
1218 SwitchOptics(optic,true);
1219 if (FOVcount > 0)
1220 {
1221 optic.SetStepFOVIndex(FOVcount - 1); //loop to maximum magnification
1222 }
1223 }
1224 }
1225 }
Definition UAInput.c:96

◆ HandleView()

void HandleView ( )
inlineprotected

3rd person camera

1906 {
1907 if (!IsAlive())
1908 {
1910 {
1911 ExitSights();
1912 }
1913 return;
1914 }
1915
1916 HumanInputController hic = GetInputController();
1917
1918 bool camChange = hic.CameraViewChanged();
1919
1920 if (IsRaised())
1921 {
1922 if (m_IsWeapon)
1923 {
1924 camChange = false;
1925 }
1926 }
1927
1929 if (GetGame().GetWorld().Is3rdPersonDisabled())
1930 {
1931 m_Camera3rdPerson = false;
1932 }
1933 else if (camChange)
1934 {
1936 }
1937
1938 // exits optics completely, comment to return to ADS
1940 ExitSights();
1941
1942 if (IsPlayerInStance(DayZPlayerConstants.STANCEMASK_RAISEDPRONE) && (m_CameraOptics || m_CameraIronsight))
1943 {
1944 SetVerticalMinimumAimLimit(DayZPlayerCameraIronsights.CONST_UD_MIN_BACK);
1946 }
1948 {
1949 SetVerticalMinimumAimLimit(DayZPlayerCameraIronsights.CONST_UD_MIN);
1951 }
1952
1953 if (hic.IsZoomToggle() && !m_MovementState.IsRaised())
1954 {
1956 if ((IsClimbingLadder() && Math.AbsInt(m_MovementState.m_iMovement) == 2) || (IsSwimming() && m_MovementState.m_iMovement == 3))
1957 {
1959 }
1960 else if (!IsClimbingLadder() && !IsSwimming() && !IsInVehicle())
1961 {
1962 float pSpeed;
1964 hic.GetMovement(pSpeed ,pLocalDirection);
1965
1966 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_ERECT && pSpeed == 3)
1967 {
1969 }
1970 }
1971 }
1972 else
1973 {
1975 }
1976
1977 if (m_MovementState.IsRaisedInProne())
1978 {
1979 float headingAngle = MiscGameplayFunctions.GetHeadingAngle(this);
1982 float headingAngleDiff = 0.0;
1983
1984 if (m_LastHeadingAngle * headingAngle < 0.0)
1985 {
1987 }
1988 else
1989 {
1991 }
1992
1993 if (headingAngleDiff > 0.2)
1994 {
1995 int time = GetGame().GetTime();
1996
1997 float timefilterconstant = 400 - (headingAngleDiff * 100);
1998
2000 {
2001 float volume = headingAngleDiff / 0.5;
2002 if (volume > 1)
2003 {
2004 volume = 1;
2005 }
2006 if (volume < 0.25)
2007 {
2008 volume = 0.25;
2009 }
2010
2012 if (m_SoundOffset > 0.25)
2013 {
2014 m_SoundOffset = 0.25;
2015 }
2016
2017 string soundSetName = "Cloth_Body_longmove_TShirt_Soundset";
2018
2019 string bodyClothName = "";
2020 EntityAI attachment = GetInventory().FindAttachment(InventorySlots.BODY);
2021 if (attachment)
2022 {
2023 bodyClothName = attachment.GetAttachmentSoundType();
2024 }
2025
2026 if (bodyClothName != "")
2027 {
2028 string path = "CfgSoundTables CfgAttachmentSoundTables Cloth_Body_Longmove_LookupTable";
2029 int soundCount = GetGame().ConfigGetChildrenCount(path);
2030
2031 for (int i = 0; i < soundCount; i++)
2032 {
2033 string name = "";
2034 GetGame().ConfigGetChildName(path, i, name);
2035
2036 if (name == bodyClothName)
2037 {
2039 GetGame().ConfigGetTextArray(path + " " + name + " soundSets", stringArray);
2040 soundSetName = stringArray.Get(0);
2041
2042 delete stringArray;
2043 }
2044 }
2045 }
2046
2049
2050 if (soundObjectBuilder != NULL)
2051 {
2052 SoundObject soundObject = soundObjectBuilder.BuildSoundObject();
2053
2054 if (soundObject != NULL)
2055 {
2056 soundObject.SetPosition(GetPosition());
2057
2058 AbstractWave wave = GetGame().GetSoundScene().Play3D(soundObject, soundObjectBuilder);
2059 wave.SetStartOffset(m_SoundOffset);
2060 wave.SetVolumeRelative(volume);
2061
2062 m_LastBackSoundTime = GetGame().GetTime();
2064 }
2065 }
2066 }
2067
2069 {
2070 float volume2 = headingAngleDiff * 2;
2071 if (volume2 > 1)
2072 {
2073 volume2 = 1;
2074 }
2075
2077 if (m_SoundOffset < 0.1)
2078 {
2079 m_SoundOffset = 0.1;
2080 }
2081 if (m_SoundOffset > 0.3)
2082 {
2083 m_SoundOffset = 0.3;
2084 }
2085
2086 string soundSetName2 = "walkProne_noHS_asphalt_ext_Char_SoundSet";
2087 string surfaceType = GetSurfaceType();
2088
2089 if (surfaceType != "")
2090 {
2091 string movementSurfaceType = "walkProne_" + surfaceType;
2092
2093 string path2 = "CfgSoundTables CfgStepSoundTables walkProne_noHS_Char_LookupTable";
2094 int soundCount2 = GetGame().ConfigGetChildrenCount(path2);
2095
2096 for (int i2 = 0; i2 < soundCount2; i2++)
2097 {
2098 string name2 = "";
2099 GetGame().ConfigGetChildName(path2, i2, name2);
2100
2102 {
2104 GetGame().ConfigGetTextArray(path2 + " " + name2 + " soundSets", stringArray2);
2105 soundSetName2 = stringArray2.Get(0);
2106
2107 delete stringArray2;
2108 }
2109 }
2110 }
2111
2114
2116 {
2117 SoundObject soundObject2 = soundObjectBuilder2.BuildSoundObject();
2118
2119 if (soundObject2 != NULL)
2120 {
2121 soundObject2.SetPosition(GetPosition());
2122
2123 AbstractWave wave2 = GetGame().GetSoundScene().Play3D(soundObject2, soundObjectBuilder2);
2124 wave2.SetStartOffset(m_SoundOffset);
2125 wave2.SetVolumeRelative(volume2);
2126
2127 m_LastBackSoundTime2 = GetGame().GetTime();
2129 }
2130 }
2131 }
2132
2134 }
2135 }
2136 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ECameraZoomType
Definition ECameraZoomType.c:2
string path
Definition OptionSelectorMultistate.c:142
class SoundObjectBuilder SoundObject(SoundParams soundParams)
void SoundObjectBuilder(SoundParams soundParams)
Definition Sound.c:119
float m_SoundOffset
Definition DayZPlayerImplement.c:2143
bool m_CameraOpticsAimOverride
Definition DayZPlayerImplement.c:143
int m_LastBackSoundTime
Definition DayZPlayerImplement.c:2141
float m_LastHeadingAngleBlock2
Definition DayZPlayerImplement.c:2139
bool IsClimbingLadder()
Definition DayZPlayerImplement.c:486
float m_LastHeadingAngle
Definition DayZPlayerImplement.c:2140
string GetSurfaceType(SurfaceAnimationBone limbType)
Definition DayZPlayerImplement.c:3132
float m_LastHeadingAngleBlock
Definition DayZPlayerImplement.c:2138
bool IsInVehicle()
Definition DayZPlayerImplement.c:476
int m_LastBackSoundTime2
Definition DayZPlayerImplement.c:2142
Definition Sound.c:46
Definition Sound.c:101
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
proto native void SetVerticalMinimumAimLimit(float value)
sets vertical minimum aim limit for a player
bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
Definition dayzplayer.c:1323
array< string > TStringArray
Definition EnScript.c:685
static proto float AbsFloat(float f)
Returns absolute value.
static proto int AbsInt(int i)
Returns absolute value.

Перекрестные ссылки Math::AbsFloat(), Math::AbsInt(), GetGame(), GetPosition, IsPlayerInStance(), m_MovementState, name, path, SetVerticalMinimumAimLimit(), SoundObject() и SoundObjectBuilder().

◆ HandleWeapons()

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

HandleWeapons

fire

974 {
976 GetDayZPlayerInventory().HandleWeaponEvents(pDt, pExitIronSights);
977
980 ItemOptics optic = weapon.GetAttachedOptics();
981
984
986
987 // hold breath
988 if (pInputs.IsHoldBreath() && m_MovementState.IsRaised() && (IsInIronsights() || IsInOptics()))
989 {
991 }
992 else
993 {
994 m_IsTryingHoldBreath = false;
995 }
996
997 if (pInputs.IsFireModeChange())
998 {
1000 }
1001 if (pInputs.IsZeroingUp())
1002 {
1003 if (optic && (optic.IsInOptics() || optic.IsUsingWeaponIronsightsOverride()))
1004 {
1005 optic.StepZeroingUp();
1006 }
1007 else
1008 {
1009 weapon.StepZeroingUpAllMuzzles();
1010 }
1011 }
1012 if (pInputs.IsZeroingDown())
1013 {
1014 if (optic && (optic.IsInOptics() || optic.IsUsingWeaponIronsightsOverride()))
1015 {
1016 optic.StepZeroingDown();
1017 }
1018 else
1019 {
1020 weapon.StepZeroingDownAllMuzzles();
1021 }
1022 }
1023
1024 if (!m_LiftWeapon_player && (m_CameraIronsight || !weapon.CanEnterIronsights() || m_CameraOptics/*m_ForceHandleOptics*/)) // HACK straight to optics, if ironsights not allowed
1025 {
1026 if (optic)
1028 }
1029
1030 if (!m_MovementState.IsRaised())
1031 {
1032 m_IsFireWeaponRaised = false; //legacy reasons
1033 if (weapon && weapon.IsInOptics())
1034 {
1035 weapon.ExitOptics();
1036 }
1037
1039
1040 return; // if not raised => return
1041 }
1042 else
1043 {
1044 m_IsFireWeaponRaised = true; //legacy reasons
1046 {
1048 }
1049
1051 {
1053 }
1054 }
1055
1057 if (GetWeaponManager().CanFire(weapon))
1058 {
1059 bool autofire = weapon.GetCurrentModeAutoFire(weapon.GetCurrentMuzzle()) && weapon.IsChamberEjectable(weapon.GetCurrentMuzzle());
1060 int burst = weapon.GetCurrentModeBurstSize(weapon.GetCurrentMuzzle());
1061 int burst_count = weapon.GetBurstCount();
1062 if (!autofire && (burst < 2 || burst_count < 1))
1063 {
1064 if (pInputs.IsAttackButtonDown() && GetInputInterface().SyncedValue("UAWeaponMeleeAttack") == 0 && GetInputInterface().SyncedValue("UAHeavyMeleeAttack") == 0)
1065 {
1067 }
1068 }
1069 else if (autofire || burst > 1)
1070 {
1071#ifdef DIAG_DEVELOPER
1072 int burst_option = GetWeaponManager().GetBurstOption();
1073 if (burst_option == 0)
1074 {
1075#endif
1076 if (pInputs.IsAttackButton() && GetInputInterface().SyncedValue("UAWeaponMeleeAttack") == 0 && GetInputInterface().SyncedValue("UAHeavyMeleeAttack") == 0)
1077 {
1078 if (autofire || burst_count < burst)
1079 {
1081 }
1082 }
1083 else
1084 {
1085 weapon.ResetBurstCount();
1086 }
1087#ifdef DIAG_DEVELOPER
1088 }
1089 else if (burst_option == 1)
1090 {
1091 if (burst > 1 && burst_count == burst)
1092 {
1093 weapon.ResetBurstCount();
1094 }
1095 else if (burst > 1 && burst_count < burst)
1096 {
1098 }
1099 else
1100 {
1101 //Autofire
1102 if (pInputs.IsAttackButton())
1103 {
1105 }
1106 }
1107 }
1108#endif
1109 }
1110 }
1111
1112 #ifdef PLATFORM_CONSOLE
1113 if (GetGame().GetInput().LocalRelease("UAFire", false) || m_ShouldReload)
1114 {
1115 if (!weapon.IsWaitingForActionFinish() && !IsFighting())
1116 {
1117 int muzzle_index = weapon.GetCurrentMuzzle();
1118
1119 if (weapon.IsChamberFiredOut(muzzle_index))
1120 {
1121 if (weapon.CanProcessWeaponEvents())
1122 {
1123 if (GetWeaponManager().CanEjectBullet(weapon))
1124 {
1126 pExitIronSights = true;
1127 m_ShouldReload = false;
1128 }
1129 }
1130 }
1131 }
1132 else
1133 {
1134 m_ShouldReload = true;
1135 }
1136 }
1137 #endif
1138 }
bool m_IsTryingHoldBreath
Definition DayZPlayerImplement.c:146
bool IsInIronsights()
Definition DayZPlayerImplement.c:306
WeaponManager GetWeaponManager()
Definition DayZPlayerImplement.c:967
bool m_ShouldReload
Definition DayZPlayerImplement.c:133
bool IsInOptics()
Definition DayZPlayerImplement.c:311
void CheckLiftWeapon()
void CompleteWeaponRaise()
Definition DayZPlayerImplement.c:881
void ProcessLiftWeapon()
bool m_IsFireWeaponRaised
Definition DayZPlayerImplement.c:3834
static const float WEAPON_RAISE_BLEND_DELAY
Definition PlayerConstants.c:3
Definition SyncedValue.c:2
bool SetNextMuzzleMode()
Definition WeaponManager.c:423
bool EjectBullet(ActionBase control_action=NULL)
Definition WeaponManager.c:386
void Fire(Weapon_Base wpn)
Definition WeaponManager.c:428

Перекрестные ссылки Class::CastTo(), GetGame(), m_MovementState и PlayerConstants::WEAPON_RAISE_BLEND_DELAY.

◆ HeadingModel()

override bool HeadingModel ( float pDt,
SDayZPlayerHeadingModel pModel )
inlineprotected

is replayed after correction when 'NetworkRewindType.REPLAY' is used

on ladder - do nothing

if it's standing from prone on back

1530 {
1531 if (!IsAlive())
1532 {
1533 return false;
1534 }
1535
1537
1539 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_LADDER)
1540 {
1542 return false;
1543 }
1544 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_VEHICLE)
1545 {
1547 if (hmv.IsGettingOut() || hmv.IsGettingIn())
1548 {
1550 }
1551
1553 return false;
1554 }
1555 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_UNCONSCIOUS)
1556 {
1558 if (!hcu.IsWakingUp())
1559 {
1561 //pModel.m_iCamMode = DayZPlayerConstants.CAMERAMODE_HEAD;
1562 return false;
1563 }
1564 }
1565
1566 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_CLIMB)
1567 {
1569 return false;
1570 }
1571
1572#ifdef DEVELOPER
1574 if (actMenuValue != 0)
1575 {
1578 }
1579#endif
1580
1581 if (m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
1582 {
1584 return false;
1585 }
1586
1588 if (m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_MOVE)
1589 {
1591 if (hcm.IsStandingFromBack())
1592 {
1594 return false;
1595 }
1596 }
1597
1599 HumanItemBehaviorCfg hibcfg = hia.GetItemInHandsBehaviourCfg();
1600 if (hibcfg && hibcfg.m_StanceRotation[m_MovementState.m_iStanceIdx] == DayZPlayerConstants.ROTATION_DISABLE)
1601 {
1603 }
1604 if (IsUnconscious() || (GetCommand_Move() && GetCommand_Move().IsLeavingUncon()))
1605 {
1607 }
1608
1610 }
float m_fLastHeadingDiff
Definition DayZPlayerImplement.c:1526
Definition DayZPlayerImplementHeading.c:11
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
Definition DayZPlayerImplementHeading.c:187
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
Definition DayZPlayerImplementHeading.c:19
static bool RotateOrient(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
Definition DayZPlayerImplementHeading.c:67
proto native bool IsLeavingUncon()
return true if character transitions out of uncon

Перекрестные ссылки DayZPlayerImplementHeading::ClampHeading(), DiagMenu::GetEngineValue(), HumanItemAccessor(), IsLeavingUncon(), m_MovementState, DayZPlayerImplementHeading::NoHeading() и DayZPlayerImplementHeading::RotateOrient().

◆ HideClothing()

void HideClothing ( ItemOptics optic,
bool state )
inlineprotected
2560{}

◆ IsAlreadyInFallingCommand()

bool IsAlreadyInFallingCommand ( int pCurrentCommandID)
inlineprotected
3703 {
3704 return pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL;
3705 }

◆ IsClimbingLadder()

bool IsClimbingLadder ( )
inlineprotected
487 {
488 return m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_LADDER;
489 }

Перекрестные ссылки m_MovementState.

Используется в CanPlayEmote().

◆ IsEyeZoom()

override bool IsEyeZoom ( )
inlineprotected

Legacy.

287 {
288 return GetEyeZoomLevel() > 0;
289 }
override int GetEyeZoomLevel()
Definition DayZPlayerImplement.c:291

Перекрестные ссылки GetEyeZoomLevel().

◆ IsFBSymptomPlaying()

bool IsFBSymptomPlaying ( )
inlineprotected
497 {
499 }
bool m_isFBsymptomPlaying
Definition DayZPlayerImplement.c:166

◆ IsFighting()

bool IsFighting ( )
protected

Используется в CanPlayEmote() и HandleInitialFirearmMelee().

◆ IsFireWeaponRaised()

bool IsFireWeaponRaised ( )
inlineprotected
327 {
329 if (m_MovementState)
330 return m_MovementState.IsRaised();
331
332 return false;
333 }

Перекрестные ссылки m_MovementState.

◆ IsHandheldOpticsInUse()

bool IsHandheldOpticsInUse ( )
inlineprotected
3795 {
3796 return m_HandheldOpticsInUse;
3797 }
bool m_HandheldOpticsInUse
Definition DayZPlayerImplement.c:167

◆ IsInFBEmoteState()

bool IsInFBEmoteState ( )
protected

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

◆ IsInFullbodyDamageAnimation()

bool IsInFullbodyDamageAnimation ( )
inlineprotected
1241 {
1243 }

◆ IsInIronsights()

bool IsInIronsights ( )
inlineprotected
307 {
308 return m_CameraIronsight;
309 }

Используется в SelectCrossHair() и ScriptedWidgetEventHandler::Update().

◆ IsInOptics()

bool IsInOptics ( )
inlineprotected
312 {
313 return m_CameraOptics;
314 }

Используется в SelectCrossHair().

◆ IsInThirdPerson()

override bool IsInThirdPerson ( )
inlineprotected
317 {
318 return m_Camera3rdPerson;
319 }

◆ IsInVehicle()

bool IsInVehicle ( )
inlineprotected
477 {
478 return m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_VEHICLE || (GetParent() != null && GetParent().IsInherited(Transport));
479 }

Перекрестные ссылки GetParent() и m_MovementState.

◆ IsLanded()

bool IsLanded ( int pCurrentCommandID)
inlineprotected
3672 {
3673 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL)
3674 {
3676
3677 if (fall)
3678 {
3679 return fall.PhysicsLanded();
3680 }
3681 }
3682
3683 return false;
3684 }

Перекрестные ссылки HumanCommandFall().

◆ IsLiftWeapon()

bool IsLiftWeapon ( )
protected

◆ IsPlayerSelected()

bool IsPlayerSelected ( )
inlineprotected
3729 {
3730 return m_PlayerSelected;
3731 }
bool m_PlayerSelected
Definition DayZPlayerImplement.c:148

Используется в ScriptedWidgetEventHandler::GetActionManager(), GetActionManager(), Update() и ScriptedWidgetEventHandler::Update().

◆ IsRaised()

bool IsRaised ( )
inlineprotected

◆ IsRestrained()

bool IsRestrained ( )
protected

Используется в CanPlayEmote() и Update().

◆ IsShootingFromCamera()

override bool IsShootingFromCamera ( )
inlineprotected
297 {
299 }

Используется в OnEmoteEnd() и StdFovUpdate().

◆ IsSprintFull()

bool IsSprintFull ( )
inlineprotected
341 {
342 return m_SprintFull;
343 }

Используется в HandleFightLogic().

◆ IsSwimming()

bool IsSwimming ( )
inlineprotected
482 {
483 return m_MovementState.m_CommandTypeId == DayZPlayerConstants.COMMANDID_SWIM;
484 }

Перекрестные ссылки m_MovementState.

Используется в CanPlayEmote().

◆ IsTryingHoldBreath()

bool IsTryingHoldBreath ( )
inlineprotected
336 {
338 }

◆ IsWeaponDebugEnabled()

bool IsWeaponDebugEnabled ( )
inlineprotected
358 {
359 return m_WeaponDebug != null;
360 }
ref WeaponDebug m_WeaponDebug
Definition DayZPlayerImplement.c:155

◆ IsWeaponRaiseCompleted()

bool IsWeaponRaiseCompleted ( )
inlineprotected
894 {
896 }

◆ LockControls()

void LockControls ( bool state)
inlineprotected
843 {
844 if (state == true)
845 {
846 GetGame().GetInput().ChangeGameFocus(1, INPUT_DEVICE_MOUSE);
847 GetGame().GetInput().ChangeGameFocus(1, INPUT_DEVICE_KEYBOARD);
848 GetGame().GetInput().ChangeGameFocus(1, INPUT_DEVICE_GAMEPAD);
849
850 if (GetGame().GetUIManager())
851 {
852 GetGame().GetUIManager().ShowUICursor(true);
853 if (GetGame().GetUIManager().IsDialogVisible())
854 GetGame().GetUIManager().CloseDialog();
855 }
856 }
857 else
858 {
859 GetGame().GetInput().ChangeGameFocus(-1, INPUT_DEVICE_MOUSE);
860 GetGame().GetInput().ChangeGameFocus(-1, INPUT_DEVICE_KEYBOARD);
861 GetGame().GetInput().ChangeGameFocus(-1, INPUT_DEVICE_GAMEPAD);
862
863 if (GetGame().GetUIManager())
864 {
865 if (GetGame().GetUIManager().GetMenu())
866 {
867 GetGame().GetUIManager().ShowUICursor(true);
868 }
869 else
870 {
871 GetGame().GetUIManager().ShowUICursor(false);
872 }
873 }
874 }
875 }
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

Перекрестные ссылки GetGame(), INPUT_DEVICE_GAMEPAD, INPUT_DEVICE_KEYBOARD и INPUT_DEVICE_MOUSE.

◆ ModCommandHandlerAfter()

bool ModCommandHandlerAfter ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected
2163 {
2164 return false;
2165 }

◆ ModCommandHandlerBefore()

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

ModOverrides

2153 {
2154 return false;
2155 }

◆ ModCommandHandlerInside()

bool ModCommandHandlerInside ( float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished )
inlineprotected
2158 {
2159 return false;
2160 }

◆ OnInputForRemote()

override void OnInputForRemote ( ParamsReadContext ctx)
inlineprotected
905 {
906 int userDataType = 0;
907 if (!ctx.Read(userDataType))
908 {
909 Error("DayZPlayer: OnInputForRemote - cannot read input type");
910 return;
911 }
912
913 switch (userDataType)
914 {
916 GetDayZPlayerInventory().OnEventForRemoteWeapon(ctx);
917 break;
919 GetDayZPlayerInventory().OnHandEventForRemote(ctx);
920 break;
922 GetDayZPlayerInventory().OnInputUserDataForRemote(ctx);
923 break;
924 default:
925 Error("OnInputForRemote - unknown userDataType=" + userDataType);
926 break;
927 }
928 }
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

Перекрестные ссылки Error(), INPUT_UDT_HAND_REMOTE_EVENT, INPUT_UDT_INVENTORY и INPUT_UDT_WEAPON_REMOTE_EVENT.

◆ OnInputFromServer()

override void OnInputFromServer ( ParamsReadContext ctx)
inlineprotected
931 {
932 int userDataType = 0;
933 if (!ctx.Read(userDataType))
934 {
935 Error("DayZPlayer: OnInputFromServer - cannot read input type");
936 return;
937 }
938
939 switch (userDataType)
940 {
942 GetDayZPlayerInventory().OnServerInventoryCommand(ctx);
943 break;
944 default:
945 Error("OnInputFromServer - unknown userDataType=" + userDataType);
946 break;
947 }
948 }

Перекрестные ссылки Error() и INPUT_UDT_INVENTORY.

◆ OnInputUserDataProcess()

bool OnInputUserDataProcess ( int userDataType,
ParamsReadContext ctx )
inlineprotected
2950 {
2951 m_MeleeCombat.SetTargetObject(null);
2952 m_MeleeCombat.SetHitPos(vector.Zero);
2953 m_MeleeCombat.SetHitZoneIdx(-1);
2954 m_MeleeCombat.SetFinisherType(-1);
2955
2957 {
2959 if (ctx.Read(target))
2960 {
2961 m_MeleeCombat.SetTargetObject(target);
2962 }
2963
2965 if (ctx.Read(hitPos))
2966 {
2967 m_MeleeCombat.SetHitPos(hitPos);
2968 }
2969
2970 int hitZoneIdx = -1;
2971 if (ctx.Read(hitZoneIdx))
2972 {
2973 m_MeleeCombat.SetHitZoneIdx(hitZoneIdx);
2974 }
2975
2976 int finisherType = -1;
2977 if (ctx.Read(finisherType))
2978 {
2979 m_MeleeCombat.SetFinisherType(finisherType);
2980 }
2981
2982 return true;
2983 }
2984
2985 return false;
2986 }
const int INPUT_UDT_MELEE_TARGET
Definition _constants.c:6
static const vector Zero
Definition EnConvert.c:110

Перекрестные ссылки INPUT_UDT_MELEE_TARGET, m_MeleeCombat и vector::Zero.

◆ OnInputUserDataReceived()

void OnInputUserDataReceived ( ParamsReadContext ctx)
inlineprotected

Input userdata

2938 {
2939 int userDataTypeParam = 0;
2940 if (!ctx.Read(userDataTypeParam))
2941 {
2942 Error("DayZPlayerImplement: cannot read input type");
2943 return;
2944 }
2945
2947 }
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
Definition DayZPlayerImplement.c:2949

Перекрестные ссылки Error() и OnInputUserDataProcess().

◆ OnItemInHandsChanged()

override void OnItemInHandsChanged ( )
inlineprotected
955 {
956 //Print("inv: DayZPlayerImplement::OnItemInHandsChanged: "/* + GetHumanInventory().GetEntityInHands()*/);
958 GetItemAccessor().OnItemInHandsChanged();
959
960 if (!IsAlive())
961 {
962 //Print("inv: DayZPlayerImplement::OnItemInHandsChanged - human not alive! calling ResetWeaponInHands");
963 GetItemAccessor().ResetWeaponInHands();
964 }
965 }
void StopWeaponEvent()
Definition DayZPlayerImplement.c:1760

Используется в Execute(), NetSyncCurrentStateID(), OnAfterStoreLoad() и TurnItemIntoItemLambda::OnSuccess().

◆ OnJumpEnd()

void OnJumpEnd ( int pLandType = 0)
inlineprotected
1752 {
1753 }

◆ OnJumpStart()

void OnJumpStart ( )
inlineprotected
1748 {
1749 }

◆ OnLadder()

void OnLadder ( float delta_time,
HumanMovementState pState )
protected

called every command handler tick when player is on ladder

◆ OnLand()

bool OnLand ( int pCurrentCommandID,
FallDamageData fallDamageData )
inlineprotected
3687 {
3688 if (pCurrentCommandID == DayZPlayerConstants.COMMANDID_FALL)
3689 {
3691
3692 if (fall)
3693 {
3694 fall.Land(fallDamageData.m_LandType);
3695 return true;
3696 }
3697 }
3698
3699 return false;
3700 }

Перекрестные ссылки HumanCommandFall().

◆ OnMovementChanged()

void OnMovementChanged ( )
inlineprotected

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

2845 {
2846 switch (m_MovementState.m_LocalMovement)
2847 {
2848 case DayZPlayerConstants.MOVEMENTIDX_CROUCH_RUN:
2849 {
2850 //OnCrouchRunEnd();
2851 break;
2852 }
2853 case DayZPlayerConstants.MOVEMENTIDX_SPRINT:
2854 {
2855 OnSprintEnd();
2856 break;
2857 }
2858 case DayZPlayerConstants.MOVEMENTIDX_RUN:
2859 {
2860 //OnRunEnd();
2861 break;
2862 }
2863 case DayZPlayerConstants.MOVEMENTIDX_WALK:
2864 {
2865 //OnWalkEnd();
2866 break;
2867 }
2868 case DayZPlayerConstants.MOVEMENTIDX_IDLE:
2869 {
2870 //OnIdleEnd();
2871 break;
2872 }
2873 case DayZPlayerConstants.MOVEMENTIDX_SLIDE:
2874 {
2875 //OnSlideEnd();
2876 break;
2877 }
2878 }
2879
2880 switch (m_MovementState.m_iMovement)
2881 {
2882 case DayZPlayerConstants.MOVEMENTIDX_CROUCH_RUN:
2883 {
2884 //OnCrouchRunStart();
2885 break;
2886 }
2887 case DayZPlayerConstants.MOVEMENTIDX_SPRINT:
2888 {
2889 OnSprintStart();
2890 break;
2891 }
2892 case DayZPlayerConstants.MOVEMENTIDX_RUN:
2893 {
2894 //OnRunStart();
2895 break;
2896 }
2897 case DayZPlayerConstants.MOVEMENTIDX_WALK:
2898 {
2899 //OnWalkStart();
2900 break;
2901 }
2902 case DayZPlayerConstants.MOVEMENTIDX_IDLE:
2903 {
2904 //OnIdleStart();
2905 break;
2906 }
2907 case DayZPlayerConstants.MOVEMENTIDX_SLIDE:
2908 {
2909 //OnSlideStart();
2910 break;
2911 }
2912 }
2913 }
void OnSprintStart()
Definition DayZPlayerImplement.c:2915
void OnSprintEnd()
Definition DayZPlayerImplement.c:2924

Перекрестные ссылки m_MovementState.

◆ OnParticleEvent()

void OnParticleEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected
3352 {
3353
3354 }

◆ OnSoundEvent()

void OnSoundEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected
3297 {
3298 int eventReplaceID;
3299
3300 if (pEventType == "Sound")
3301 {
3302 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3303 {
3304 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_COMMON);
3305 if (eventReplaceID > 0)
3306 {
3308 return;
3309 }
3310 }
3311
3313 }
3314 else if (pEventType == "SoundWeapon")
3315 {
3316 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3317 {
3318 eventReplaceID = m_ReplaceSoundEventHandler.GetSoundEventID(pUserInt, ESoundEventType.SOUND_WEAPON);
3319 if (eventReplaceID > 0)
3320 {
3322 return;
3323 }
3324 }
3325
3327 }
3328 else if (pEventType == "SoundAttachment")
3329 {
3331 }
3332 else if (pEventType == "SoundVoice")
3333 {
3334 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT || GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
3335 {
3336 int event_id = m_PlayerSoundEventHandler.ConvertAnimIDtoEventID(pUserInt);
3337 if (event_id > 0)
3338 {
3340 return;
3341 }
3342 }
3344 }
3345 else
3346 {
3347 Debug.Log("OnSoundEvent: Unknown sound event \"" + pEventType + "\"");
3348 }
3349 }
ESoundEventType
Definition ReplaceSoundEventHandler.c:2
void ProcessAttachmentEvent(string pEventType, string pUserString, int pUserInt)
Definition DayZPlayerImplement.c:3414
bool PlaySoundEventType(ESoundEventType soundType, int soundEventID, int param=0)
Handle sound event by respective sound handler based on its type.
Definition DayZPlayerImplement.c:492
AbstractWave ProcessVoiceEvent(string pEventType, string pUserString, int pUserInt)
Definition DayZPlayerImplement.c:3520
ref ReplaceSoundEventHandler m_ReplaceSoundEventHandler
Definition DayZPlayerImplement.c:126
void ProcessSoundEvent(string pEventType, string pUserString, int pUserInt)
Definition DayZPlayerImplement.c:3478
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
Definition DayZPlayerImplement.c:125
void ProcessWeaponEvent(string pEventType, string pUserString, int pUserInt)
Definition DayZPlayerImplement.c:3357
bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
Definition DayZPlayerImplement.c:493
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:136

Перекрестные ссылки GetInstanceType() и Debug::Log().

◆ OnSprintEnd()

void OnSprintEnd ( )
inlineprotected
2925 {
2926 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT)
2927 {
2928 GetUApi().GetInputByID(UALeanLeft).Unlock();
2929 GetUApi().GetInputByID(UALeanRight).Unlock();
2930 }
2931 }

Перекрестные ссылки GetInstanceType() и GetUApi().

◆ OnSprintStart()

void OnSprintStart ( )
inlineprotected
2916 {
2917 if (GetInstanceType() == DayZPlayerInstanceType.INSTANCETYPE_CLIENT)
2918 {
2919 GetUApi().GetInputByID(UALeanLeft).Lock();
2920 GetUApi().GetInputByID(UALeanRight).Lock();
2921 }
2922 }

Перекрестные ссылки GetInstanceType() и GetUApi().

◆ OnStepEvent()

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

Event Processing

3169 {
3173
3174 #ifndef SERVER
3175 DayZPlayerTypeStepSoundLookupTable table = type.GetStepSoundLookupTable();
3177 if (pUserInt < 100)
3178 {
3179 string surface;
3180 if (pUserInt % 2 == 1)
3181 {
3182 surface = GetSurfaceType(SurfaceAnimationBone.LeftBackLimb);
3183 if (surface.Length() == 0)//if no surface found, try other leg
3184 surface = GetSurfaceType(SurfaceAnimationBone.RightBackLimb);
3185 }
3186 else
3187 {
3188 surface = GetSurfaceType(SurfaceAnimationBone.RightBackLimb);
3189 if (surface.Length() == 0)//if no surface found, try other leg
3190 surface = GetSurfaceType(SurfaceAnimationBone.LeftBackLimb);
3191 }
3192
3193 if (surface.Length() != 0)
3194 m_LastSurfaceUnderHash = surface.Hash();
3195
3196 if (state.m_iMovement == DayZPlayerConstants.MOVEMENTIDX_SPRINT)
3197 {
3199
3200 if (stepParticleID > 0)
3201 {
3202 ParticleManager.GetInstance().PlayInWorld(stepParticleID, GetPosition());
3203 }
3204 }
3205
3206 soundBuilder = table.GetSoundBuilder(pUserInt, state.m_iMovement, m_LastSurfaceUnderHash, GetBootsType());
3207 }
3208 else
3209 {
3210 string surface2 = GetSurfaceType();
3211 if (surface2.Length() != 0)
3213
3214 soundBuilder = table.GetSoundBuilder(pUserInt, state.m_iMovement, m_LastSurfaceUnderHash, GetBootsType());
3215 }
3216
3217 if (soundBuilder != NULL && GetGame().GetPlayer())
3218 {
3219 vector orientation = Vector(0, 0, 0);
3220 vector edgeLength = Vector(1.5, 3.0, 1.5);
3223
3225 {
3226 for (int i = 0; i < collidedObjects.Count(); ++i)
3227 {
3229 string objectClass = colObject.GetType();
3230
3231 if (objectClass.Contains("BushSoft") || objectClass.Contains("BushHard"))
3232 {
3233 for (int j = 0; j < type.GetVegetationSounds().Count(); ++j)
3234 {
3235 VegetationSound vegetationSound = type.GetVegetationSounds().Get(j);
3236
3237 if (vegetationSound.GetAnimEventIds().Find(pUserInt) >= 0)
3238 {
3240 SoundObject vegSoundObject = vegetationSound.GetSoundObjectBuilder().BuildSoundObject();
3241
3242 if (vegSoundObject != NULL)
3243 {
3246 }
3247
3248 break;
3249 }
3250 }
3251
3252 break;
3253 }
3254 }
3255 }
3256
3257 SoundObject soundObject = soundBuilder.BuildSoundObject();
3258 if (soundObject != NULL)
3259 {
3262 }
3263 }
3264 #endif
3265
3266 if (GetGame().IsServer())
3267 {
3268 m_StepCounter++;//move outside of server condition if needed on client as well
3269
3270 float noiseMultiplier = 0;
3271
3273 if (state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_ERECT || state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDERECT)
3274 noiseParams = type.GetNoiseParamsStand();
3275 else if (state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_CROUCH || state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDCROUCH)
3276 noiseParams = type.GetNoiseParamsCrouch();
3277 else if (state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || state.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE)
3278 noiseParams = type.GetNoiseParamsProne();
3279 else
3280 {
3281 Debug.Log(string.Format("Wrong stance, id: %1 using backup with stand stance (id: 0)", state.m_iStanceIdx));
3282 noiseParams = type.GetNoiseParamsStand();
3283 }
3284
3286
3288
3290 {
3292 }
3293 }
3294 }
void PlaySound()
Definition HungerSoundHandler.c:38
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
@ Count
Definition RandomGeneratorSyncManager.c:8
int m_StepCounter
Definition DayZPlayerImplement.c:169
void AttenuateSoundIfNecessary(SoundObject soundObject)
Definition DayZPlayerImplement.c:3774
void ProcessFeetDamageServer(int pUserInt)
AnimBootsType GetBootsType()
Definition DayZPlayerImplement.c:3011
Definition dayzplayer.c:147
Definition human.c:1139
static float GetNoiseMultiplier(DayZPlayerImplement playerImplement)
Definition SensesAIEvaluate.c:5
static const int CHECK_EVERY_N_STEP
Definition PlayerConstants.c:16
Definition Surface.c:2
static int GetStepsParticleID(string surface_name)
Definition Surface.c:3
Definition dayzplayer.c:191
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
proto native int Hash()
Returns hash of string.
proto native int Length()
Returns length of string.

Перекрестные ссылки AddNoise(), PlayerConstants::CHECK_EVERY_N_STEP, Count, DayZPlayerType(), GetDayZPlayerType(), GetGame(), NoiseAIEvaluate::GetNoiseMultiplier(), NoiseAIEvaluate::GetNoiseReduction(), GetPlayer(), GetPosition, Surface::GetStepsParticleID(), string::Hash(), string::Length(), Debug::Log(), NoiseParams(), ParticleManager(), PlaySound(), SoundObject() и Vector().

◆ OnSyncJuncture()

void OnSyncJuncture ( int pJunctureID,
ParamsReadContext pCtx )
inlineprotected

SyncJunctures

2993 {
2994 switch (pJunctureID)
2995 {
2997 if (m_DeathAnimType == -2)
2999 break;
3000
3004 {
3005 m_SyncedHitDataArray.Insert(data);
3006 }
3007 break;
3008 }
3009 }
static bool ReadDeathParams(ParamsReadContext pCtx, out int pType, out float pHitDir)
Definition DayZPlayerSyncJunctures.c:74
static bool ReadDamageHitParamsEx(ParamsReadContext pCtx, out SyncHitInfo pData)
Definition DayZPlayerSyncJunctures.c:132
static const int SJ_DAMAGE_HIT
Definition DayZPlayerSyncJunctures.c:6
static const int SJ_DEATH
Definition DayZPlayerSyncJunctures.c:18

Перекрестные ссылки DayZPlayerSyncJunctures::ReadDamageHitParamsEx(), DayZPlayerSyncJunctures::ReadDeathParams(), DayZPlayerSyncJunctures::SJ_DAMAGE_HIT и DayZPlayerSyncJunctures::SJ_DEATH.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
inlineprotected
606 {
607 if (m_TriggerPullPlayerOutOfVehicleSynch && !GetGame().IsDedicatedServer())
608 {
610 }
611
612 super.OnVariablesSynchronized();
613 }
void TriggerPullPlayerOutOfVehicleImpl()
Definition DayZPlayerImplement.c:585
bool m_TriggerPullPlayerOutOfVehicleSynch
Definition DayZPlayerImplement.c:182

Перекрестные ссылки GetGame().

◆ OverrideShootFromCamera()

void OverrideShootFromCamera ( bool pState)
inlineprotected
302 {
304 }

Используется в EmoteBase::OnBeforeStandardCallbackCreated() и OnEmoteEnd().

◆ OverrideSlidePoseAngle()

void OverrideSlidePoseAngle ( float value)
inlineprotected

movement sliding override, originally for FB gestures

3709 {
3710 if (!m_MoveSettings)
3711 m_MoveSettings = GetDayZPlayerType().CommandMoveSettingsW();
3712 if (m_MoveSettings.m_fSlidingPoseAngle != value)
3713 {
3714 m_MoveSettings.m_fSlidingPoseAngle = value;
3715 StartCommand_Move(); //nescessary, re-initializes with adjusted values
3716 }
3717 }
SHumanCommandMoveSettings m_MoveSettings
Definition DayZPlayerImplement.c:127

Перекрестные ссылки GetDayZPlayerType().

◆ PlaySound()

AbstractWave PlaySound ( SoundObject so,
SoundObjectBuilder sob )
inlineprotected

Sounds

3148 {
3149 if (so == null)
3150 return null;
3151
3152 so.SetPosition(GetPosition());
3153 AbstractWave wave = GetGame().GetSoundScene().Play3D(so, sob);
3154 return wave;
3155 }

Перекрестные ссылки GetGame() и GetPosition.

◆ PlaySoundEvent()

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

◆ PlaySoundEventEx()

bool PlaySoundEventEx ( EPlayerSoundEventID id,
bool from_anim_system = false,
bool is_from_server = false,
int param = 0 )
inlineprotected
494{};

Используется в PlaySound().

◆ PlaySoundEventType()

bool PlaySoundEventType ( ESoundEventType soundType,
int soundEventID,
int param = 0 )
inlineprotected

Handle sound event by respective sound handler based on its type.

492{};

◆ ProcessAttachmentEvent()

void ProcessAttachmentEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected
3415 {
3417 DayZPlayerTypeAttachmentSoundLookupTable table = type.GetAttachmentSoundLookupTable();
3418
3420 pUserString.Split(",", attachments);
3421 for (int i = 0; i < attachments.Count(); i++)
3422 {
3423 int attachmentHash = -1;
3424 if (attachments[i] == "shoulder")
3426 else if (attachments[i] == "body")
3428 else if (attachments[i] == "back")
3430
3432
3433 if (soundBuilder != NULL)
3434 {
3435 SoundObject soundObject = soundBuilder.BuildSoundObject();
3436 if (soundObject != NULL)
3437 {
3440 }
3441 }
3442 }
3443 }
AnimUpperBodyType GetBodyAttachmentType()
Definition DayZPlayerImplement.c:3029
AnimRangedWeaponType GetShoulderAttachmentType()
Definition DayZPlayerImplement.c:3082
AnimBackType GetBackAttachmentType()
Definition DayZPlayerImplement.c:3060
Definition dayzplayer.c:171

Перекрестные ссылки DayZPlayerType(), GetDayZPlayerType(), PlaySound() и SoundObject().

◆ ProcessFeetDamageServer()

void ProcessFeetDamageServer ( int pUserInt)
protected

◆ ProcessJumpOrClimb()

bool ProcessJumpOrClimb ( float pDt,
int pCurrentCommandID )
inlineprotected

Jump / Climb

1661 {
1662 HumanInputController hic = GetInputController();
1663 if (!hic || !hic.IsJumpClimb())
1664 {
1665 return false;
1666 }
1667
1668 m_JumpClimb.JumpOrClimb();
1669
1670 if (!m_JumpClimb.WasSuccessful())
1671 {
1672 return false;
1673 }
1674
1675 return true;
1676 }

◆ ProcessLiftWeapon()

void ProcessLiftWeapon ( )
protected

◆ ProcessSoundEvent()

void ProcessSoundEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected
3479 {
3481 DayZPlayerTypeAnimTable table = type.GetSoundTable();
3483 if (table)
3484 {
3485 soundEvent = table.GetSoundEvent(pUserInt);
3486 }
3487
3488 if (soundEvent != NULL)
3489 {
3490 if (!GetGame().IsDedicatedServer())
3491 {
3492 SoundObjectBuilder objectBuilder = soundEvent.GetSoundBuilder();
3493 if (GetCommand_Ladder())
3494 {
3496 }
3497 objectBuilder.AddEnvSoundVariables(GetPosition());
3498
3499 SoundObject soundObject = objectBuilder.BuildSoundObject();
3500 if (soundObject != NULL)
3501 {
3504
3505 if (pUserString == "StopOnAnimEnd")
3507 }
3508 }
3509
3510 if (GetGame().IsServer())
3511 {
3512 if (soundEvent.m_NoiseParams != NULL)
3513 GetGame().GetNoiseSystem().AddNoise(this, soundEvent.m_NoiseParams, NoiseAIEvaluate.GetNoiseReduction(GetGame().GetWeather()));
3514 }
3515 }
3516 }
void SetVariablesLadderSoundObjectBuilder(SoundObjectBuilder soundObjectBuilder)
Definition DayZPlayerImplement.c:3445

Перекрестные ссылки DayZPlayerType(), GetDayZPlayerType(), GetGame(), NoiseAIEvaluate::GetNoiseReduction(), GetPosition, PlaySound() и SoundObject().

◆ ProcessVoiceEvent()

AbstractWave ProcessVoiceEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected
3521 {
3522 #ifdef SERVER//none of this code needs to run on server, ifdef put here rather than before the method call to maintain mod compatibility
3523 return null;
3524 #endif
3526 DayZPlayerTypeVoiceSoundLookupTable table = type.GetVoiceSoundLookupTable();
3527 if (!table)
3528 return null;
3530 EntityAI mask = GetInventory().FindAttachment(InventorySlots.MASK);
3531 EntityAI head_gear = GetInventory().FindAttachment(InventorySlots.HEADGEAR);
3532
3533 string category;
3534 if (mask || head_gear)
3535 {
3536 string category_mask;
3537 string category_headgear;
3538
3539 int priority_mask;
3541
3542 if (mask)
3543 {
3544 category_mask = mask.ConfigGetString("soundVoiceType");
3545 priority_mask = mask.ConfigGetInt("soundVoicePriority");
3546 }
3547 if (head_gear)
3548 {
3549 category_headgear = head_gear.ConfigGetString("soundVoiceType");
3550 priority_headgear = head_gear.ConfigGetInt("soundVoicePriority");
3551 }
3552
3554 {
3556 }
3557 else
3558 {
3560 }
3561 }
3562
3563 if (category == "")
3564 {
3565 category = "none";
3566 }
3567
3568 SoundObjectBuilder soundBuilder = table.GetSoundBuilder(pUserInt, category.Hash());
3569
3570 if (soundBuilder)
3571 {
3572 PlayerBase player = PlayerBase.Cast(this);
3573 //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
3574 int maleVoiceType = 0;
3575 int femaleVoiceType = 0;
3576 if (player.IsMale())
3577 {
3578 maleVoiceType = player.GetVoiceType();
3579 }
3580 else
3581 {
3582 femaleVoiceType = player.GetVoiceType();
3583 }
3584
3585 soundBuilder.AddVariable("male", maleVoiceType);
3586 soundBuilder.AddVariable("female", femaleVoiceType);
3587
3588 // end of weirdness
3589 SoundObject soundObject = soundBuilder.BuildSoundObject();
3590 if (soundObject != NULL)
3591 {
3594 }
3595
3596 }
3597
3598 return wave;
3599 }
Definition DayZPlayerCfgSounds.c:168

Перекрестные ссылки DayZPlayerType(), GetDayZPlayerType(), PlaySound() и SoundObject().

Используется в Play().

◆ ProcessWeaponEvent()

void ProcessWeaponEvent ( string pEventType,
string pUserString,
int pUserInt )
inlineprotected
3358 {
3361
3362 float quantity = 0;
3363
3364 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
3365 if (entityInHands && entityInHands.IsInherited(ItemBase))
3366 {
3367 ItemBase item;
3369 if (item.HasQuantity())
3370 quantity = (float)item.GetQuantity() / (item.GetQuantityMax() - item.GetQuantityMin());
3371 InventoryItemType invItemType = item.GetInventoryItemType();
3372 soundEvent = invItemType.GetSoundEvent(pUserInt);
3373 }
3374
3375 if (soundEvent == null)
3376 {
3377 quantity = 0;
3378 soundEvent = type.GetSoundWeaponEvent(pUserInt);
3379 }
3380
3381 if (soundEvent != null)
3382 {
3383 if (!GetGame().IsDedicatedServer())
3384 {
3386 if (builder)
3387 {
3388 builder.AddVariable("quantity", quantity);
3389 builder.AddVariable("interior", IsSoundInsideBuilding());
3390
3391 SoundObject soundObject = builder.BuildSoundObject();
3392 if (soundObject != NULL)
3393 {
3396
3397 if (pUserString == "StopOnAnimEnd")
3399 }
3400 }
3401 else
3402 {
3403 //TODO:Userful error message
3404 }
3405 }
3406
3407 if (GetGame().IsServer())
3408 {
3409 AddNoise(soundEvent.m_NoiseParams, NoiseAIEvaluate.GetNoiseReduction(GetGame().GetWeather()));
3410 }
3411 }
3412 }
int m_ActionSoundCategoryHash
Definition DayZPlayerImplement.c:185
Definition InventoryItemType.c:2
Definition EnConvert.c:97

Перекрестные ссылки AddNoise(), Class::CastTo(), DayZPlayerType(), GetDayZPlayerType(), GetGame(), NoiseAIEvaluate::GetNoiseReduction(), PlaySound() и SoundObject().

◆ RequestSoundEvent()

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

◆ RequestSoundEventEx()

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

Используется в DrowningMdfr::PlayDrowningSound().

◆ ResetDamageHitState()

void ResetDamageHitState ( bool resetTimer)
inlineprotected
1339 {
1341 m_DamageHitFullbody = false;
1342
1343 if (resetTimer)
1344 {
1345 m_HitElapsedTime = 0;
1346 }
1347 }

◆ ResetDeathStartTime()

void ResetDeathStartTime ( )
inlineprotected
717 {
719 }
proto native void ResetDeathCooldown()

Перекрестные ссылки ResetDeathCooldown().

◆ ResetWeaponRaiseProgress()

void ResetWeaponRaiseProgress ( )
inlineprotected
888 {
891 }

◆ RunADSTimer()

void RunADSTimer ( )
protected

◆ SendCompleteWeaponRaiseJuncture()

void SendCompleteWeaponRaiseJuncture ( )
protected

◆ SendDeathJuncture()

void SendDeathJuncture ( int pAnimTypeDeath,
float pAnimHitDirDeath )
inlineprotected
746 {
748 return;
749
751 m_DeathJuctureSent = true;
752 }
bool m_DeathJuctureSent
Definition DayZPlayerImplement.c:513
static void SendDeath(DayZPlayer pPlayer, int pType, float pHitDir)
Definition DayZPlayerSyncJunctures.c:65

Перекрестные ссылки DayZPlayerSyncJunctures::SendDeath().

◆ SendSoundEvent()

void SendSoundEvent ( EPlayerSoundEventID id)
protected

◆ SendSoundEventEx()

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

◆ SetClimbingLadderType()

void SetClimbingLadderType ( string value)
inlineprotected
467 {
469 }
string m_ClimbingLadderType
Definition DayZPlayerImplement.c:165

◆ SetCurrentWaterLevel()

override void SetCurrentWaterLevel ( float pWaterLevel)
inlineprotected
373 {
375 }

Используется в DayZPlayerImplementSwimming::HandleSwimming().

◆ SetDeathDarknessLevel()

void SetDeathDarknessLevel ( float duration,
float tick_time )
protected

◆ SetFallYDiff()

void SetFallYDiff ( float value)
inlineprotected
363 {
365 }

◆ SetHandheldOpticsInUse()

void SetHandheldOpticsInUse ( bool state)
inlineprotected
3790 {
3792 }

◆ SetIronsights()

void SetIronsights ( bool value)
inlineprotected
378 {
379 Weapon_Base weapon = Weapon_Base.Cast(GetHumanInventory().GetEntityInHands());
380 if (weapon)
381 {
383 }
384
386
387 if (value)
388 {
390 if (hcw)
391 {
392 hcw.SetADS(true);
393 }
394 }
395 }

◆ SetIsInThirdPerson()

void SetIsInThirdPerson ( bool state)
inlineprotected
322 {
324 }

◆ SetOptics()

void SetOptics ( bool value)
inlineprotected
398 {
400
401 if (value)
402 {
404 if (hcw)
405 {
406 hcw.SetADS(!IsHandheldOpticsInUse());
407 }
408 }
409 }

◆ SetReturnToOptics()

void SetReturnToOptics ( bool state)
protected

◆ SetSuicide()

void SetSuicide ( bool state)
inlineprotected
3739 {
3740 m_Suicide = state;
3741 }

Используется в CommitSuicide() и EmoteBase::OnCallbackEnd().

◆ SetVariablesLadderSoundObjectBuilder()

void SetVariablesLadderSoundObjectBuilder ( SoundObjectBuilder soundObjectBuilder)
inlineprotected
3446 {
3447 if (m_ClimbingLadderType == "wood")
3448 {
3449 soundObjectBuilder.AddVariable("laddertype", 1);
3450 }
3451 else
3452 {
3453 soundObjectBuilder.AddVariable("laddertype", 0);
3454 }
3455
3457
3458 if (pBoots == AnimBootsType.None)
3459 {
3460 soundObjectBuilder.AddVariable("bare", 1);
3461 soundObjectBuilder.AddVariable("sneakers", 0);
3462 soundObjectBuilder.AddVariable("boots", 0);
3463 }
3464 else if (pBoots == AnimBootsType.Sneakers)
3465 {
3466 soundObjectBuilder.AddVariable("bare", 0);
3467 soundObjectBuilder.AddVariable("sneakers", 1);
3468 soundObjectBuilder.AddVariable("boots", 0);
3469 }
3470 else if (pBoots == AnimBootsType.Boots)
3471 {
3472 soundObjectBuilder.AddVariable("bare", 0);
3473 soundObjectBuilder.AddVariable("sneakers", 0);
3474 soundObjectBuilder.AddVariable("boots", 1);
3475 }
3476 }

◆ ShowDeadScreen()

void ShowDeadScreen ( bool show,
float duration )
inlineprotected
762 {
763 #ifndef NO_GUI
764 if (show && IsPlayerSelected())
765 {
766 #ifdef PLATFORM_PS4
768 #endif
769
770 string message = "";
771 if (!GetGame().GetMission().IsPlayerRespawning())
772 {
773 message = "#dayz_implement_dead";
774 }
775
776 #ifdef PLATFORM_CONSOLE
777 GetGame().GetUIManager().ScreenFadeIn(duration, message, FadeColors.DARK_RED, FadeColors.WHITE);
778 #else
779 GetGame().GetUIManager().ScreenFadeIn(duration, message, FadeColors.BLACK, FadeColors.WHITE);
780 #endif
781 }
782 else
783 {
784 GetGame().GetUIManager().ScreenFadeOut(duration);
785
786 if (duration > 0)
787 GetGame().GetCallQueue(CALL_CATEGORY_GUI).CallLater(StopDeathDarkeningEffect, duration*1000, false);
788 else
790 }
791 #endif
792 }
bool IsPlayerSelected()
Definition DayZPlayerImplement.c:3728
override void StopDeathDarkeningEffect()
Definition DayZPlayerImplement.c:794
Definition OnlineServices.c:2
static void SetMultiplayState(bool state)
Definition OnlineServices.c:517
const int CALL_CATEGORY_GUI
Definition tools.c:9

Перекрестные ссылки CALL_CATEGORY_GUI, GetGame() и OnlineServices::SetMultiplayState().

◆ ShowWeaponDebug()

void ShowWeaponDebug ( bool show)
inlineprotected
346 {
347 if (show)
348 {
350 }
351 else
352 {
354 }
355 }
Definition WeaponDebug.c:12

◆ SimulateDeath()

void SimulateDeath ( bool state)
inlineprotected
804 {
805 if (g_Game.GetMissionState() != DayZGame.MISSION_STATE_GAME)
806 return;
807
809
810 if (state)
811 {
813 if (m_KilledByHeadshot)
814 {
815 duration = 0;
816 }
817
819 {
822
824 m_DeathEffectTimer.Run(DYING_PROGRESSION_TIME, this, "SetDeathDarknessLevel", par, true);
825 }
826
828
829 GetGame().GetSoundScene().SetSoundVolume(0,0);
830 GetGame().GetSoundScene().SetSpeechExVolume(0,0);
831 GetGame().GetSoundScene().SetMusicVolume(0,0);
832 GetGame().GetSoundScene().SetVOIPVolume(0,0);
833 GetGame().GetSoundScene().SetRadioVolume(0,0);
834 }
835 else
836 {
839 }
840 }
static const float DEFAULT_DYING_TIME
DEPRECATED.
Definition DayZPlayerImplement.c:113
ref DeathEffectTimer m_DeathEffectTimer
Definition DayZPlayerImplement.c:156
static const float DYING_PROGRESSION_TIME
how long does it take to full death screen [s]
Definition DayZPlayerImplement.c:114
void ShowDeadScreen(bool show, float duration)
Definition DayZPlayerImplement.c:761
bool m_IsUnconscious
Definition DayZPlayerImplement.c:150
void LockControls(bool state)
Definition DayZPlayerImplement.c:842

Перекрестные ссылки g_Game и GetGame().

◆ StopADSTimer()

void StopADSTimer ( )
protected

◆ StopDeathDarkeningEffect()

override void StopDeathDarkeningEffect ( )
inlineprotected
795 {
796 if (m_DeathEffectTimer && m_DeathEffectTimer.IsRunning())
797 {
798 m_DeathEffectTimer.Stop();
800 }
801 }

◆ StopHandEvent()

void StopHandEvent ( )
inlineprotected
1756 {
1757 GetDayZPlayerInventory().CancelHandEvent();
1758 }

◆ StopWeaponEvent()

void StopWeaponEvent ( )
inlineprotected
1761 {
1762 GetDayZPlayerInventory().CancelWeaponEvent();
1763 }

◆ SwitchOptics()

void SwitchOptics ( ItemOptics optic,
bool state )
inlineprotected
441 {
442 if (optic)
443 {
444 if (state)
445 {
446 if (optic.HasEnergyManager())
447 optic.GetCompEM().SwitchOn();
448 optic.EnterOptics();
449 optic.OnOpticEnter();
450 }
451 else
452 {
453 optic.ExitOptics();
454 optic.OnOpticExit();
455 if (optic.HasEnergyManager())
456 optic.GetCompEM().SwitchOff();
457 }
458 }
459
460 if (m_CameraOptics != state)
461 {
463 }
464 }

◆ TriggerPullPlayerOutOfVehicle()

void TriggerPullPlayerOutOfVehicle ( )
inlineprotected

we don't want the vehicle to be haunted, re-possess the dead player so other players can use the vehicle

537 {
538 if (!GetGame().IsServer())
539 {
540 return;
541 }
542
545 {
546 return;
547 }
548
549 int crewIdx = -1;
550 for (int i = 0; i < transport.CrewSize(); ++i)
551 {
552 if (transport.CrewMember(i) == this)
553 {
554 crewIdx = i;
555 break;
556 }
557 }
558
559 if (crewIdx == -1)
560 {
561 return;
562 }
563
564 transport.CrewGetOut(crewIdx);
566
567 if (crewIdx == DayZPlayerConstants.VEHICLESEAT_DRIVER)
568 {
570
571#ifdef FEATURE_NETWORK_RECONCILIATION
572 PlayerIdentity identity = GetIdentity();
573
574 if (identity)
575 {
577 identity.Possess(this);
578 }
579#endif
580 }
581
582 SetSynchDirty();
583 }

Перекрестные ссылки Class::CastTo(), GetGame() и GetParent().

◆ TriggerPullPlayerOutOfVehicleImpl()

void 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

586 {
589
591 DisableSimulation(false);
592
593 switch (GetInstanceType())
594 {
595 case DayZPlayerInstanceType.INSTANCETYPE_SERVER:
596 case DayZPlayerInstanceType.INSTANCETYPE_CLIENT:
597 case DayZPlayerInstanceType.INSTANCETYPE_AI_SERVER:
598 case DayZPlayerInstanceType.INSTANCETYPE_AI_SINGLEPLAYER:
601 break;
602 }
603 }

Перекрестные ссылки GetInstanceType() и ResetDeathCooldown().

Поля

◆ DEAD_SCREEN_DELAY

const int DEAD_SCREEN_DELAY = 1000
staticprivate

◆ DEFAULT_DYING_TIME

const float DEFAULT_DYING_TIME = 2.5
staticprivate

DEPRECATED.

◆ DYING_PROGRESSION_TIME

const float DYING_PROGRESSION_TIME = 0.05
staticprivate

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

◆ HIT_INTERVAL_MIN

const float HIT_INTERVAL_MIN = 0.3
protected

◆ m_ActionSoundCategoryHash

int m_ActionSoundCategoryHash
protected

◆ m_ADSAutomationTimer

ref Timer m_ADSAutomationTimer
protected

◆ m_ADSTimerLaunched

bool m_ADSTimerLaunched
protected

◆ m_AimingFinisherStarted

bool m_AimingFinisherStarted = false
protected

◆ m_AimingModel

ref DayZPlayerImplementAiming m_AimingModel
protected

◆ m_bADS

bool m_bADS
protected

◆ m_Camera3rdPerson

bool m_Camera3rdPerson
protected

◆ m_CameraEyeZoom

bool m_CameraEyeZoom
protected

◆ m_CameraEyeZoomLevel

ECameraZoomType m_CameraEyeZoomLevel
protected

◆ m_CameraIronsight

bool m_CameraIronsight
protected

◆ m_CameraOptics

bool m_CameraOptics
protected

◆ m_CameraOpticsAimOverride

bool m_CameraOpticsAimOverride
protected

◆ m_CameraZoomToggle

bool m_CameraZoomToggle
protected

◆ m_ClimbingLadderType

string m_ClimbingLadderType
protected

◆ m_ContinueFirearmMelee

bool m_ContinueFirearmMelee
protected

◆ m_CurrentWaterLevel

float m_CurrentWaterLevel
private

◆ m_DamageHealth

float m_DamageHealth = 0.0
protected

◆ m_DamageHitAnimType

int m_DamageHitAnimType = -1.0
protected

◆ m_DamageHitDir

float m_DamageHitDir = 0.0
protected

◆ m_DamageHitFullbody

bool m_DamageHitFullbody = false
protected

HandleDamageHit

◆ m_DeathAnimType

int m_DeathAnimType = -2
protected

HandleDeath

◆ m_DeathDarkeningCurrentTime

float m_DeathDarkeningCurrentTime
protected

◆ m_DeathEffectTimer

ref DeathEffectTimer m_DeathEffectTimer
protected

◆ m_DeathHitDir

float m_DeathHitDir = 0
protected

◆ m_DeathJuctureSent

bool m_DeathJuctureSent = false
protected

◆ m_DebugDirectionVal

float m_DebugDirectionVal = -180
protected

VKOSTIK - tady dat 0 misto -1.

◆ m_DebugTypeVal

bool m_DebugTypeVal = false
protected

◆ m_DebugWeaponChangeItem

string m_DebugWeaponChangeItem
protected

◆ m_DebugWeaponChangeShowSlot

int m_DebugWeaponChangeShowSlot
protected

◆ m_DebugWeaponChangeStage

int m_DebugWeaponChangeStage = 0
protected

◆ m_dT

float m_dT
protected

◆ m_FallDamage

ref DayZPlayerImplementFallDamage m_FallDamage
protected

◆ m_FallYDiff

float m_FallYDiff
protected

◆ m_FightEndBlendTimer

ref Timer m_FightEndBlendTimer
protected

◆ m_fLastHeadingDiff

float m_fLastHeadingDiff = 0
protected

This HeadingModel

◆ m_HandheldOpticsInUse

bool m_HandheldOpticsInUse
protected

◆ m_HitElapsedTime

float m_HitElapsedTime = HIT_INTERVAL_MIN
protected

◆ m_isFBsymptomPlaying

bool m_isFBsymptomPlaying
protected

◆ m_IsFireWeaponRaised

bool m_IsFireWeaponRaised
protected

◆ m_IsRaised

bool m_IsRaised
protected

◆ m_IsShootingFromCamera

bool m_IsShootingFromCamera
protected

◆ m_IsTryingHoldBreath

bool m_IsTryingHoldBreath
protected

◆ m_IsUnconscious

bool m_IsUnconscious
protected

◆ m_IsUnconsciousFalling

bool m_IsUnconsciousFalling
protected

◆ m_IsWeapon

bool m_IsWeapon
protected

◆ m_JumpClimb

ref DayZPlayerImplementJumpClimb m_JumpClimb
protected

◆ m_LastBackSoundTime

int m_LastBackSoundTime
protected

◆ m_LastBackSoundTime2

int m_LastBackSoundTime2
protected

◆ m_LastCommandBeforeUnconscious

int m_LastCommandBeforeUnconscious
protected

◆ m_LastHeadingAngle

float m_LastHeadingAngle
protected

◆ m_LastHeadingAngleBlock

float m_LastHeadingAngleBlock
protected

◆ m_LastHeadingAngleBlock2

float m_LastHeadingAngleBlock2
protected

◆ m_LastSurfaceUnderHash

int m_LastSurfaceUnderHash
protected

◆ m_LiftWeapon_player

bool m_LiftWeapon_player
protected

◆ m_MeleeCombat

ref DayZPlayerImplementMeleeCombat m_MeleeCombat
protected

◆ m_MeleeFightLogic

ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
protected

◆ m_MovementState

ref HumanMovementState m_MovementState = new HumanMovementState()
private

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

cached ptr for movement state

◆ m_MoveSettings

SHumanCommandMoveSettings m_MoveSettings
protected

◆ m_NextVoNNoiseTime

int m_NextVoNNoiseTime
protected

◆ m_PerformedActionSounds

ref array<AbstractWave> m_PerformedActionSounds
protected

◆ m_PlayerSelected

bool m_PlayerSelected
protected

◆ m_PlayerSoundEventHandler

ref PlayerSoundEventHandler m_PlayerSoundEventHandler
protected

◆ m_ProcessFirearmMeleeHit

bool m_ProcessFirearmMeleeHit
protected

◆ m_ProcessLiftWeapon

bool m_ProcessLiftWeapon
protected

◆ m_ProcessLiftWeaponState

bool m_ProcessLiftWeaponState
protected

◆ m_ProcessWeaponRaiseCompleted

bool m_ProcessWeaponRaiseCompleted
protected

◆ m_PullPlayerOutOfVehicleKeepsInLocalSpace

bool m_PullPlayerOutOfVehicleKeepsInLocalSpace = false
protected

◆ m_PullPlayerOutOfVehicleState

int m_PullPlayerOutOfVehicleState = -1
protected

◆ m_RaiseStarted

bool m_RaiseStarted = false
protected

◆ m_ReplaceSoundEventHandler

ref ReplaceSoundEventHandler m_ReplaceSoundEventHandler
protected

◆ m_ResetADS

bool m_ResetADS
protected

◆ m_ShouldBeUnconscious

bool m_ShouldBeUnconscious
protected

◆ m_ShouldReload

bool m_ShouldReload
protected

◆ m_SoundOffset

float m_SoundOffset
protected

◆ m_SprintedTime

float m_SprintedTime
protected

◆ m_SprintedTimePerStanceMin

float m_SprintedTimePerStanceMin
protected

◆ m_SprintFull

bool m_SprintFull
protected

◆ m_StepCounter

int m_StepCounter
protected

◆ m_Suicide

bool m_Suicide
protected

◆ m_Swimming

ref DayZPlayerImplementSwimming m_Swimming
protected

◆ m_SyncedHitDataArray

ref array<ref SyncHitInfo> m_SyncedHitDataArray
protected

◆ m_TestDamageCounter

float m_TestDamageCounter = -1
protected

This is Debug functionality

◆ m_Throwing

ref DayZPlayerImplementThrowing m_Throwing
protected

◆ m_TransportCache

Transport m_TransportCache
protected

◆ m_TriggerPullPlayerOutOfVehicleSynch

bool m_TriggerPullPlayerOutOfVehicleSynch
protected

◆ m_UnconsciousDebug

bool m_UnconsciousDebug
protected

◆ m_WasInVehicle

bool m_WasInVehicle
private

◆ m_WasIronsight

bool m_WasIronsight
protected

◆ m_WeaponDebug

ref WeaponDebug m_WeaponDebug
protected

◆ m_WeaponRaiseCompleted

bool m_WeaponRaiseCompleted
protected

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

◆ m_WeaponRaiseTime

float m_WeaponRaiseTime
private

Объявления и описания членов класса находятся в файле: