feat: initialize proxy pool on first remote player update

Calls InitializeProxyPool() when first remote player is processed.
This discovers all pre-placed proxies in the current cell and logs:
- Number of proxies found
- Max concurrent players supported
- Warning if no proxies found

The proxy pool is now ready for use when assigning proxies to
remote players. Since we only use pre-placed proxies with proper
AI, animations should now work smoothly.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 15:10:57 +12:00
co-authored by Cursor
parent 3edce921c0
commit 7b3a2b51bb
2 changed files with 46 additions and 13 deletions
+8 -2
View File
@@ -5074,8 +5074,14 @@ namespace F4T::ProxyActorController
g_stage4StartedLogged = true;
}
const auto remotePlayers = GetSortedRemotePlayerSnapshot();
MarkReusableSlots(*parentCell, *player);
const auto remotePlayers = GetSortedRemotePlayerSnapshot();
// CRITICAL: Initialize proxy pool on first run (discover pre-placed proxies)
if (!g_proxyPoolInitialized) {
InitializeProxyPool(*parentCell, *player);
}
MarkReusableSlots(*parentCell, *player);
std::unordered_set<std::uint32_t> seenRemotePlayerIds;
seenRemotePlayerIds.reserve(remotePlayers.size());
std::optional<RemotePlayer> fallbackCandidate;