From a7a4ce09efbd85ac661e1676ba118c25163af8c4 Mon Sep 17 00:00:00 2001 From: Flugente Date: Wed, 3 Apr 2013 19:42:00 +0000 Subject: [PATCH] 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 --- Tactical/Soldier Control.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index bb925b0e6..331660a34 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -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 );