Add proxy positioning API and CK-placed pool
Add a ProxyGameAPI (F4TProxyGameAPI.h/.cpp) exposing PositionRemoteActor which centralizes positioning logic, play-space resolution, MoveRefrToPosition-style moves, and 20Hz throttling bypass for forced moves. Replace ad-hoc SetPosition/SetHeading calls across the proxy controller to use the new API, ensuring correct cell/worldspace migration, logging, and move-rate throttling. Introduce support for Creation Kit placed proxy refs: detect CK-placed proxies by editor ID prefix or base form, populate a per-cell proxy pool, and prefer assigning CK-placed proxies for runtime remotes (with fallbacks). Update proxy spawn/holding logic (skip smooth frame once, handle settle states, preserve/reuse CK pool entries) and improve worldspace/cell mismatch checks to avoid incorrect movement across play spaces. Other changes: add CommonwealthOnline.esp resource file, update setup.md with the new local FormID (0x002666) for COPlayerProxy, enable animation sync gating to require loaded 3D, and small logging/message improvements.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "RE/N/NiPoint3.h"
|
||||
|
||||
namespace RE
|
||||
{
|
||||
class Actor;
|
||||
}
|
||||
|
||||
namespace F4T::ProxyGameAPI
|
||||
{
|
||||
// Move a remote proxy into the local player's loaded play space at world coordinates.
|
||||
// Uses the engine MoveRefrToPosition native (same path as Papyrus MoveTo) so parent
|
||||
// cell/worldspace follow the local player across interior/exterior transitions.
|
||||
// When true, bypass the 20 Hz MoveRefrToPosition throttle (snap/restore/holding moves).
|
||||
void PositionRemoteActor(
|
||||
RE::Actor& a_proxy,
|
||||
const RE::NiPoint3& a_pos,
|
||||
float a_headingZ,
|
||||
bool a_force = false);
|
||||
|
||||
void PositionRemoteActor(
|
||||
RE::Actor& a_proxy,
|
||||
const RE::NiPoint3& a_pos,
|
||||
const RE::NiPoint3& a_rot,
|
||||
bool a_force = false);
|
||||
}
|
||||
Reference in New Issue
Block a user