Skip to content

Commit

Permalink
Handle munition only if inventory is open
Browse files Browse the repository at this point in the history
  • Loading branch information
bogu9821 committed Jan 1, 2024
1 parent 55c1b01 commit bd4924f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zUtilities/Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ namespace GOTHIC_ENGINE {
if ( !Options::ActivateUsedMunition )
return;

if (!player->inventory2.IsOpen())
return;

if (lastActiveMunition) {
if (player->inventory2.IsIn(lastActiveMunition, 1) == nullptr
&& player->GetLeftHand() != lastActiveMunition
Expand All @@ -48,9 +51,6 @@ namespace GOTHIC_ENGINE {
return;
}

if ( !player->inventory2.IsOpen() )
return;

oCItem* weapon = player->GetEquippedRangedWeapon();

if ( !weapon ) weapon = player->GetWeapon();
Expand Down

0 comments on commit bd4924f

Please sign in to comment.