◆ RegisterHitComponent()
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) |
22 {
24
27
29 }
holds hit components and its weights for attack from AI (used on each type - DayZPlayerType,...
Definition DayZAIHitComponents.c:3
Используется в RegisterHitComponentsForAI(), DayZCreatureAI::RegisterHitComponentsForAI() и AnimalBase::RegisterHitComponentsForAI().
◆ SelectMostProbableHitComponent()
41 {
44
46 {
49
51 {
53 return true;
54 }
55 }
56
57 return false;
58 }
static int SumOfWeights(array< ref DayZAIHitComponent > pHitComponents)
Calculates the sum of all entries in DayZAIHitComponent array.
Definition DayZAIHitComponents.c:68
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].
Перекрестные ссылки Math::RandomInt() и SumOfWeights().
Используется в GetHitComponentForAI() и DayZCreatureAI::GetHitComponentForAI().
◆ SumOfWeights()
Calculates the sum of all entries in DayZAIHitComponent array.
- Аргументы
-
[in] | pHitComponents | array that keeps registered compoenents |
- Возвращает
- Sum of weights of all entries in array
69 {
71
73 {
76 }
77
79 }
Используется в SelectMostProbableHitComponent().
Объявления и описания членов класса находятся в файле: