#pragma once #include "F4TRemotePlayerState.h" #include #include #include namespace RE { class Actor; } namespace F4T::ProxyAnimationSync { // Confirmed via local read-by-name graph debug (Fallout4Together.log): // - float "Speed" reads/writes while in-game (walk ~47-105) // - bool "IsSprinting" reads while in-game // - bIsMoving, bIsSneaking, bSprint, bInJumpState, bWeaponDrawn, Direction: unavailable by name namespace GraphVar { inline constexpr const char* kSpeed = "Speed"; inline constexpr const char* kSpeedLower = "speed"; inline constexpr const char* kIsSprinting = "IsSprinting"; } struct ProxyAppliedAnimationState { bool hasAppliedGraphState{ false }; bool lastIsMoving{ false }; bool lastIsSprinting{ false }; bool lastIsSneaking{ false }; bool lastIsJumping{ false }; bool lastWeaponDrawn{ false }; float lastGraphSpeed{ 0.0F }; float lastDirection{ 0.0F }; }; void ResetAppliedAnimationState(ProxyAppliedAnimationState& a_state); void ApplyProxyAnimationFromRemoteState( ProxyAppliedAnimationState& a_state, RE::Actor& a_proxy, const RemotePlayerState::RemotePlayerState& a_remotePlayer); void ClearProxyAnimationState( ProxyAppliedAnimationState& a_state, RE::Actor& a_proxy, std::uint32_t a_remotePlayerId, std::string_view a_reason); }