DIFF

class DayZAIHitComponentHelpers

Methods 3

static void RegisterHitComponent(array<ref DayZAIHitComponent> pHitComponents, string pName, float pWeight)

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.

in pHitComponents
array that keeps registered compoenents
in pName
component name (zone in Damage System)
in pWeight
weight of the component (probability)
static bool SelectMostProbableHitComponent(array<ref DayZAIHitComponent> pHitComponents, out string pHitComponent)

Computes hit component probability based on weights

in pHitComponents
array that keeps registered compoenents
out pHitComponent
selected component name (can be passed to Damage System)

Returns: true if found, false otherwise

static int SumOfWeights(array<ref DayZAIHitComponent> pHitComponents)

Calculates the sum of all entries in DayZAIHitComponent array

in pHitComponents
array that keeps registered compoenents

Returns: Sum of weights of all entries in array