1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-12 08:04:09 +02:00

Avoids creating the player if inventory open. (#442)

Otherwise if cStart was binded to an item selection key in inventory it would reset the player.
This commit is contained in:
Ricardo Mendes
2022-08-27 02:34:02 +01:00
committed by GitHub
parent 7d94f1223a
commit 39c9be9c2d

View File

@@ -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[0] == cStart) level->addPlayer(0);
if (Input::lastState[1] == cStart) level->addPlayer(1); if (Input::lastState[1] == cStart) level->addPlayer(1);
} }