import { Direction, PredictionHistoryEntry, RpgMovementInput } from '@rpgjs/common'; export interface MovementTrajectoryPoint { frame: number; tick: number; timestamp: number; input: RpgMovementInput; x: number; y: number; direction?: Direction; } export interface MovePacket { input: RpgMovementInput; timestamp: number; frame: number; tick: number; trajectory: MovementTrajectoryPoint[]; } /** * Build the predicted trajectory sent with a move packet, from the pending * inputs that already have a predicted position. Only the most recent points * are kept. */ export declare function buildMoveTrajectory(pendingInputs: PredictionHistoryEntry[]): MovementTrajectoryPoint[]; /** * Sends `move` packets with the predicted trajectory, and throttles resends * that would not carry a newer frame. */ export declare class MovePathSender { private readonly emit; private lastSentAt; private lastSentFrame; constructor(emit: (packet: MovePacket) => void); /** Whether a periodic resend should wait at `now`. */ isThrottled(now: number): boolean; /** Reset resend tracking, e.g. after a map transfer or a movement interruption. */ reset(options?: { frame?: number; sentAt?: number; }): void; send(options: { input: RpgMovementInput; frame: number; tick: number; timestamp: number; pendingInputs: PredictionHistoryEntry[]; force?: boolean; }): void; }