codex talán fixálta idk

This commit is contained in:
2025-12-14 13:09:32 +01:00
parent b02af4d0c7
commit b05c3415f2
4 changed files with 83 additions and 19 deletions

View File

@@ -33,12 +33,21 @@ namespace KCM.Packets.Network
CloudSystem.inst.BaseFreq = 4.5f;
Weather.inst.SetSeason(Weather.Season.Summer);
//inst = new KCClient(KCServer.IsRunning ? "Ryan" : "Orion");
KCClient.inst = new KCClient(SteamFriends.GetPersonaName());
Main.helper.Log("Sending client connected. Client ID is: " + clientId);
Main.kCPlayers.Add(Main.PlayerSteamID, new KCPlayer(KCClient.inst.Name, clientId, Main.PlayerSteamID));
KCPlayer localPlayer;
if (!Main.kCPlayers.TryGetValue(Main.PlayerSteamID, out localPlayer))
{
localPlayer = new KCPlayer(KCClient.inst.Name, clientId, Main.PlayerSteamID);
Main.kCPlayers.Add(Main.PlayerSteamID, localPlayer);
}
else
{
localPlayer.id = clientId;
localPlayer.name = KCClient.inst.Name;
}
Player.inst.PlayerLandmassOwner.teamId = clientId * 10 + 2;