mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Changed camo display - now only the highest value is displayed in the camo box instead of a sum of all different types of camo. This also fixes the problem that a laser could drown our camo value because of different types of penalties.
Also camo can no longer take a negative value. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7789 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -9393,7 +9393,7 @@ void BltCharInvPanel()
|
||||
ApplyEquipmentBonuses(pSoldier);
|
||||
|
||||
// Display camo value
|
||||
swprintf( sString, L"%3d", max(0, min ((pSoldier->bCamo + pSoldier->wornCamo + pSoldier->urbanCamo+pSoldier->wornUrbanCamo+pSoldier->desertCamo+pSoldier->wornDesertCamo+pSoldier->snowCamo+pSoldier->wornSnowCamo ),100 )) );
|
||||
swprintf( sString, L"%3d", max(0, min(max((pSoldier->bCamo + pSoldier->wornCamo), max((pSoldier->urbanCamo+pSoldier->wornUrbanCamo), max((pSoldier->desertCamo+pSoldier->wornDesertCamo), (pSoldier->snowCamo+pSoldier->wornSnowCamo)))),100)) );
|
||||
FindFontRightCoordinates(MAP_CAMMO_X, MAP_CAMMO_Y, MAP_PERCENT_WIDTH, MAP_PERCENT_HEIGHT, sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY, sString );
|
||||
}
|
||||
|
||||
@@ -2850,7 +2850,7 @@ void RenderSMPanel( BOOLEAN *pfDirty )
|
||||
ApplyEquipmentBonuses(gpSMCurrentMerc);
|
||||
|
||||
// Display cammo value!
|
||||
swprintf( sString, L"%3d", max(0, min( (gpSMCurrentMerc->bCamo + gpSMCurrentMerc->wornCamo+gpSMCurrentMerc->urbanCamo+gpSMCurrentMerc->wornUrbanCamo+gpSMCurrentMerc->desertCamo+gpSMCurrentMerc->wornDesertCamo+gpSMCurrentMerc->snowCamo+gpSMCurrentMerc->wornSnowCamo),100 )) );
|
||||
swprintf( sString, L"%3d", max(0, min(max((gpSMCurrentMerc->bCamo + gpSMCurrentMerc->wornCamo), max((gpSMCurrentMerc->urbanCamo+gpSMCurrentMerc->wornUrbanCamo), max((gpSMCurrentMerc->desertCamo+gpSMCurrentMerc->wornDesertCamo), (gpSMCurrentMerc->snowCamo+gpSMCurrentMerc->wornSnowCamo)))),100)) );
|
||||
FindFontRightCoordinates(SM_CAMMO_X, SM_CAMMO_Y ,SM_PERCENT_WIDTH ,SM_PERCENT_HEIGHT ,sString, BLOCKFONT2, &usX, &usY);
|
||||
mprintf( usX, usY , sString );
|
||||
|
||||
|
||||
+4
-4
@@ -12511,7 +12511,7 @@ INT16 GetWornCamo( SOLDIERTYPE * pSoldier )
|
||||
ttl += GetCamoBonus(&pSoldier->inv[GUNSLINGPOCKPOS]);
|
||||
}
|
||||
|
||||
return __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) );
|
||||
return __max(0, __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) ) );
|
||||
}
|
||||
INT16 GetWornUrbanCamo( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
@@ -12560,7 +12560,7 @@ INT16 GetWornUrbanCamo( SOLDIERTYPE * pSoldier )
|
||||
ttl += GetUrbanCamoBonus(&pSoldier->inv[GUNSLINGPOCKPOS]);
|
||||
}
|
||||
|
||||
return __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) );
|
||||
return __max(0, __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) ) );
|
||||
}
|
||||
INT16 GetWornDesertCamo( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
@@ -12608,7 +12608,7 @@ INT16 GetWornDesertCamo( SOLDIERTYPE * pSoldier )
|
||||
if (pSoldier->inv[GUNSLINGPOCKPOS].exists() == true && Item[pSoldier->inv[GUNSLINGPOCKPOS].usItem].usItemClass & IC_WEAPON)
|
||||
ttl += GetDesertCamoBonus(&pSoldier->inv[GUNSLINGPOCKPOS]);
|
||||
}
|
||||
return __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) );
|
||||
return __max(0, __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) ) );
|
||||
}
|
||||
INT16 GetWornSnowCamo( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
@@ -12656,7 +12656,7 @@ INT16 GetWornSnowCamo( SOLDIERTYPE * pSoldier )
|
||||
if (pSoldier->inv[GUNSLINGPOCKPOS].exists() == true && Item[pSoldier->inv[GUNSLINGPOCKPOS].usItem].usItemClass & IC_WEAPON)
|
||||
ttl += GetSnowCamoBonus(&pSoldier->inv[GUNSLINGPOCKPOS]);
|
||||
}
|
||||
return __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) );
|
||||
return __max(0, __min( ttl, ( 100 - gGameExternalOptions.bCamoKitArea ) ) );
|
||||
}
|
||||
|
||||
void ApplyEquipmentBonuses(SOLDIERTYPE * pSoldier)
|
||||
|
||||
Reference in New Issue
Block a user