From a2286d1e674360a3cbadd36f72829bc247e4c821 Mon Sep 17 00:00:00 2001 From: Jacob Wilson Date: Wed, 23 Oct 2024 16:16:40 -0500 Subject: [PATCH] Bug fix for bootstrap --- src/scenes/bootstrap.js | 2 ++ src/utils/resetPausingVariables.js | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 src/utils/resetPausingVariables.js diff --git a/src/scenes/bootstrap.js b/src/scenes/bootstrap.js index ffb85d94..ffcca8fd 100644 --- a/src/scenes/bootstrap.js +++ b/src/scenes/bootstrap.js @@ -5,6 +5,7 @@ import { makePlayer } from '../factories/player.factory'; import { k } from '../kplayCtx'; import { getGameState } from '../utils/gameState'; import { addPlayerControls } from './../player.controls'; +import { resetPausingVariables } from '../utils/resetPausingVariables'; export async function bootstrap(bootMapCb, mapArgs) { const gameState = getGameState(); @@ -21,6 +22,7 @@ export async function bootstrap(bootMapCb, mapArgs) { (mapArgs?.enter_tag && spawnpoint[mapArgs?.enter_tag]) || spawnpoint.player; } + resetPausingVariables(player); k.add(map); k.add(player); diff --git a/src/utils/resetPausingVariables.js b/src/utils/resetPausingVariables.js new file mode 100644 index 00000000..a48af114 --- /dev/null +++ b/src/utils/resetPausingVariables.js @@ -0,0 +1,3 @@ +export const resetPausingVariables = (player) => { + player.state = { ...player.state, isInDialog: false }; +};