Skip to content

Commit

Permalink
Avoids creating the player if inventory open. (#442)
Browse files Browse the repository at this point in the history
Otherwise if cStart was binded to an item selection key in inventory it would reset the player.
  • Loading branch information
muddymind authored Aug 27, 2022
1 parent 7d94f12 commit 39c9be9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ namespace Game {
}
}

if (!level->level.isTitle()) {
// Only check for cStart if the inventory is not active.
// Otherwise if cStart was binded to item selection key in inventory it would reset the player.
if (!level->level.isTitle() && !inventory->isActive()) {
if (Input::lastState[0] == cStart) level->addPlayer(0);
if (Input::lastState[1] == cStart) level->addPlayer(1);
}
Expand Down

0 comments on commit 39c9be9

Please sign in to comment.