fix: TimeSnapshotMessage doesn't require authority anymore to avoid disconnecting connections where the unreliable message arrived before the reliable authority message

This commit is contained in:
mischa 2024-07-30 17:18:01 +02:00
parent 810e5f55c5
commit 87ca42eda9
2 changed files with 2 additions and 2 deletions

View File

@ -519,7 +519,7 @@ internal static void RegisterMessageHandlers(bool hostMode)
}
// These handlers are the same for host and remote clients
RegisterHandler<TimeSnapshotMessage>(OnTimeSnapshotMessage);
RegisterHandler<TimeSnapshotMessage>(OnTimeSnapshotMessage, false); // unreliable may arrive before reliable authority went through
RegisterHandler<ChangeOwnerMessage>(OnChangeOwner);
RegisterHandler<RpcMessage>(OnRPCMessage);
}

View File

@ -300,7 +300,7 @@ internal static void RegisterMessageHandlers()
RegisterHandler<NetworkPingMessage>(NetworkTime.OnServerPing, false);
RegisterHandler<NetworkPongMessage>(NetworkTime.OnServerPong, false);
RegisterHandler<EntityStateMessage>(OnEntityStateMessage, true);
RegisterHandler<TimeSnapshotMessage>(OnTimeSnapshotMessage, true);
RegisterHandler<TimeSnapshotMessage>(OnTimeSnapshotMessage, false); // unreliable may arrive before reliable authority went through
}
// remote calls ////////////////////////////////////////////////////////