mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Bug 540: Fixed issue where CTRL + SHIFT + A was creating full ammo crates without consolidating any ammo.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4553 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+6
-6
@@ -7129,12 +7129,12 @@ BOOLEAN CreateAmmo( UINT16 usItem, OBJECTTYPE * pObj, UINT16 ubShotsLeft )
|
|||||||
pObj->usItem = usItem;
|
pObj->usItem = usItem;
|
||||||
pObj->ubNumberOfObjects = 1;
|
pObj->ubNumberOfObjects = 1;
|
||||||
//pObj->objectStack.resize(1);//not necessary due to init, here for code commenting
|
//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;
|
// (*pObj)[0]->data.ubShotsLeft = Magazine[ Item[usItem].ubClassIndex ].ubMagSize;
|
||||||
}
|
//}
|
||||||
else {
|
//else {
|
||||||
(*pObj)[0]->data.ubShotsLeft = ubShotsLeft;
|
(*pObj)[0]->data.ubShotsLeft = ubShotsLeft;
|
||||||
}
|
//}
|
||||||
//WarmSteel - Init attachment slots.
|
//WarmSteel - Init attachment slots.
|
||||||
if(UsingNewAttachmentSystem()==true)
|
if(UsingNewAttachmentSystem()==true)
|
||||||
InitItemAttachments(pObj);
|
InitItemAttachments(pObj);
|
||||||
@@ -7162,7 +7162,7 @@ BOOLEAN CreateItem( UINT16 usItem, INT16 bStatus, OBJECTTYPE * pObj )
|
|||||||
}
|
}
|
||||||
else if (Item[ usItem ].usItemClass == IC_AMMO)
|
else if (Item[ usItem ].usItemClass == IC_AMMO)
|
||||||
{
|
{
|
||||||
fRet = CreateAmmo( usItem, pObj );
|
fRet = CreateAmmo( usItem, pObj, Magazine[Item[usItem].ubClassIndex].ubMagSize );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user