From c577894d3f289c89001d768a86723bb1fc137f19 Mon Sep 17 00:00:00 2001 From: Sevenfm Date: Tue, 19 Oct 2021 08:25:27 +0000 Subject: [PATCH] Allow scuba bottle to work from backpack slot for mod compatibility. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9191 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Soldier Control.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index e6dfcdcf0..b571ae881 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -16829,7 +16829,8 @@ BOOLEAN SOLDIERTYPE::UsesScubaGear( ) if ( !(this->inv[HEAD1POS].exists( ) && HasItemFlag( this->inv[HEAD1POS].usItem, SCUBA_MASK )) && !(this->inv[HEAD2POS].exists( ) && HasItemFlag( this->inv[HEAD2POS].usItem, SCUBA_MASK )) ) return FALSE; - if ( !this->inv[CPACKPOCKPOS].exists( ) || !HasItemFlag( this->inv[CPACKPOCKPOS].usItem, SCUBA_BOTTLE ) ) + if (!(this->inv[CPACKPOCKPOS].exists() && HasItemFlag(this->inv[CPACKPOCKPOS].usItem, SCUBA_BOTTLE)) && + !(this->inv[BPACKPOCKPOS].exists() && HasItemFlag(this->inv[BPACKPOCKPOS].usItem, SCUBA_BOTTLE))) return FALSE; return TRUE;