From 3faec24681a9379fcf72bdb64e4eb3718543be16 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Tue, 27 Dec 2022 16:42:22 -0500 Subject: [PATCH] NetworkTransformBase - make snapshot lists readonly (#3322) - code smell --- Assets/Mirror/Components/NetworkTransformBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Mirror/Components/NetworkTransformBase.cs b/Assets/Mirror/Components/NetworkTransformBase.cs index ef2f15fb4..03251f1dd 100644 --- a/Assets/Mirror/Components/NetworkTransformBase.cs +++ b/Assets/Mirror/Components/NetworkTransformBase.cs @@ -37,8 +37,8 @@ public abstract class NetworkTransformBase : NetworkBehaviour // 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. protected bool IsClientWithAuthority => isClient && authority; - internal SortedList clientSnapshots = new SortedList(); - internal SortedList serverSnapshots = new SortedList(); + internal readonly SortedList clientSnapshots = new SortedList(); + internal readonly SortedList serverSnapshots = new SortedList(); // selective sync ////////////////////////////////////////////////////// [Header("Selective Sync & Interpolation\nDon't change these at Runtime")]