Problem: Clients received WorldSeed packet before ServerSettings,
causing world generation with wrong mapSize/mapBias/mapRivers
parameters. Same seed but different parameters = different maps.
Solution: Include all map parameters directly in WorldSeed packet:
- WorldSize (map size)
- WorldType (map bias - continents/islands/etc)
- WorldRivers (river/lake density)
Now packet order doesn't matter - WorldSeed has everything needed
for identical world generation across all clients.
Changes:
- WorldSeed.cs: Add map parameters, set before Generate()
- ClientConnected.cs: Send full world params to joining clients
- ServerLobbyScript.cs: Send full params on new world generation
- Added [WORLD SYNC] debug logging
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove MainMenuMode.StartGame() reflection call that expected
"Choose Your Map" screen state. Clients never see this screen
in multiplayer, causing null references. Now transitions directly
to playing mode like save loading does.
Fixes: NullReferenceException at MainMenuMode.StartGame()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed issues:
1. Server now stops when host returns to menu (Main.cs:342-356)
- Notifies clients with "Host disconnected" modal
- Prevents server from running in background
2. PlayerAddBuildingHook NullReferenceException (Main.cs:762-806)
- Added comprehensive null checks for reflection fields
- Added array bounds validation for landMass index
- Added registry initialization checks
- Fixes 98% building placement failure rate
3. IndexOutOfRangeException in WorldPlace (WorldPlace.cs:167-183)
- LandMassNames array auto-expands when needed
- Defensive code prevents index out of bounds errors
Updated README.md:
- Removed fixed issues from bug tracker
- Added "Fixed Issues" section documenting changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add LogSync() helper method in Main.cs for consistent sync logging
- Log all packet send/receive events in PacketHandler and Packet classes
- Add detailed building placement logging in WorldPlace.cs (all properties, final state)
- Add building state update logging in BuildingStatePacket.cs
- Add building state send logging in BuildingStateManager.cs
All sync logs are prefixed with [SYNC] for easy filtering.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add UpdateMaterialSelection() and UpdateRotation() calls after building
placement to fix visual issues when host views client's buildings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename lambda variable 'v' to 'w' to avoid conflict with local 'v'
- Rename local Villager 'v' to 'newVillager' for clarity
- Add missing 'using Assets.Interface' for IResourceStorage
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add position property to AddVillagerPacket
- Teleport villager to correct position on client
- Add duplicate guid check to prevent double villager creation
- Send position from Main.cs hook
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Check if building with same guid already exists before placing
- Prevents buildings overlapping from network packet retries
- Logs skip when duplicate detected
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>