fix: Improve job type initialization and handle game state during loading

This commit is contained in:
2025-12-14 23:45:12 +01:00
parent 0d7d989f76
commit 8f13282e04
2 changed files with 15 additions and 4 deletions

View File

@@ -57,7 +57,17 @@ namespace KCM.Packets.Lobby
public override void HandlePacketClient()
{
Start();
if (!LobbyManager.loadingSave)
{
Start();
}
else
{
// If loading a save, just ensure the game is in the correct UI state for loading.
// The actual game start will happen after save data is unpacked in SaveTransferPacket.HandlePacketClient().
// This prevents MainMenuMode.StartGame() from being called prematurely and causing NullReferenceExceptions.
GameState.inst.SetNewMode(GameState.inst.playingMode);
}
}
public override void HandlePacketServer()