NetworkTransformBase - make snapshot lists readonly (#3322)

- code smell
This commit is contained in:
MrGadget 2022-12-27 16:42:22 -05:00 committed by GitHub
parent 16d8c08a75
commit 3faec24681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,8 @@ public abstract class NetworkTransformBase : NetworkBehaviour
// Is this a client with authority over this transform? // Is this a client with authority over this transform?
// This component could be on the player object or any object that has been assigned authority to this client. // This component could be on the player object or any object that has been assigned authority to this client.
protected bool IsClientWithAuthority => isClient && authority; protected bool IsClientWithAuthority => isClient && authority;
internal SortedList<double, TransformSnapshot> clientSnapshots = new SortedList<double, TransformSnapshot>(); internal readonly SortedList<double, TransformSnapshot> clientSnapshots = new SortedList<double, TransformSnapshot>();
internal SortedList<double, TransformSnapshot> serverSnapshots = new SortedList<double, TransformSnapshot>(); internal readonly SortedList<double, TransformSnapshot> serverSnapshots = new SortedList<double, TransformSnapshot>();
// selective sync ////////////////////////////////////////////////////// // selective sync //////////////////////////////////////////////////////
[Header("Selective Sync & Interpolation\nDon't change these at Runtime")] [Header("Selective Sync & Interpolation\nDon't change these at Runtime")]