From 471dfbaf951f7905145c3a4a45cabea5eb2ed3ff Mon Sep 17 00:00:00 2001 From: mischa Date: Mon, 24 Jul 2023 18:20:53 +0800 Subject: [PATCH] move into lag comp --- .../Core/{Prediction => LagCompensation}/HistoryBounds.cs | 2 +- .../Core/{Prediction => LagCompensation}/HistoryBounds.cs.meta | 0 Assets/Mirror/Core/Prediction.meta | 3 --- Assets/Mirror/Core/Prediction/_README.txt | 2 -- Assets/Mirror/Core/Prediction/_README.txt.meta | 3 --- .../{Prediction => LagCompensation}/HistoryBoundsTests.cs | 2 +- .../{Prediction => LagCompensation}/HistoryBoundsTests.cs.meta | 0 .../Tests/Editor/LagCompensation/LagCompensationTests.cs | 2 +- Assets/Mirror/Tests/Editor/Prediction.meta | 3 --- 9 files changed, 3 insertions(+), 14 deletions(-) rename Assets/Mirror/Core/{Prediction => LagCompensation}/HistoryBounds.cs (94%) rename Assets/Mirror/Core/{Prediction => LagCompensation}/HistoryBounds.cs.meta (100%) delete mode 100644 Assets/Mirror/Core/Prediction.meta delete mode 100644 Assets/Mirror/Core/Prediction/_README.txt delete mode 100644 Assets/Mirror/Core/Prediction/_README.txt.meta rename Assets/Mirror/Tests/Editor/{Prediction => LagCompensation}/HistoryBoundsTests.cs (98%) rename Assets/Mirror/Tests/Editor/{Prediction => LagCompensation}/HistoryBoundsTests.cs.meta (100%) delete mode 100644 Assets/Mirror/Tests/Editor/Prediction.meta diff --git a/Assets/Mirror/Core/Prediction/HistoryBounds.cs b/Assets/Mirror/Core/LagCompensation/HistoryBounds.cs similarity index 94% rename from Assets/Mirror/Core/Prediction/HistoryBounds.cs rename to Assets/Mirror/Core/LagCompensation/HistoryBounds.cs index 3b69d6f66..1338331c6 100644 --- a/Assets/Mirror/Core/Prediction/HistoryBounds.cs +++ b/Assets/Mirror/Core/LagCompensation/HistoryBounds.cs @@ -1,5 +1,5 @@ // HistoryBounds keeps a bounding box of all the object's bounds in the past N seconds. -// useful to decide which objects we should rollback & raycast against. +// useful to decide which objects to rollback, instead of rolling back all of them. // https://www.youtube.com/watch?v=zrIY0eIyqmI (37:00) // standalone C# implementation to be engine (and language) agnostic. diff --git a/Assets/Mirror/Core/Prediction/HistoryBounds.cs.meta b/Assets/Mirror/Core/LagCompensation/HistoryBounds.cs.meta similarity index 100% rename from Assets/Mirror/Core/Prediction/HistoryBounds.cs.meta rename to Assets/Mirror/Core/LagCompensation/HistoryBounds.cs.meta diff --git a/Assets/Mirror/Core/Prediction.meta b/Assets/Mirror/Core/Prediction.meta deleted file mode 100644 index b8c840768..000000000 --- a/Assets/Mirror/Core/Prediction.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d50ddee4bf944ea8944ef1f4485b4853 -timeCreated: 1690172284 \ No newline at end of file diff --git a/Assets/Mirror/Core/Prediction/_README.txt b/Assets/Mirror/Core/Prediction/_README.txt deleted file mode 100644 index b038d634b..000000000 --- a/Assets/Mirror/Core/Prediction/_README.txt +++ /dev/null @@ -1,2 +0,0 @@ -Client Side Prediction & Reconciliation based on Overwatch. -https://www.youtube.com/watch?v=zrIY0eIyqmI \ No newline at end of file diff --git a/Assets/Mirror/Core/Prediction/_README.txt.meta b/Assets/Mirror/Core/Prediction/_README.txt.meta deleted file mode 100644 index 2d5fbbc73..000000000 --- a/Assets/Mirror/Core/Prediction/_README.txt.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: a43657ebad8e494ba90ff6d9347f41ca -timeCreated: 1690172359 \ No newline at end of file diff --git a/Assets/Mirror/Tests/Editor/Prediction/HistoryBoundsTests.cs b/Assets/Mirror/Tests/Editor/LagCompensation/HistoryBoundsTests.cs similarity index 98% rename from Assets/Mirror/Tests/Editor/Prediction/HistoryBoundsTests.cs rename to Assets/Mirror/Tests/Editor/LagCompensation/HistoryBoundsTests.cs index 434b332e4..a1f433d10 100644 --- a/Assets/Mirror/Tests/Editor/Prediction/HistoryBoundsTests.cs +++ b/Assets/Mirror/Tests/Editor/LagCompensation/HistoryBoundsTests.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using UnityEngine; -namespace Mirror.Tests.Prediction +namespace Mirror.Tests.LagCompensationTests { public class HistoryBoundsTests { diff --git a/Assets/Mirror/Tests/Editor/Prediction/HistoryBoundsTests.cs.meta b/Assets/Mirror/Tests/Editor/LagCompensation/HistoryBoundsTests.cs.meta similarity index 100% rename from Assets/Mirror/Tests/Editor/Prediction/HistoryBoundsTests.cs.meta rename to Assets/Mirror/Tests/Editor/LagCompensation/HistoryBoundsTests.cs.meta diff --git a/Assets/Mirror/Tests/Editor/LagCompensation/LagCompensationTests.cs b/Assets/Mirror/Tests/Editor/LagCompensation/LagCompensationTests.cs index 300ea6f80..d594842c6 100644 --- a/Assets/Mirror/Tests/Editor/LagCompensation/LagCompensationTests.cs +++ b/Assets/Mirror/Tests/Editor/LagCompensation/LagCompensationTests.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Mirror.Tests +namespace Mirror.Tests.LagCompensationTests { // a simple snapshot with timestamp & interpolation struct SimpleCapture : Capture diff --git a/Assets/Mirror/Tests/Editor/Prediction.meta b/Assets/Mirror/Tests/Editor/Prediction.meta deleted file mode 100644 index cbcc7453d..000000000 --- a/Assets/Mirror/Tests/Editor/Prediction.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 7a8e42ffd85f447ab0e24a07610a4a0b -timeCreated: 1690172297 \ No newline at end of file