mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- The 'Improve gear' function in the [Ctrl] + [.] menu improves the gear of all present mercs by replacing their items with sector items with higher status
- Fix: AP costs for item consumption were not substracted git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7966 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -22880,6 +22880,8 @@ BOOLEAN ApplyConsumable( SOLDIERTYPE* pSoldier, OBJECTTYPE *pObj, BOOLEAN fForce
|
||||
UINT16 statusused = min( portionsize, (*pObj)[0]->data.objectStatus );
|
||||
if ( !statusused )
|
||||
return FALSE;
|
||||
|
||||
INT16 apcost = 0;
|
||||
|
||||
// if we check for APs, do so - if we don't have enough, stop
|
||||
if ( fUseAPs )
|
||||
@@ -22887,7 +22889,6 @@ BOOLEAN ApplyConsumable( SOLDIERTYPE* pSoldier, OBJECTTYPE *pObj, BOOLEAN fForce
|
||||
// an object can be consumed in several ways (like food that is also a drug), but each consumption might have a different AP cost.
|
||||
// as it would be very odd if an effect does not happen because the corresponding AP cost could not be met, we analyze the item first and determine the AP cost.
|
||||
// We then either apply everything or nothing
|
||||
UINT16 apcost = 0;
|
||||
|
||||
if ( HasItemFlag( pObj->usItem, CAMO_REMOVAL ) && gGameExternalOptions.fCamoRemoving )
|
||||
{
|
||||
@@ -23015,6 +23016,8 @@ BOOLEAN ApplyConsumable( SOLDIERTYPE* pSoldier, OBJECTTYPE *pObj, BOOLEAN fForce
|
||||
|
||||
if ( fUseAPs )
|
||||
{
|
||||
DeductPoints( pSoldier, (INT16)apcost, 0, false );
|
||||
|
||||
// Dirty
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user