- fixed bug with CAMO_REMOVING = TRUE

Too much of a camo kit was used when the character was wearing an outfit with different camo bonus.

- fixed bug with DYNAMIC_IMP_PROFILE_COST = TRUE
The game was always one step behind in cost display but charged the correct price. Now charged price and display match.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6565 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-11-07 19:11:35 +00:00
parent d054395b59
commit 6c9d6cec68
2 changed files with 22 additions and 5 deletions
+8
View File
@@ -9194,6 +9194,8 @@ BOOLEAN ApplyCammo( SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, BOOLEAN *pfGoodAP
{
pSoldier->bCamo = __min( 100, pSoldier->bCamo + iJungleCamoAdded );
}
// update with amount that we really used
bPointsToUse = __min( bPointsToUse, (iJungleCamoAdded + 1) / 2 );
}
// Second, check if we have an item with major URBAN camobonus
else if ( (Item[pObj->usItem].urbanCamobonus > Item[pObj->usItem].camobonus) &&
@@ -9234,6 +9236,8 @@ BOOLEAN ApplyCammo( SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, BOOLEAN *pfGoodAP
{
pSoldier->urbanCamo = __min( 100, pSoldier->urbanCamo + iUrbanCamoAdded );
}
// update with amount that we really used
bPointsToUse = __min( bPointsToUse, (iUrbanCamoAdded + 1) / 2 );
}
// Third, check if we have an item with major DESERT camobonus
else if ( (Item[pObj->usItem].desertCamobonus > Item[pObj->usItem].camobonus) &&
@@ -9274,6 +9278,8 @@ BOOLEAN ApplyCammo( SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, BOOLEAN *pfGoodAP
{
pSoldier->desertCamo = __min( 100, pSoldier->desertCamo + iDesertCamoAdded );
}
// update with amount that we really used
bPointsToUse = __min( bPointsToUse, (iDesertCamoAdded + 1) / 2 );
}
// Fourth, check if we have an item with major SNOW camobonus
else if ( (Item[pObj->usItem].snowCamobonus > Item[pObj->usItem].camobonus) &&
@@ -9314,6 +9320,8 @@ BOOLEAN ApplyCammo( SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, BOOLEAN *pfGoodAP
{
pSoldier->snowCamo = __min( 100, pSoldier->snowCamo + iSnowCamoAdded );
}
// update with amount that we really used
bPointsToUse = __min( bPointsToUse, (iSnowCamoAdded + 1) / 2 );
}
else // the item has no major camo, return
return( FALSE );