Fix issue of interrupted conversation in follow-mode

This commit is contained in:
danb 2021-11-18 12:23:10 +01:00 committed by PizZaKatZe
parent 7c7144527c
commit 372dda792f

View file

@ -100,6 +100,8 @@ export class Player extends Character {
} }
private followStep(activeEvents: ActiveEventList, delta: number) { private followStep(activeEvents: ActiveEventList, delta: number) {
let moving = false;
if (this.follow === null) { if (this.follow === null) {
return; return;
} }
@ -137,10 +139,12 @@ export class Player extends Character {
this.follow.direction = PlayerAnimationDirections.Down; this.follow.direction = PlayerAnimationDirections.Down;
} }
} }
moving = true;
} }
this.emit(hasMovedEventName, { this.emit(hasMovedEventName, {
moving: true, moving: moving,
direction: this.follow.direction, direction: this.follow.direction,
x: this.x, x: this.x,
y: this.y, y: this.y,
@ -148,8 +152,8 @@ export class Player extends Character {
this.previousDirection = this.follow.direction; this.previousDirection = this.follow.direction;
this.wasMoving = true; this.wasMoving = moving;
userMovingStore.set(true); userMovingStore.set(moving);
} }
moveUser(delta: number): void { moveUser(delta: number): void {