1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef AI_VARIABLES_H
18 #define AI_VARIABLES_H
20 #include "nel/misc/variable.h"
26 extern NLMISC::CVariable
<uint32
> StatMgrTotalUpdCtr
;
27 extern NLMISC::CVariable
<uint32
> StatMgrFaunaUpdCtr
;
28 extern NLMISC::CVariable
<uint32
> StatMgrNpcUpdCtr
;
29 extern NLMISC::CVariable
<uint32
> StatMgrPetUpdCtr
;
30 extern NLMISC::CVariable
<uint32
> StatMgrPlayerUpdCtr
;
33 extern NLMISC::CVariable
<uint32
> StatGrpTotalUpdCtr
;
34 extern NLMISC::CVariable
<uint32
> StatGrpFaunaUpdCtr
;
35 extern NLMISC::CVariable
<uint32
> StatGrpNpcUpdCtr
;
36 extern NLMISC::CVariable
<uint32
> StatGrpPetUpdCtr
;
39 extern NLMISC::CVariable
<uint32
> StatBotTotalUpdCtr
;
40 extern NLMISC::CVariable
<uint32
> StatBotFaunaUpdCtr
;
41 extern NLMISC::CVariable
<uint32
> StatBotNpcUpdCtr
;
44 extern NLMISC::CVariable
<uint32
> StatPathFindingCalls
;
45 extern NLMISC::CVariable
<float> StatPathFindingIterations
;
46 extern NLMISC::CVariable
<float> StatPathFindingHeapSize
;
47 extern NLMISC::CVariable
<uint32
> StatPathFindingCallsInside
;
48 extern NLMISC::CVariable
<float> StatPathFindingIterationsInside
;
49 extern NLMISC::CVariable
<float> StatPathFindingHeapSizeInside
;
52 extern NLMISC::CVariable
<uint32
> StatGrpFastUpdCtr
;
53 extern NLMISC::CVariable
<uint32
> StatGrpSlowUpdCtr
;
54 extern NLMISC::CVariable
<uint32
> StatVision0Ctr
;
55 extern NLMISC::CVariable
<uint32
> StatVision1To64Ctr
;
56 extern NLMISC::CVariable
<uint32
> StatVision65To127Ctr
;
57 extern NLMISC::CVariable
<uint32
> StatVision128To254Ctr
;
58 extern NLMISC::CVariable
<uint32
> StatVision255Ctr
;
61 extern uint32 MgrTotalUpdCtr
;
62 extern uint32 MgrFaunaUpdCtr
;
63 extern uint32 MgrNpcUpdCtr
;
64 extern uint32 MgrPetUpdCtr
;
65 extern uint32 MgrPlayerUpdCtr
;
67 extern uint32 GrpTotalUpdCtr
;
68 extern uint32 GrpFaunaUpdCtr
;
69 extern uint32 GrpNpcUpdCtr
;
70 extern uint32 GrpPetUpdCtr
;
72 extern uint32 BotTotalUpdCtr
;
73 extern uint32 BotFaunaUpdCtr
;
74 extern uint32 BotNpcUpdCtr
;
76 extern uint32 PathFindingCalls
;
77 extern uint32 PathFindingIterations
;
78 extern uint32 PathFindingHeapSize
;
79 extern uint32 PathFindingCallsInside
;
80 extern uint32 PathFindingIterationsInside
;
81 extern uint32 PathFindingHeapSizeInside
;
83 extern uint32 GrpFastUpdCtr
;
84 extern uint32 GrpSlowUpdCtr
;
85 extern uint32 VisionCtr
[256];
106 PathFindingCalls
= 0;
107 PathFindingIterations
= 0;
108 PathFindingHeapSize
= 0;
109 PathFindingCallsInside
= 0;
110 PathFindingIterationsInside
= 0;
111 PathFindingHeapSizeInside
= 0;
113 AISStat::GrpFastUpdCtr
= 0;
114 AISStat::GrpSlowUpdCtr
= 0;
115 for (size_t i
=0; i
<256; ++i
)
123 StatMgrTotalUpdCtr
= MgrTotalUpdCtr
;
124 StatMgrFaunaUpdCtr
= MgrFaunaUpdCtr
;
125 StatMgrNpcUpdCtr
= MgrNpcUpdCtr
;
126 StatMgrPetUpdCtr
= MgrPetUpdCtr
;
127 StatMgrPlayerUpdCtr
= MgrPlayerUpdCtr
;
129 StatGrpTotalUpdCtr
= GrpTotalUpdCtr
;
130 StatGrpFaunaUpdCtr
= GrpFaunaUpdCtr
;
131 StatGrpNpcUpdCtr
= GrpNpcUpdCtr
;
132 StatGrpPetUpdCtr
= GrpPetUpdCtr
;
134 StatBotTotalUpdCtr
= BotTotalUpdCtr
;
135 StatBotFaunaUpdCtr
= BotFaunaUpdCtr
;
136 StatBotNpcUpdCtr
= BotNpcUpdCtr
;
138 StatPathFindingCalls
= PathFindingCalls
;
139 StatPathFindingIterations
= PathFindingCalls
!=0?(float)PathFindingIterations
/(float)PathFindingCalls
:0.f
;
140 StatPathFindingHeapSize
= PathFindingCalls
!=0?(float)PathFindingHeapSize
/(float)PathFindingCalls
:0.f
;
141 StatPathFindingCallsInside
= PathFindingCallsInside
;
142 StatPathFindingIterationsInside
= PathFindingCallsInside
!=0?(float)PathFindingIterationsInside
/(float)PathFindingCallsInside
:0.f
;
143 StatPathFindingHeapSizeInside
= PathFindingCallsInside
!=0?(float)PathFindingHeapSizeInside
/(float)PathFindingCallsInside
:0.f
;
145 StatGrpFastUpdCtr
= GrpFastUpdCtr
;
146 StatGrpSlowUpdCtr
= GrpSlowUpdCtr
;
147 StatVision0Ctr
= VisionCtr
[0];
149 for (size_t i
=1; i
<=64; ++i
)
150 total
+= VisionCtr
[i
];
151 StatVision1To64Ctr
= total
;
153 for (size_t i
=65; i
<=127; ++i
)
154 total
+= VisionCtr
[i
];
155 StatVision65To127Ctr
= total
;
157 for (size_t i
=128; i
<=254; ++i
)
158 total
+= VisionCtr
[i
];
159 StatVision128To254Ctr
= total
;
160 StatVision255Ctr
= VisionCtr
[255];
165 extern NLMISC::CVariable
<float> AggroReturnDistCheck
;
166 extern NLMISC::CVariable
<float> AggroReturnDistCheckFauna
;
167 extern NLMISC::CVariable
<float> AggroReturnDistCheckNpc
;
168 extern NLMISC::CVariable
<float> AggroD1Radius
;
169 extern NLMISC::CVariable
<float> AggroD2Radius
;
170 extern NLMISC::CVariable
<float> AggroPrimaryGroupDist
;
171 extern NLMISC::CVariable
<float> AggroPrimaryGroupCoef
;
172 extern NLMISC::CVariable
<float> AggroSecondaryGroupDist
;
173 extern NLMISC::CVariable
<float> AggroSecondaryGroupCoef
;
174 extern NLMISC::CVariable
<float> AggroPropagationRadius
;
176 extern NLMISC::CVariable
<uint32
> HealSpecificDowntime
;
177 extern NLMISC::CVariable
<uint32
> HealSpecificDowntimeSelf
;
179 #endif // AI_VARIABLES_H