From dae7f064d090d22630b051b15351ab7ec25d77a4 Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Sat, 17 Jun 2006 06:01:44 +0000 Subject: [PATCH] -pre-load enemy weapons with the ammo type that was selected for them instead of the default type git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@247 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Inventory Choosing.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tactical/Inventory Choosing.cpp b/Tactical/Inventory Choosing.cpp index 879208ebf..6f4d0a787 100644 --- a/Tactical/Inventory Choosing.cpp +++ b/Tactical/Inventory Choosing.cpp @@ -624,6 +624,7 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC usGunIndex = pp->Inv[ i ].usItem; ubChanceStandardAmmo = 100 - (bWeaponClass * -9); // weapon class is negative! usAmmoIndex = RandomMagazine( usGunIndex, ubChanceStandardAmmo ); + pp->Inv[ i ].ubGunAmmoType = Magazine[Item[usAmmoIndex].ubClassIndex].ubAmmoType; if ( Item[usGunIndex].fingerprintid ) { @@ -891,6 +892,7 @@ void ChooseWeaponForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bWeaponC //} usAmmoIndex = RandomMagazine( &pp->Inv[HANDPOS], ubChanceStandardAmmo ); + pp->Inv[ HANDPOS ].ubGunAmmoType = Magazine[Item[usAmmoIndex].ubClassIndex].ubAmmoType; } //Ammo