Fixed function PickPocket to work with MOLLE type of LBEs (by Shadooow).

Changed code that handles putting medical kit from merc inventory into his main hand to respect pockets restrictions to avoid putting gun into medkit only pocket etc.. Writes an error in case that medical kit cannot be put into hands due to no suitable place for currently held items (by Shadooow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9015 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-05-11 04:40:54 +00:00
parent cf7588cacd
commit fc3869bcd6
4 changed files with 65 additions and 22 deletions
+2 -2
View File
@@ -19418,7 +19418,7 @@ BOOLEAN SOLDIERTYPE::AIDoctorFriend( )
if ( pSoldier->iHealableInjury > 0 )
{
// move medkit into hand - if we don't have a medkit in our hands, abort
if ( !MakeSureMedKitIsInHand( this ) )
if (!MakeSureMedKitIsInHand(this, true))
return FALSE;
if ( gAnimControl[this->usAnimState].ubEndHeight == ANIM_CROUCH )
@@ -19470,7 +19470,7 @@ BOOLEAN SOLDIERTYPE::AIDoctorSelf( )
if ( this->iHealableInjury > 0 )
{
// move medkit into hand - if we don't have a medkit in our hands, abort
if ( !MakeSureMedKitIsInHand( this ) )
if (!MakeSureMedKitIsInHand(this, true))
return FALSE;
if ( gAnimControl[this->usAnimState].ubEndHeight == ANIM_CROUCH )