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

◆ CanLoadMultipleBullet()

bool WeaponManager::CanLoadMultipleBullet ( Weapon_Base wpn,
Magazine mag,
bool reservationCheck = true )
inlineprotected

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

232 {
233 if (!wpn || !mag)
234 return false;
235
236 if (m_player.GetHumanInventory().GetEntityInHands() != wpn)
237 return false;
238
239 if (mag.IsDamageDestroyed() || wpn.IsDamageDestroyed())
240 return false;
241
242 if (wpn.IsJammed())
243 return false;
244
245 if (m_player.IsItemsToDelete())
246 return false;
247
248 if (reservationCheck && (m_player.GetInventory().HasInventoryReservation(wpn, null) || m_player.GetInventory().HasInventoryReservation(mag, null)))
249 return false;
250
251 bool found = false;
252 bool fireout = false;
253 for (int i = 0; i < wpn.GetMuzzleCount(); i++)
254 {
255 if (fireout)
256 return true;
257
258 if (wpn.CanChamberBullet(i, mag) )
259 {
260 if (found)
261 {
262 return true;
263 }
264
265 if (wpn.HasInternalMagazine(i))
266 {
267 if ((wpn.GetInternalMagazineCartridgeCount(i) + 1) < wpn.GetInternalMagazineMaxCartridgeCount(i))
268 {
269 return true;
270 }
271 }
272
273 if (wpn.IsChamberFiredOut(i))
274 {
275 if (i > 0)
276 return true;
277 fireout = true;
278 }
279 found = true;
280 }
281 }
282
283 return false;
284 }
override bool CanChamberBullet(int muzzleIndex, Magazine mag)
Определения Magnum.c:162
PlayerBase m_player
Определения WeaponManager.c:5

Перекрестные ссылки Weapon_Base::CanChamberBullet() и m_player.