online fix

This commit is contained in:
2025-10-27 14:09:52 +01:00
parent 8ea4b173a3
commit 9ded503704
6 changed files with 181 additions and 40 deletions

View File

@@ -256,7 +256,7 @@ namespace MegaKoop.Game.Networking
{
// Ensure network identity is deterministic across clients.
var identity = clone.GetComponent<NetworkIdentity>() ?? clone.AddComponent<NetworkIdentity>();
identity.SetNetworkId(index + 1);
identity.SetNetworkId(NetworkIdAllocator.PlayerIdStart + index);
var bridge = clone.GetComponent<SteamCharacterNetworkBridge>() ?? clone.AddComponent<SteamCharacterNetworkBridge>();
bridge.AssignOwner(ParseSteamId(info.SteamId), info.IsLocal);