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

◆ ValidateMuzzleArray()

void ValidateMuzzleArray ( )

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

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

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

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

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