PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
DayZInfected Class Reference

Private Member Functions

void ZombieBase ()
 
void Init ()
 
override void OnVariablesSynchronized ()
 synced variable(s) handler
 
override void EOnInit (IEntity other, int extra)
 
override bool IsZombie ()
 
override bool IsDanger ()
 
override bool IsZombieMilitary ()
 
bool IsMale ()
 
override bool CanBeBackstabbed ()
 
override AnimBootsType GetBootsType ()
 
override bool CanBeSkinned ()
 
override bool IsHealthVisible ()
 
override bool IsRefresherSignalingViable ()
 
override bool IsSelfAdjustingTemperature ()
 
override string GetHitComponentForAI ()
 returns hit component for attacking AI
 
override string GetDefaultHitComponent ()
 returns default hit component (fallback)
 
override vector GetDefaultHitPosition ()
 
protected vector SetDefaultHitPosition (string pSelection)
 
override array< stringGetSuitableFinisherHitComponents ()
 returns suitable hit components for finisher attacks; DEPRECATED
 
int GetMindStateSynced ()
 
int GetOrientationSynced ()
 returns rounded zombie yaw for sync purposes
 
void CommandHandler (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
void CommandHandlerDebug (float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
 
void HandleMove (int pCurrentCommandID)
 
void HandleOrientation (float pDt, int pCurrentCommandID)
 
bool HandleDeath (int pCurrentCommandID)
 
bool EvaluateDeathAnimationEx (EntityAI pSource, ZombieHitData data, out int pAnimType, out float pAnimHitDir)
 
bool EvaluateDeathAnimation (EntityAI pSource, string pComponent, string pAmmoType, out int pAnimType, out float pAnimHitDir)
 
int GetVaultType (float height)
 
bool HandleVault (int pCurrentCommandID, DayZInfectedInputController pInputController, float pDt)
 
bool HandleMindStateChange (int pCurrentCommandID, DayZInfectedInputController pInputController, float pDt)
 
protected void HandleSoundEvents ()
 
AbstractWave ProcessVoiceFX (string pSoundSetName)
 
override void OnSoundVoiceEvent (int event_id, string event_user_string)
 
protected void ProcessSoundVoiceEvent (AnimSoundVoiceEvent sound_event, out AbstractWave aw)
 
bool FightLogic (int pCurrentCommandID, DayZInfectedInputController pInputController, float pDt)
 
bool ChaseAttackLogic (int pCurrentCommandID, DayZInfectedInputController pInputController, float pDt)
 
bool FightAttackLogic (int pCurrentCommandID, DayZInfectedInputController pInputController, float pDt)
 
int GetAttackPitch (EntityAI target)
 
bool HandleCrawlTransition (int pCurrentCommandID)
 
bool EvaluateCrawlTransitionAnimation (EntityAI pSource, string pComponent, string pAmmoType, out int pAnimType)
 
bool HandleDamageHit (int pCurrentCommandID)
 
bool EvaluateDamageHitAnimation (EntityAI pSource, string pComponent, string pAmmoType, out bool pHeavyHit, out int pAnimType, out float pAnimHitDir)
 selects animation type and direction based on damage system data
 
float ComputeHitDirectionAngle (EntityAI pSource)
 
float ComputeHitDirectionAngleEx (EntityAI pSource, int invertHitDir=0)
 
override void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
 
override void EEHitByRemote (int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
 
protected void DebugSound (string s)
 sound debug messages
 
override protected void EOnContact (IEntity other, Contact extra)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override vector GetCenter ()
 
override bool IsBeingBackstabbed ()
 returns true if backstab is in progress; used for suspending of AI targeting and other useful things besides
 
override void SetBeingBackstabbed (int backstabType)
 
bool IsCrawling ()
 returns true if crawling; 'DayZInfectedCommandCrawl' is only for the transition, after that it remains 'DayZInfectedCommandMove' (unreliable)
 
void OnRecoverFromDeath ()
 
override void AddArrow (Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
 
override bool IsManagingArrows ()
 
override ArrowManagerBase GetArrowManager ()
 

Private Attributes

const float TARGET_CONE_ANGLE_CHASE = 20
 
const float TARGET_CONE_ANGLE_FIGHT = 30
 
const float ORIENTATION_SYNC_THRESHOLD = 30
 
const float SHOCK_TO_STUN_MULTIPLIER = 2.82
 
protected int m_StanceVariation = 0
 server / singleplayer properties
 
protected int m_LastMindState = -1
 
protected float m_LastMovementSpeed = -1
 
protected bool m_KnuckleLand = false
 
protected float m_KnuckleOutTimer = 0
 
protected int m_MindState = -1
 
protected int m_OrientationLocal = -1
 
protected int m_OrientationSynced = -1
 
protected float m_OrientationTimer
 
protected float m_MovementSpeed = -1
 
protected vector m_DefaultHitPosition
 
protected float m_DeltaTime
 
protected AbstractWave m_LastSoundVoiceAW
 
protected ref InfectedSoundEventHandler m_InfectedSoundEventHandler
 
protected ref array< Objectm_AllTargetObjects
 
protected ref array< typenamem_TargetableObjects
 
protected bool m_IsCrawling
 
protected bool m_FinisherInProgress = false
 
protected ref ArrowManagerBase m_ArrowManager
 
float m_DamageHitDirection = 0
 
int m_DeathType = 0
 
int m_ActiveVaultType = -1
 
EntityAI m_ActualTarget = null
 
float m_AttackCooldownTime = 0
 
DayZInfectedAttackType m_ActualAttackType = null
 
int m_CrawlTransition = -1
 
bool m_DamageHitToProcess = false
 
bool m_DamageHitHeavy = false
 
int m_DamageHitType = 0
 
float m_ShockDamage = 0
 
const float HIT_INTERVAL_MIN = 0.3
 
float m_HitElapsedTime = HIT_INTERVAL_MIN
 

Member Function Documentation

◆ AddArrow()

override void AddArrow ( Object  arrow,
int  componentIndex,
vector  closeBonePosWS,
vector  closeBoneRotWS 
)
inlineprivate

◆ CanBeBackstabbed()

override bool CanBeBackstabbed ( )
inlineprivate

◆ CanBeSkinned()

override bool CanBeSkinned ( )
inlineprivate

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI  attachment,
int  slotId 
)
inlineprivate

◆ ChaseAttackLogic()

bool ChaseAttackLogic ( int  pCurrentCommandID,
DayZInfectedInputController  pInputController,
float  pDt 
)
inlineprivate

◆ CommandHandler()

void CommandHandler ( float  pDt,
int  pCurrentCommandID,
bool  pCurrentCommandFinished 
)
inlineprivate

CommandHandler

for mods

handle death

movement handler (just for sync now)

handle finished commands

default behaviour after finish is to start move

for mods

crawl transition

damage hits

References ModCommandHandlerAfter(), ModCommandHandlerBefore(), and ModCommandHandlerInside().

◆ CommandHandlerDebug()

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

CommandHandlerDebug

References GetPluginManager().

◆ ComputeHitDirectionAngle()

float ComputeHitDirectionAngle ( EntityAI  pSource)
inlineprivate

◆ ComputeHitDirectionAngleEx()

float ComputeHitDirectionAngleEx ( EntityAI  pSource,
int  invertHitDir = 0 
)
inlineprivate

◆ DebugSound()

protected void DebugSound ( string  s)
inlineprivate

sound debug messages

◆ EEHitBy()

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

Events from damage system

References component, and TotalDamageResult::GetDamage().

◆ EEHitByRemote()

override void EEHitByRemote ( int  damageType,
EntityAI  source,
int  component,
string  dmgZone,
string  ammo,
vector  modelPos 
)
inlineprivate

References component.

◆ EOnContact()

override protected void EOnContact ( IEntity  other,
Contact  extra 
)
inlineprivate

Phx contact event

References GetGame().

◆ EOnInit()

override void EOnInit ( IEntity  other,
int  extra 
)
inlineprivate

References GetGame(), and Math::RandomInt().

◆ EvaluateCrawlTransitionAnimation()

bool EvaluateCrawlTransitionAnimation ( EntityAI  pSource,
string  pComponent,
string  pAmmoType,
out int  pAnimType 
)
inlineprivate

◆ EvaluateDamageHitAnimation()

bool EvaluateDamageHitAnimation ( EntityAI  pSource,
string  pComponent,
string  pAmmoType,
out bool  pHeavyHit,
out int  pAnimType,
out float  pAnimHitDir 
)
inlineprivate

selects animation type and direction based on damage system data

heavy hit

anim type

direction

shock GetDamage

References CGame::ConfigGetInt(), and GetGame().

◆ EvaluateDeathAnimation()

bool EvaluateDeathAnimation ( EntityAI  pSource,
string  pComponent,
string  pAmmoType,
out int  pAnimType,
out float  pAnimHitDir 
)
inlineprivate

anim type

direction

add some impulse if needed

References CGame::ConfigGetInt(), dBodyApplyImpulse(), and GetGame().

◆ EvaluateDeathAnimationEx()

bool EvaluateDeathAnimationEx ( EntityAI  pSource,
ZombieHitData  data,
out int  pAnimType,
out float  pAnimHitDir 
)
inlineprivate

◆ FightAttackLogic()

◆ FightLogic()

bool FightLogic ( int  pCurrentCommandID,
DayZInfectedInputController  pInputController,
float  pDt 
)
inlineprivate

player is in block stance and facing the infected

infected is playing heavy attack - decrease the dmg to light

override hit pos by pos defined in type

infected is playing light attack - do not send damage, play animation instead

override hit pos by pos defined in type

References Math::AbsFloat(), GameConstants::AI_MAX_BLOCKABLE_ANGLE, Math3D::AngleFromPosition(), vector::DistanceSq(), EntityAI::GetMeleeTargetType(), DayZInfectedInputController::GetMindState(), GetPosition, DayZInfectedAttackType::m_AmmoType, DayZInfectedAttackType::m_Distance, DayZInfectedAttackType::m_IsHeavy, and Math::RAD2DEG.

◆ GetArrowManager()

override ArrowManagerBase GetArrowManager ( )
inlineprivate

References m_ArrowManager.

◆ GetAttackPitch()

int GetAttackPitch ( EntityAI  target)
inlineprivate

no default hit pos fallback

References Math::AbsFloat(), GetPosition, and vector::Zero.

◆ GetBootsType()

override AnimBootsType GetBootsType ( )
inlineprivate

◆ GetCenter()

override vector GetCenter ( )
inlineprivate

References GetBoneIndexByName().

◆ GetDefaultHitComponent()

override string GetDefaultHitComponent ( )
inlineprivate

returns default hit component (fallback)

◆ GetDefaultHitPosition()

override vector GetDefaultHitPosition ( )
inlineprivate

◆ GetHitComponentForAI()

override string GetHitComponentForAI ( )
inlineprivate

returns hit component for attacking AI

◆ GetMindStateSynced()

int GetMindStateSynced ( )
inlineprivate

◆ GetOrientationSynced()

int GetOrientationSynced ( )
inlineprivate

returns rounded zombie yaw for sync purposes

◆ GetSuitableFinisherHitComponents()

override array< string > GetSuitableFinisherHitComponents ( )
inlineprivate

returns suitable hit components for finisher attacks; DEPRECATED

◆ GetVaultType()

int GetVaultType ( float  height)
inlineprivate

◆ HandleCrawlTransition()

bool HandleCrawlTransition ( int  pCurrentCommandID)
inlineprivate

◆ HandleDamageHit()

bool HandleDamageHit ( int  pCurrentCommandID)
inlineprivate

◆ HandleDeath()

bool HandleDeath ( int  pCurrentCommandID)
inlineprivate

◆ HandleMindStateChange()

bool HandleMindStateChange ( int  pCurrentCommandID,
DayZInfectedInputController  pInputController,
float  pDt 
)
inlineprivate

Mind state change

References DayZInfectedInputController::GetMindState().

◆ HandleMove()

void HandleMove ( int  pCurrentCommandID)
inlineprivate

◆ HandleOrientation()

void HandleOrientation ( float  pDt,
int  pCurrentCommandID 
)
inlineprivate

◆ HandleSoundEvents()

protected void HandleSoundEvents ( )
inlineprivate

Sound (client only)

no sound handler - bail out

infected is dead

stop all sounds

◆ HandleVault()

bool HandleVault ( int  pCurrentCommandID,
DayZInfectedInputController  pInputController,
float  pDt 
)
inlineprivate

◆ Init()

void Init ( )
inlineprivate

sets default hit position and cache it here (mainly for impact particles)

client only

References GetDefaultHitPositionComponent(), GetGame(), InfectedSoundEventHandler(), m_AllTargetObjects, m_ArrowManager, and m_TargetableObjects.

◆ IsBeingBackstabbed()

override bool IsBeingBackstabbed ( )
inlineprivate

returns true if backstab is in progress; used for suspending of AI targeting and other useful things besides

◆ IsCrawling()

bool IsCrawling ( )
inlineprivate

returns true if crawling; 'DayZInfectedCommandCrawl' is only for the transition, after that it remains 'DayZInfectedCommandMove' (unreliable)

◆ IsDanger()

override bool IsDanger ( )
inlineprivate

◆ IsHealthVisible()

override bool IsHealthVisible ( )
inlineprivate

◆ IsMale()

bool IsMale ( )
inlineprivate

◆ IsManagingArrows()

override bool IsManagingArrows ( )
inlineprivate

◆ IsRefresherSignalingViable()

override bool IsRefresherSignalingViable ( )
inlineprivate

◆ IsSelfAdjustingTemperature()

override bool IsSelfAdjustingTemperature ( )
inlineprivate

◆ IsZombie()

override bool IsZombie ( )
inlineprivate

◆ IsZombieMilitary()

override bool IsZombieMilitary ( )
inlineprivate

◆ OnRecoverFromDeath()

void OnRecoverFromDeath ( )
inlineprivate

◆ OnSoundVoiceEvent()

override void OnSoundVoiceEvent ( int  event_id,
string  event_user_string 
)
inlineprivate

stop state sound when playing anim SoundVoice

stop playing of old SoundVoice from anim (if any)

play new SoundVoice from anim

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
inlineprivate

synced variable(s) handler

◆ ProcessSoundVoiceEvent()

protected void ProcessSoundVoiceEvent ( AnimSoundVoiceEvent  sound_event,
out AbstractWave  aw 
)
inlineprivate

◆ ProcessVoiceFX()

AbstractWave ProcessVoiceFX ( string  pSoundSetName)
inlineprivate

◆ SetBeingBackstabbed()

override void SetBeingBackstabbed ( int  backstabType)
inlineprivate

◆ SetDefaultHitPosition()

protected vector SetDefaultHitPosition ( string  pSelection)
inlineprivate

◆ ZombieBase()

void ZombieBase ( )
inlineprivate

References Init().

Field Documentation

◆ HIT_INTERVAL_MIN

const float HIT_INTERVAL_MIN = 0.3
private

◆ m_ActiveVaultType

int m_ActiveVaultType = -1
private

HandleVault

◆ m_ActualAttackType

DayZInfectedAttackType m_ActualAttackType = null
private

◆ m_ActualTarget

EntityAI m_ActualTarget = null
private

Combat

◆ m_AllTargetObjects

protected ref array<Object> m_AllTargetObjects
private

◆ m_ArrowManager

protected ref ArrowManagerBase m_ArrowManager
private

◆ m_AttackCooldownTime

float m_AttackCooldownTime = 0
private

◆ m_CrawlTransition

int m_CrawlTransition = -1
private

Crawl transition

◆ m_DamageHitDirection

float m_DamageHitDirection = 0
private

HandleDeath

◆ m_DamageHitHeavy

bool m_DamageHitHeavy = false
private

◆ m_DamageHitToProcess

bool m_DamageHitToProcess = false
private

Damage hits

◆ m_DamageHitType

int m_DamageHitType = 0
private

◆ m_DeathType

int m_DeathType = 0
private

◆ m_DefaultHitPosition

protected vector m_DefaultHitPosition
private

◆ m_DeltaTime

protected float m_DeltaTime
private

◆ m_FinisherInProgress

protected bool m_FinisherInProgress = false
private

◆ m_HitElapsedTime

float m_HitElapsedTime = HIT_INTERVAL_MIN
private

◆ m_InfectedSoundEventHandler

protected ref InfectedSoundEventHandler m_InfectedSoundEventHandler
private

◆ m_IsCrawling

protected bool m_IsCrawling
private

◆ m_KnuckleLand

protected bool m_KnuckleLand = false
private

◆ m_KnuckleOutTimer

protected float m_KnuckleOutTimer = 0
private

◆ m_LastMindState

protected int m_LastMindState = -1
private

◆ m_LastMovementSpeed

protected float m_LastMovementSpeed = -1
private

◆ m_LastSoundVoiceAW

protected AbstractWave m_LastSoundVoiceAW
private

◆ m_MindState

protected int m_MindState = -1
private

◆ m_MovementSpeed

protected float m_MovementSpeed = -1
private

◆ m_OrientationLocal

protected int m_OrientationLocal = -1
private

◆ m_OrientationSynced

protected int m_OrientationSynced = -1
private

◆ m_OrientationTimer

protected float m_OrientationTimer
private

◆ m_ShockDamage

float m_ShockDamage = 0
private

◆ m_StanceVariation

protected int m_StanceVariation = 0
private

server / singleplayer properties

◆ m_TargetableObjects

protected ref array<typename> m_TargetableObjects
private

◆ ORIENTATION_SYNC_THRESHOLD

const float ORIENTATION_SYNC_THRESHOLD = 30
private

◆ SHOCK_TO_STUN_MULTIPLIER

const float SHOCK_TO_STUN_MULTIPLIER = 2.82
private

◆ TARGET_CONE_ANGLE_CHASE

const float TARGET_CONE_ANGLE_CHASE = 20
private

◆ TARGET_CONE_ANGLE_FIGHT

const float TARGET_CONE_ANGLE_FIGHT = 30
private

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