fix: prevent dialogue input rebound
This commit is contained in:
@@ -214,6 +214,7 @@ export class CityStayScene extends Phaser.Scene {
|
||||
private navigationPending = false;
|
||||
private inputReadyAt = Number.POSITIVE_INFINITY;
|
||||
private autoDialogueInputReadyAt = 0;
|
||||
private interactionInputReadyAt = 0;
|
||||
private stepIndex = 0;
|
||||
private lastStepAt = 0;
|
||||
private lastNotice = '';
|
||||
@@ -367,6 +368,9 @@ export class CityStayScene extends Phaser.Scene {
|
||||
}
|
||||
|
||||
if (this.consumeInteractionRequest()) {
|
||||
if (time < this.interactionInputReadyAt) {
|
||||
return;
|
||||
}
|
||||
this.tryInteract();
|
||||
return;
|
||||
}
|
||||
@@ -677,6 +681,7 @@ export class CityStayScene extends Phaser.Scene {
|
||||
this.navigationPending = false;
|
||||
this.inputReadyAt = Number.POSITIVE_INFINITY;
|
||||
this.autoDialogueInputReadyAt = 0;
|
||||
this.interactionInputReadyAt = 0;
|
||||
this.explorationInput = undefined;
|
||||
this.stepIndex = 0;
|
||||
this.lastStepAt = 0;
|
||||
@@ -3220,6 +3225,9 @@ export class CityStayScene extends Phaser.Scene {
|
||||
this.dialogueState = undefined;
|
||||
this.dialoguePanel?.setVisible(false);
|
||||
this.stopPlayerMovement();
|
||||
this.interactionInputReadyAt =
|
||||
this.time.now + inputCarryoverGuardMs;
|
||||
this.explorationInput?.discardInteractionRequest();
|
||||
this.restoreActorDirection(sourceTargetId);
|
||||
const checkpointCommitted = onComplete?.() === true;
|
||||
if (!checkpointCommitted) {
|
||||
@@ -3233,6 +3241,9 @@ export class CityStayScene extends Phaser.Scene {
|
||||
this.dialogueState = undefined;
|
||||
this.dialoguePanel?.setVisible(false);
|
||||
this.stopPlayerMovement();
|
||||
this.interactionInputReadyAt =
|
||||
this.time.now + inputCarryoverGuardMs;
|
||||
this.explorationInput?.discardInteractionRequest();
|
||||
this.restoreActorDirection(sourceTargetId);
|
||||
this.persistExplorationCheckpoint(true);
|
||||
this.refreshInteractionPrompt();
|
||||
|
||||
Reference in New Issue
Block a user