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>
47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace KCM.Enums
|
|
{
|
|
public enum Packets
|
|
{
|
|
ClientConnected = 25,
|
|
PlayerList = 26,
|
|
ChatSystemMessage = 27,
|
|
ChatMessage = 28,
|
|
ServerSettings = 29,
|
|
PlayerReady = 30,
|
|
PlayerBanner = 31,
|
|
KingdomName = 32,
|
|
StartGame = 33,
|
|
WorldSeed = 34,
|
|
Building = 50,
|
|
BuildingOnPlacement = 51,
|
|
World = 70,
|
|
WorldPlace = 71,
|
|
FellTree = 72,
|
|
ShakeTree = 73,
|
|
GrowTree = 74,
|
|
UpdateConstruction = 75,
|
|
SetSpeed = 76,
|
|
CompleteBuild = 77,
|
|
WorldPlaceBatch = 78,
|
|
ChangeWeather = 79,
|
|
ShowModal = 80,
|
|
ServerHandshake = 81,
|
|
SpawnSiegeDragon = 82,
|
|
SpawnMamaDragon = 83,
|
|
SpawnBabyDragon = 84,
|
|
SaveTransferPacket = 85,
|
|
UpdateState = 86,
|
|
BuildingStatePacket = 87,
|
|
AddVillager = 88,
|
|
SetupInitialWorkers = 89,
|
|
VillagerTeleportTo = 90,
|
|
PlaceKeepRandomly = 91
|
|
}
|
|
}
|