mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
- 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:
+2
-8
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user