fix getting stuck after flexible moving and logging out

This commit is contained in:
ForestOfLight
2026-02-11 15:03:55 -08:00
Unverified
parent 162ef58406
commit d61a121307
@@ -52,6 +52,8 @@ export class FlexibleInstanceMove {
}
onFlexibleMovementTick() {
if (!this.player?.isValid)
this.finish();
const playerMovement = new PlayerMovement(this.player);
const instanceVelocity = this.calculateInstanceMovement(playerMovement);
this.move(instanceVelocity);
@@ -105,7 +107,8 @@ export class FlexibleInstanceMove {
this.instance.enable();
this.instance.flexMovingPlayerId = void 0;
this.allowPlayerMovement(true);
const builder = Builders.get(this.player.id);
const builder = Builders.get(this.player?.id);
if (builder)
builder.flexibleInstanceMovement = void 0;
world.beforeEvents.itemUse.unsubscribe(this.onPlayerUseItemBound);
world.beforeEvents.playerLeave.unsubscribe(this.onPlayerLeaveBound);