- added new item flag for camo-removing items, to remove hard-coded value (CAMO_REMOVAL, #1024)

- fixed a bug that caused incorrect deduction of kit points

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5467 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2012-08-13 20:53:50 +00:00
parent ef981b5342
commit 660d8d126f
3 changed files with 7 additions and 13 deletions
+2 -8
View File
@@ -192,7 +192,7 @@ BOOLEAN ApplyFood( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObject, BOOLEAN fForce )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s ate %s", pSoldier->name, Item[pObject->usItem].szItemName );
else
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"%s drank %s", pSoldier->name, Item[pObject->usItem].szItemName );
// now remove a portion of the food item (or the whole item altogether)
UINT16 ptsconsumed = UseKitPoints( pObject, Food[foodtype].ubPortionSize, pSoldier );
@@ -200,13 +200,7 @@ BOOLEAN ApplyFood( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObject, BOOLEAN fForce )
// if the food is more of a drink, we also restore breath points
if ( Food[foodtype].bDrinkPoints > Food[foodtype].bFoodPoints )
{
//UINT16 ptsconsumed = Food[foodtype].ubPortionSize - ptsleft;
INT16 usTotalKitPoints = TotalPoints( pObject );
INT16 sPointsToUse = __min( ptsconsumed, usTotalKitPoints );
sBPAdjustment = 2 * sPointsToUse * -(100 - pSoldier->bBreath);
sBPAdjustment = 2 * ptsconsumed * -(100 - pSoldier->bBreath);
}
DeductPoints( pSoldier, APBPConstants[type], sBPAdjustment );