Skip to content

Commit

Permalink
Bug fix for bootstrap (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4pt0s authored Oct 24, 2024
2 parents 3719a9c + a2286d1 commit 6f8bb6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scenes/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions src/utils/resetPausingVariables.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const resetPausingVariables = (player) => {
player.state = { ...player.state, isInDialog: false };
};

0 comments on commit 6f8bb6f

Please sign in to comment.