mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user