#pragma once #include #include #include #include #include namespace F4T::RemotePlayerState { // Represents a remote action event captured from another player // Used for action replay on proxy actors (combat idles, equipping, etc.) struct RemoteActionEvent { std::uint32_t type{}; // Action type (see ActorMediator::ActorAction enum) std::string eventName; // Action event name (e.g., "ActorMovementStart") std::vector animationVariablesFloat; // Float variables snapshot (Speed, Direction, etc.) std::vector animationVariablesBool; // Bool variables snapshot (IsSprinting, IsSneaking, etc.) std::vector animationVariablesInt; // Int variables snapshot (weapon types, etc.) std::uint32_t actorStateFlags1{}; // ActorState.flags1 at action time std::uint32_t actorStateFlags2{}; // ActorState.flags2 at action time std::chrono::steady_clock::time_point captureTime{}; }; struct RemotePlayerState { std::uint32_t playerId{}; float x{}; float y{}; float z{}; float angleZ{}; std::string movementType; std::string cellId; std::string worldspaceId; std::optional clientTime; std::optional serverTime; bool isMoving{ false }; bool isSprinting{ false }; bool isSneaking{ false }; bool isJumping{ false }; bool isCrouching{ false }; bool weaponDrawn{ false }; float movementSpeed{ 0.0F }; float animationGraphSpeed{ -1.0F }; std::chrono::steady_clock::time_point lastReceivedLocalTime{}; // Phase 2: Actor state and action events (TiltedEvolution alignment) std::uint32_t actorStateFlags1{}; std::uint32_t actorStateFlags2{}; std::vector actionEvents; }; void SetAssignedPlayerId(std::uint32_t a_playerId); std::optional GetAssignedPlayerId(); bool IsAssignedPlayerId(std::uint32_t a_playerId); void ClearAssignedPlayerId(); void UpdateRemotePlayer(RemotePlayerState a_state); bool RemoveRemotePlayer(std::uint32_t a_playerId); void ClearRemotePlayers(); std::vector GetRemotePlayerSnapshot(); }