mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
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:
parent
dfd4d0b672
commit
b31eeb5a4f
@ -91,6 +91,11 @@ protected virtual void OnValidate()
|
|||||||
// both always need to be on the same send interval.
|
// both always need to be on the same send interval.
|
||||||
// force it in here.
|
// force it in here.
|
||||||
syncInterval = NetworkServer.sendInterval;
|
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 //////////////////////////////////////////////////
|
// snapshot functions //////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user