don't allow inventory while scripts are running

This commit is contained in:
dawnDus 2022-01-15 16:13:21 -05:00
parent e57bf29703
commit cd049fd378
No known key found for this signature in database
GPG Key ID: 972AABDE81848F21
1 changed files with 3 additions and 1 deletions

View File

@ -1351,7 +1351,9 @@ impl GameScene {
self.hud_player2.tick(state, (&self.player2, &mut self.inventory_player2))?;
self.boss_life_bar.tick(state, (&self.npc_list, &self.boss))?;
if self.player1.controller.trigger_inventory() {
if self.player1.controller.trigger_inventory()
&& state.textscript_vm.state == TextScriptExecutionState::Ended
{
state.textscript_vm.set_mode(ScriptMode::Inventory);
self.player1.cond.set_interacted(false);
}