Skip to content

Commit

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

if (lastActiveMunition) {
if (player->inventory2.IsIn(lastActiveMunition, 1) == nullptr
&& player->GetLeftHand() != lastActiveMunition
&& player->GetRightHand() != lastActiveMunition) {
lastActiveMunition = nullptr;
}
}

if ( playerStatus.traderNpc ) {
HandleMunition( nullptr );
return;
Expand Down

0 comments on commit 55c1b01

Please sign in to comment.