From 779da04b7fe1dfed01d52d979044a0a18c466f6e Mon Sep 17 00:00:00 2001 From: mischa Date: Tue, 2 Apr 2024 16:26:50 +0800 Subject: [PATCH] Predicted Billiards Example: remove old 'inputs' code --- .../BilliardsPredicted/Player/PlayerPredicted.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Assets/Mirror/Examples/BilliardsPredicted/Player/PlayerPredicted.cs b/Assets/Mirror/Examples/BilliardsPredicted/Player/PlayerPredicted.cs index 73edadeaf..933909e12 100644 --- a/Assets/Mirror/Examples/BilliardsPredicted/Player/PlayerPredicted.cs +++ b/Assets/Mirror/Examples/BilliardsPredicted/Player/PlayerPredicted.cs @@ -23,10 +23,6 @@ public class PlayerPredicted : NetworkBehaviour // white ball component WhiteBallPredicted whiteBall; - // keep a history of inputs with timestamp - public int inputHistorySize = 64; - readonly SortedList inputs = new SortedList(); - void Awake() { // find the white ball once @@ -62,11 +58,6 @@ void ApplyForceToWhite(Vector3 force) // we reuse the white ball's OnMouseDrag and forward the event to here. public void OnDraggedBall(Vector3 force) { - // record the input for reconciliation if needed - if (inputs.Count >= inputHistorySize) inputs.RemoveAt(0); - inputs.Add(NetworkTime.time, new PlayerInput(NetworkTime.time, force)); - Debug.Log($"Inputs.Count={inputs.Count}"); - // apply force locally immediately ApplyForceToWhite(force);