Improve wired movement rendering and follow sync

This commit is contained in:
Lorenzune
2026-03-25 03:26:27 +01:00
parent 35e7dd9560
commit 296df767ba
8 changed files with 631 additions and 361 deletions
@@ -38,7 +38,7 @@ export class WiredUserMovementData extends ObjectRolling
export class WiredFurniMovementData extends ObjectRolling
{
constructor(id: number, location: Vector3d, targetLocation: Vector3d, private _rotation: number, private _duration: number)
constructor(id: number, location: Vector3d, targetLocation: Vector3d, private _rotation: number, private _duration: number, private _elapsed: number, private _anchorType: number, private _anchorId: number)
{
super(id, location, targetLocation, ObjectRolling.SLIDE);
}
@@ -52,6 +52,21 @@ export class WiredFurniMovementData extends ObjectRolling
{
return this._duration;
}
public get elapsed(): number
{
return this._elapsed;
}
public get anchorType(): number
{
return this._anchorType;
}
public get anchorId(): number
{
return this._anchorId;
}
}
export class WiredWallItemMovementData
@@ -163,13 +178,19 @@ export class WiredMovementsParser implements IMessageParser
const id = wrapper.readInt();
const rotation = wrapper.readInt();
const duration = wrapper.readInt();
const elapsed = wrapper.readInt();
const anchorType = wrapper.readInt();
const anchorId = wrapper.readInt();
this._furniMovements.push(new WiredFurniMovementData(
id,
new Vector3d(fromX, fromY, fromZ),
new Vector3d(toX, toY, toZ),
rotation,
duration));
duration,
elapsed,
anchorType,
anchorId));
break;
}
case 2: