Fix: applying canteens on other persons did not work when food system was on

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5979 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-04-03 19:42:00 +00:00
parent d2ebeb8f03
commit a7a4ce09ef
+11 -4
View File
@@ -17008,12 +17008,19 @@ void SOLDIERTYPE::EVENT_SoldierApplyItemToPerson( INT32 sGridNo, UINT8 ubDirecti
if ( success )
{
if ( !gGameOptions.fFoodSystem && Item[ usItem ].canteen )
if ( Item[ usItem ].canteen )
{
BOOLEAN tmp = FALSE;
success = ApplyCanteen( pSoldier, pObj, &tmp, FALSE );
if ( !gGameOptions.fFoodSystem )
{
BOOLEAN tmp = FALSE;
success = ApplyCanteen( pSoldier, pObj, &tmp, FALSE );
}
else
{
success = ApplyFood( pSoldier, pObj, TRUE, TRUE );
}
}
else if ( Item[ usItem ].drugtype || Item[ usItem ].canteen )
else if ( Item[ usItem ].drugtype )
{
// applying drugs also handles food items
success = ApplyDrugs( pSoldier, pObj );