chore: checkpoint current work

This commit is contained in:
Lorenzune
2026-04-03 05:22:24 +02:00
parent 190f02ebbe
commit c75f1b1258
5 changed files with 40 additions and 2 deletions
+15 -1
View File
@@ -607,6 +607,19 @@ export class RoomMessageHandler
return true;
}
private getReleasedWiredStatusLocation(status: RoomUnitStatusMessage): IVector3D
{
const activeMovement = this._activeWiredUserMovements.get(status.id);
if(!activeMovement) return null;
if(activeMovement.expiresAt <= Date.now()) return null;
if(!this.shouldReleaseWiredStatusLocation(status, activeMovement)) return null;
return new Vector3d(activeMovement.targetX, activeMovement.targetY, activeMovement.targetZ);
}
private shouldReleaseWiredStatusLocation(status: RoomUnitStatusMessage, activeMovement: { expiresAt: number, targetX: number, targetY: number, targetZ: number }): boolean
{
if(!status.didMove)
@@ -967,7 +980,8 @@ export class RoomMessageHandler
if(height) height = (height / zScale);
const location = new Vector3d(status.x, status.y, (status.z + height));
const releasedWiredLocation = this.getReleasedWiredStatusLocation(status);
const location = (releasedWiredLocation || new Vector3d(status.x, status.y, (status.z + height)));
const direction = new Vector3d(status.direction);
let goal: IVector3D = null;