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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user