Fix: small GUI issue where the body silhouette in merc inventory turned dark after moving applicable item onto it and then out of it (by Shadooow).

Fix: GUI issue where the body silhouette wasn't lit up with some of the new consumable items such as energy drinks, etc. Also, empty canteen will no longer lit up the body silhouette anymore (by Shadooow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8994 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-05-01 16:13:40 +00:00
parent 891a17d859
commit 3784f56ce1
+10 -8
View File
@@ -2827,20 +2827,18 @@ BOOLEAN CompatibleGunForAmmo( OBJECTTYPE *pTryObject, OBJECTTYPE *pTestObject )
return( FALSE );
}
BOOLEAN CompatibleItemForApplyingOnMerc( OBJECTTYPE *pTestObject )
BOOLEAN CompatibleItemForApplyingOnMerc(OBJECTTYPE *pTestObject)
{
UINT16 usItem = pTestObject->usItem;
// ATE: If in mapscreen, return false always....
if( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN )
if (guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN)
{
return( FALSE );
return(FALSE);
}
// ATE: Would be nice to have flag here to check for these types....
if ( Item[usItem].camouflagekit || usItem == ADRENALINE_BOOSTER || usItem == REGEN_BOOSTER ||
usItem == SYRINGE_3 || usItem == SYRINGE_4 || usItem == SYRINGE_5 ||
Item[usItem].alcohol > 0.0f || Item[usItem].canteen || usItem == JAR_ELIXIR || (usItem == 1022 && gGameExternalOptions.fCamoRemoving) ) // Added rag usable on self - SANDRO
//Shadooow: rewritten to use new item flags and check canteen not empty
if (((HasItemFlag(usItem, CAMO_REMOVAL) && gGameExternalOptions.fCamoRemoving) || Item[usItem].camouflagekit || usItem == JAR_ELIXIR ||
Item[usItem].clothestype || Item[usItem].drugtype || Item[usItem].foodtype) && (!Item[usItem].canteen || (*pTestObject)[0]->data.objectStatus > 1))
{
return( TRUE );
}
@@ -2987,6 +2985,7 @@ BOOLEAN HandleCompatibleAmmoUIForMapScreen( SOLDIERTYPE *pSoldier, INT32 bInvPos
{
if ( CompatibleItemForApplyingOnMerc( gpItemPointer ) )
{
/*// Shadooow: disabled, probably a remnant of past when this didn't happen automatically when hovering/picking item
// OK, Light up portrait as well.....
if ( fOn )
{
@@ -2996,6 +2995,7 @@ BOOLEAN HandleCompatibleAmmoUIForMapScreen( SOLDIERTYPE *pSoldier, INT32 bInvPos
{
gbCompatibleApplyItem = FALSE;
}
*/
fFound = TRUE;
}
@@ -3253,6 +3253,7 @@ BOOLEAN InternalHandleCompatibleAmmoUI( SOLDIERTYPE *pSoldier, OBJECTTYPE *pTest
{
if ( CompatibleItemForApplyingOnMerc( gpItemPointer ) )
{
/*// Shadooow: disabled, probably a remnant of past when this didn't happen automatically when hovering/picking item
// OK, Light up portrait as well.....
if ( fOn )
{
@@ -3262,6 +3263,7 @@ BOOLEAN InternalHandleCompatibleAmmoUI( SOLDIERTYPE *pSoldier, OBJECTTYPE *pTest
{
gbCompatibleApplyItem = FALSE;
}
*/
fFound = TRUE;
}