BUGFIX 482 - Corrected several variable definitions so that large mag capacity is better supported.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4478 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2011-06-06 20:37:23 +00:00
parent 25133e0afe
commit ab7ecb51e6
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -5835,7 +5835,7 @@ BOOLEAN PlaceObject( SOLDIERTYPE * pSoldier, INT8 bPos, OBJECTTYPE * pObj )
{
if(!(gTacticalStatus.uiFlags & INCOMBAT))
{
INT16 magSize, ubShotsLeft;
UINT16 magSize, ubShotsLeft;
OBJECTTYPE tempClip;
OBJECTTYPE tempStack;
bool clipCreated;
@@ -7119,7 +7119,7 @@ BOOLEAN CreateGun( UINT16 usItem, INT16 bStatus, OBJECTTYPE * pObj )
return( TRUE );
}
BOOLEAN CreateAmmo( UINT16 usItem, OBJECTTYPE * pObj, INT16 ubShotsLeft )
BOOLEAN CreateAmmo( UINT16 usItem, OBJECTTYPE * pObj, UINT16 ubShotsLeft )
{
if (pObj == NULL)
{
@@ -7129,11 +7129,11 @@ BOOLEAN CreateAmmo( UINT16 usItem, OBJECTTYPE * pObj, INT16 ubShotsLeft )
pObj->usItem = usItem;
pObj->ubNumberOfObjects = 1;
//pObj->objectStack.resize(1);//not necessary due to init, here for code commenting
if (ubShotsLeft < 0) {
if (ubShotsLeft == 0) {
(*pObj)[0]->data.ubShotsLeft = Magazine[ Item[usItem].ubClassIndex ].ubMagSize;
}
else {
(*pObj)[0]->data.ubShotsLeft = (UINT8)ubShotsLeft;
(*pObj)[0]->data.ubShotsLeft = ubShotsLeft;
}
//WarmSteel - Init attachment slots.
if(UsingNewAttachmentSystem()==true)
+1 -1
View File
@@ -56,7 +56,7 @@ extern UINT16 UseKitPoints( OBJECTTYPE * pObj, UINT16 usPoints, SOLDIERTYPE *pSo
extern BOOLEAN EmptyWeaponMagazine( OBJECTTYPE * pWeapon, OBJECTTYPE *pAmmo, UINT32 subObject = 0 );
BOOLEAN CreateItem( UINT16 usItem, INT16 bStatus, OBJECTTYPE * pObj );
BOOLEAN CreateAmmo( UINT16 usItem, OBJECTTYPE * pObj, INT16 ubShotsLeft = -1);
BOOLEAN CreateAmmo( UINT16 usItem, OBJECTTYPE * pObj, UINT16 ubShotsLeft = 0);
BOOLEAN CreateItems( UINT16 usItem, INT8 bStatus, UINT8 ubNumber, OBJECTTYPE * pObj );
BOOLEAN CreateMoney( UINT32 uiMoney, OBJECTTYPE * pObj );
extern UINT16 DefaultMagazine( UINT16 usItem );