DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ValidateMuzzleArray()

void ValidateMuzzleArray ( )

Safety check and error message in case not set up correctly.

См. определение в файле WeaponStableState.c строка 163

164 {
165 // There is only one
166 if (IsSingleState())
167 return;
168
169 bool failed = false;
170
171 if (!failed)
172 {
173 foreach (MuzzleState state : m_muzzleHasBullet)
174 {
175 if ( state == MuzzleState.U )
176 {
177 failed = true;
178 break;
179 }
180 }
181 }
182
183 if (failed)
184 {
185 ErrorExSeverity severity = ErrorExSeverity.ERROR;
186
187 #ifdef DEVELOPER
188 if (DayZGame.m_IsPreviewSpawn)
189 {
190 // we do not want VMEs when spawning the item in order to visualize it for preview in script console
191 severity = ErrorExSeverity.INFO;
192 }
193 #endif
194
195 ErrorEx("Muzzle array validation has failed. Please set up the correct muzzle states by overriding InitMuzzleArray.", severity);
196 }
197 }
MuzzleState
Определения WeaponStableState.c:15
ref array< MuzzleState > m_muzzleHasBullet
Определения WeaponStableState.c:30
bool IsSingleState()
Special one for when the weapon only has one singular state (like Magnum)
Определения WeaponStableState.c:144
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки ErrorEx, IsSingleState() и m_muzzleHasBullet.

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