mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
make sure enemies only use legal ammo types
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@126 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -4454,7 +4454,7 @@ UINT16 RandomMagazine( UINT16 usItem, UINT8 ubPercentStandard )
|
||||
while ( Magazine[ usLoop ].ubCalibre != NOAMMO )
|
||||
{
|
||||
if (Magazine[usLoop].ubCalibre == pWeapon->ubCalibre &&
|
||||
Magazine[usLoop].ubMagSize == pWeapon->ubMagSize)
|
||||
Magazine[usLoop].ubMagSize == pWeapon->ubMagSize && ItemIsLegal(MagazineClassIndexToItemType(usLoop)))
|
||||
{
|
||||
// store it! (make sure array is big enough)
|
||||
Assert(usPossibleMagCnt < MAX_AMMO_TYPES_PER_GUN);
|
||||
@@ -4536,7 +4536,7 @@ UINT16 RandomMagazine( OBJECTTYPE * pGun, UINT8 ubPercentStandard )
|
||||
while ( Magazine[ usLoop ].ubCalibre != NOAMMO )
|
||||
{
|
||||
if (Magazine[usLoop].ubCalibre == pWeapon->ubCalibre &&
|
||||
Magazine[usLoop].ubMagSize == GetMagSize(pGun))
|
||||
Magazine[usLoop].ubMagSize == GetMagSize(pGun) && ItemIsLegal(MagazineClassIndexToItemType(usLoop)))
|
||||
{
|
||||
// store it! (make sure array is big enough)
|
||||
Assert(usPossibleMagCnt < MAX_AMMO_TYPES_PER_GUN);
|
||||
|
||||
Reference in New Issue
Block a user