DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс AITargetCallbacksPlayer
+ Граф наследования:AITargetCallbacksPlayer:

Закрытые члены

void AITargetCallbacksPlayer (PlayerBase pPlayer)
 
override vector GetHeadPositionWS ()
 
override vector GetVisionPointPositionWS (EntityAI pApplicant)
 
override float GetMaxVisionRangeModifier (EntityAI pApplicant)
 

Закрытые статические члены

static int StanceToMovementIdxTranslation (HumanMovementState pState)
 

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

int m_iChestBoneIndex
 
PlayerBase m_Player
 
int m_iHeadBoneIndex
 DEPRECATED.
 

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

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

◆ AITargetCallbacksPlayer()

void AITargetCallbacksPlayer ( PlayerBase pPlayer)
inlineprivate
8 {
10
11 m_iChestBoneIndex = m_Player.GetBoneIndexByName("Spine3");
12 }
int m_iChestBoneIndex
Definition AITargetCallbacksPlayer.c:3
PlayerBase m_Player
Definition AITargetCallbacksPlayer.c:5
Definition EntityAI.c:95

Перекрестные ссылки m_iChestBoneIndex и m_Player.

Методы

◆ GetHeadPositionWS()

override vector GetHeadPositionWS ( )
inlineprivate
15 {
18
19 return position;
20 }
Definition EnConvert.c:106

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

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

◆ GetMaxVisionRangeModifier()

override float GetMaxVisionRangeModifier ( EntityAI pApplicant)
inlineprivate

player speed mofifications

stance modification

mean value of the coefs

47 {
49 m_Player.GetMovementState(state);
50
51 float mod = 1.0;
54
57 {
58 case DayZPlayerConstants.MOVEMENTIDX_WALK:
60 break;
61
62 case DayZPlayerConstants.MOVEMENTIDX_IDLE:
64 break;
65 }
66
68 switch (state.m_iStanceIdx)
69 {
70 case DayZPlayerConstants.STANCEIDX_CROUCH:
71 case DayZPlayerConstants.STANCEIDX_RAISEDCROUCH:
73 break;
74
75 case DayZPlayerConstants.STANCEIDX_PRONE:
76 case DayZPlayerConstants.STANCEIDX_RAISEDPRONE:
78 break;
79 }
80
82 mod = (speedCoef + stanceCoef) / 2;
83
84 return mod;
85 }
Definition AITargetCallbacksPlayer.c:2
static int StanceToMovementIdxTranslation(HumanMovementState pState)
Definition AITargetCallbacksPlayer.c:89
Definition human.c:1139
Definition PlayerConstants.c:2
static const float AI_VISIBILITY_CROUCH
Definition PlayerConstants.c:241
static const float AI_VISIBILITY_STANDING
Definition PlayerConstants.c:240
static const float AI_VISIBILITY_RUN
Definition PlayerConstants.c:237
static const float AI_VISIBILITY_PRONE
Definition PlayerConstants.c:242
static const float AI_VISIBILITY_IDLE
Definition PlayerConstants.c:239
static const float AI_VISIBILITY_WALK
Definition PlayerConstants.c:238
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки PlayerConstants::AI_VISIBILITY_CROUCH, PlayerConstants::AI_VISIBILITY_IDLE, PlayerConstants::AI_VISIBILITY_PRONE, PlayerConstants::AI_VISIBILITY_RUN, PlayerConstants::AI_VISIBILITY_STANDING, PlayerConstants::AI_VISIBILITY_WALK, m_Player и StanceToMovementIdxTranslation().

◆ GetVisionPointPositionWS()

override vector GetVisionPointPositionWS ( EntityAI pApplicant)
inlineprivate
23 {
25 if (infected)
26 {
27 DayZInfectedInputController ic = infected.GetInputController();
28 if (ic)
29 {
30 int mindState = ic.GetMindState();
31 if (mindState >= DayZInfectedConstants.MINDSTATE_ALERTED)
32 {
33 return GetHeadPositionWS();
34 }
35 else
36 {
37 if (m_iChestBoneIndex != -1)
38 return m_Player.GetBonePositionWS(m_iChestBoneIndex);
39 }
40 }
41 }
42
43 return m_Player.GetPosition() + "0 1 0";
44 }
DayZInfectedConstants
Definition DayZInfected.c:2
override vector GetHeadPositionWS()
Definition AITargetCallbacksPlayer.c:14
Definition ZombieBase.c:2
Definition DayZInfectedInputController.c:2

Перекрестные ссылки GetHeadPositionWS(), m_iChestBoneIndex и m_Player.

◆ StanceToMovementIdxTranslation()

static int StanceToMovementIdxTranslation ( HumanMovementState pState)
inlinestaticprivate

Translates players speed (idx) and corrects it by current stance used mainly for visibility/audibility of player to AI

90 {
91 int movementSpeed = 0;
92
93 switch (pState.m_iStanceIdx)
94 {
95 case DayZPlayerConstants.STANCEIDX_CROUCH:
96 switch (pState.m_iMovement)
97 {
98 case DayZPlayerConstants.MOVEMENTIDX_IDLE:
99 movementSpeed = DayZPlayerConstants.MOVEMENTIDX_IDLE;
100 break;
101
102 case DayZPlayerConstants.MOVEMENTIDX_WALK:
103 case DayZPlayerConstants.MOVEMENTIDX_RUN:
104 movementSpeed = DayZPlayerConstants.MOVEMENTIDX_WALK;
105 break;
106
107 case DayZPlayerConstants.MOVEMENTIDX_SPRINT:
108 movementSpeed = DayZPlayerConstants.MOVEMENTIDX_CROUCH_RUN;
109 break;
110 }
111 break;
112
113 case DayZPlayerConstants.STANCEIDX_PRONE:
114 switch (pState.m_iMovement)
115 {
116 case DayZPlayerConstants.MOVEMENTIDX_IDLE:
117 movementSpeed = DayZPlayerConstants.MOVEMENTIDX_IDLE;
118 break;
119
120 default:
121 movementSpeed = DayZPlayerConstants.MOVEMENTIDX_WALK;
122 break;
123 }
124 break;
125
126 default:
127 movementSpeed = pState.m_iMovement;
128 }
129
130 return movementSpeed;
131 }

Используется в GetMaxVisionRangeModifier(), GetMovementSpeedVisualCoef() и NoiseAIEvaluate::GetNoiseMultiplierByPlayerSpeed().

Поля

◆ m_iChestBoneIndex

int m_iChestBoneIndex
private

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

◆ m_iHeadBoneIndex

int m_iHeadBoneIndex
private

DEPRECATED.

◆ m_Player


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