Add optional apparel sync (equippedItems)
Introduce an optional equippedItems transform extension to snapshot tracked visible apparel slots. Plugin: capture local equipped ARMO form IDs on the game-thread, include equippedItems in transform packets, parse equippedItems on the networking thread, and apply/clear synced apparel on runtime proxies (with defensive logging for missing forms). Server: fake_client parses and prints equippedItems. Docs and protocol updated; changelog and dev-log entry added. Backwards-compatible: equippedItems is optional and empty formId denotes intentional unequip.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "F4TRemotePlayerState.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <span>
|
||||
#include <string>
|
||||
|
||||
namespace F4T::Networking
|
||||
@@ -28,7 +31,8 @@ namespace F4T::Networking
|
||||
bool a_isCrouching = false,
|
||||
bool a_weaponDrawn = false,
|
||||
float a_movementSpeed = 0.0F,
|
||||
float a_animationGraphSpeed = -1.0F);
|
||||
float a_animationGraphSpeed = -1.0F,
|
||||
std::span<const F4T::RemotePlayerState::RemoteEquippedItem> a_equippedItems = {});
|
||||
bool SendWorldStatePacket(
|
||||
float a_gameHour,
|
||||
float a_gameDaysPassed,
|
||||
|
||||
@@ -22,6 +22,12 @@ namespace F4T::RemotePlayerState
|
||||
std::chrono::steady_clock::time_point captureTime{};
|
||||
};
|
||||
|
||||
struct RemoteEquippedItem
|
||||
{
|
||||
std::string slot;
|
||||
std::uint32_t formId{};
|
||||
};
|
||||
|
||||
struct RemotePlayerState
|
||||
{
|
||||
std::uint32_t playerId{};
|
||||
@@ -42,6 +48,8 @@ namespace F4T::RemotePlayerState
|
||||
bool weaponDrawn{ false };
|
||||
float movementSpeed{ 0.0F };
|
||||
float animationGraphSpeed{ -1.0F };
|
||||
bool hasEquipmentUpdate{ false };
|
||||
std::vector<RemoteEquippedItem> equippedItems;
|
||||
std::chrono::steady_clock::time_point lastReceivedLocalTime{};
|
||||
|
||||
// Phase 2: Actor state and action events (TiltedEvolution alignment)
|
||||
|
||||
Reference in New Issue
Block a user