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

Static Private Member Functions

static void RegisterHitComponent (array< ref DayZAIHitComponent > pHitComponents, string pName, float pWeight)
 Register Hit Component for AI targeting.
 
static bool SelectMostProbableHitComponent (array< ref DayZAIHitComponent > pHitComponents, out string pHitComponent)
 
static int SumOfWeights (array< ref DayZAIHitComponent > pHitComponents)
 Calculates the sum of all entries in DayZAIHitComponent array.
 

Member Function Documentation

◆ RegisterHitComponent()

RegisterHitComponent ( array< ref DayZAIHitComponent pHitComponents,
string  pName,
float  pWeight 
)
inlinestaticprivate

Register Hit Component for AI targeting.

Register Hit Component for AI targeting to array defined on entity's Type (DayZPlayerType, DayZInfectedType, etc.) Uses component name from damage system (zone) and its weight.

Parameters
[in]pHitComponentsarray that keeps registered compoenents
[in]pNamecomponent name (zone in Damage System)
[in]pWeightweight of the component (probability)

References DayZAIHitComponent::m_Name, and DayZAIHitComponent::m_Weight.

Referenced by DeathUpdate(), RegisterHitComponentsForAI(), DayZCreatureAI::RegisterHitComponentsForAI(), and AnimalBase::RegisterHitComponentsForAI().

◆ SelectMostProbableHitComponent()

static bool SelectMostProbableHitComponent ( array< ref DayZAIHitComponent pHitComponents,
out string  pHitComponent 
)
inlinestaticprivate

◆ SumOfWeights()

SumOfWeights ( array< ref DayZAIHitComponent pHitComponents)
inlinestaticprivate

Calculates the sum of all entries in DayZAIHitComponent array.

Parameters
[in]pHitComponentsarray that keeps registered compoenents
Returns
Sum of weights of all entries in array

References DayZAIHitComponent::m_Weight.

Referenced by SelectMostProbableHitComponent().


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