Fix: Add periodic villager position sync from server
- Server syncs villager positions every ~3 seconds to clients - Only syncs villagers that moved more than 0.5 units (bandwidth optimization) - Maintains position cache to detect movement - Clears cache on lobby leave to prevent stale data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -160,6 +160,7 @@ namespace Riptide.Demos.Steam.PlayerHosted
|
||||
Main.helper.Log("clear players");
|
||||
Main.kCPlayers.Clear();
|
||||
Main.clientSteamIds.Clear(); // Clear client-to-steam ID mapping
|
||||
Main.ClearVillagerPositionCache(); // Clear villager sync cache
|
||||
LobbyHandler.ClearPlayerList();
|
||||
LobbyHandler.ClearChatEntries();
|
||||
Main.helper.Log("end clear players");
|
||||
|
||||
Reference in New Issue
Block a user