NetworkTransform: force syncDirection to follow the old clientAuthority state to make it obvious that there is only one source of truth

This commit is contained in:
vis2k 2022-10-22 10:26:31 +02:00
parent dfd4d0b672
commit b31eeb5a4f

View File

@ -91,6 +91,11 @@ protected virtual void OnValidate()
// both always need to be on the same send interval.
// force it in here.
syncInterval = NetworkServer.sendInterval;
// NetworkTransform doesn't use SyncDirection yet.
// it still uses 'clientAuthority' to indicate authority.
// make it obvious that there's only one source of truth.
syncDirection = clientAuthority ? SyncDirection.ClientToServer : SyncDirection.ServerToClient;
}
// snapshot functions //////////////////////////////////////////////////