From b9a3e260d387a06c688ea53109a37e43897ba083 Mon Sep 17 00:00:00 2001 From: 0thElement Date: Wed, 21 Aug 2024 21:12:14 +0700 Subject: [PATCH] Revert "Gameplay: Fix rekka bug (?)" This reverts commit 8a0e65f876007c6cc53a1d38c5d767d2fdec3feb. --- .../Gameplay/Data/Events/Arc.Judgement.cs | 29 +------------- Assets/Scripts/Gameplay/Data/Events/ArcTap.cs | 1 - .../Judgement/Input/TouchInputHandler.cs | 39 ++++++------------- .../Request/ArcTapJudgementRequest.cs | 1 - 4 files changed, 13 insertions(+), 57 deletions(-) diff --git a/Assets/Scripts/Gameplay/Data/Events/Arc.Judgement.cs b/Assets/Scripts/Gameplay/Data/Events/Arc.Judgement.cs index bb023a81..90e0daf3 100644 --- a/Assets/Scripts/Gameplay/Data/Events/Arc.Judgement.cs +++ b/Assets/Scripts/Gameplay/Data/Events/Arc.Judgement.cs @@ -9,10 +9,9 @@ namespace ArcCreate.Gameplay.Data /// /// Partial class for judgement. /// - public partial class Arc : LongNote, ILongNote, IArcJudgementReceiver, IArcTapJudgementReceiver + public partial class Arc : LongNote, ILongNote, IArcJudgementReceiver { private int numJudgementRequestsSent = 0; - private bool sentTapBlockingJudgement = false; private bool highlightRequestSent = false; private bool spawnedParticleThisFrame = false; @@ -25,7 +24,6 @@ public void ResetJudgeTo(int timing) highlightRequestSent = false; arcGroupAlpha = 1; hasBeenHitOnce = hasBeenHitOnce && timing >= Timing && timing <= EndTiming; - sentTapBlockingJudgement = timing >= Timing; for (int i = 0; i < segments.Count; i++) { ArcSegmentData segment = segments[i]; @@ -83,12 +81,6 @@ public void UpdateJudgement(int currentTiming, GroupProperties groupProperties) highlightRequestSent = true; } - if (!IsTrace && currentTiming >= Timing - Values.MissJudgeWindow && !sentTapBlockingJudgement) - { - RequestTapBlockingJudgement(groupProperties); - sentTapBlockingJudgement = true; - } - spawnedParticleThisFrame = false; } @@ -140,10 +132,6 @@ public void ProcessArcJudgement(bool isExpired, bool isJudgement, GroupPropertie } } - public void ProcessArcTapJudgement(int offset, GroupProperties properties) - { - } - private void RequestJudgement(GroupProperties props) { for (int t = numJudgementRequestsSent; t < TotalCombo; t++) @@ -164,21 +152,6 @@ private void RequestJudgement(GroupProperties props) numJudgementRequestsSent = TotalCombo; } - private void RequestTapBlockingJudgement(GroupProperties props) - { - Services.Judgement.Request(new ArcTapJudgementRequest() - { - ExpireAtTiming = Timing, - AutoAtTiming = Timing, - IsBlocker = true, - Width = 1, - X = WorldXAt(0), - Y = WorldYAt(0), - Receiver = this, - Properties = props, - }); - } - private void RequestHighlight(int timing, GroupProperties props) { Services.Judgement.Request(new ArcJudgementRequest() diff --git a/Assets/Scripts/Gameplay/Data/Events/ArcTap.cs b/Assets/Scripts/Gameplay/Data/Events/ArcTap.cs index 28a00ce5..31299d71 100644 --- a/Assets/Scripts/Gameplay/Data/Events/ArcTap.cs +++ b/Assets/Scripts/Gameplay/Data/Events/ArcTap.cs @@ -163,7 +163,6 @@ private void RequestJudgement(GroupProperties props) X = WorldX, Y = WorldY, Width = Width, - IsBlocker = false, Receiver = this, Properties = props, }); diff --git a/Assets/Scripts/Gameplay/Judgement/Input/TouchInputHandler.cs b/Assets/Scripts/Gameplay/Judgement/Input/TouchInputHandler.cs index eff8743d..dac7d4e7 100644 --- a/Assets/Scripts/Gameplay/Judgement/Input/TouchInputHandler.cs +++ b/Assets/Scripts/Gameplay/Judgement/Input/TouchInputHandler.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Generic; using ArcCreate.Gameplay.Data; using ArcCreate.Utility; @@ -83,6 +82,11 @@ public void HandleTapRequests( { ArcTapJudgementRequest req = arcTapRequests[i]; int timingDifference = req.AutoAtTiming - currentTiming; + if (timingDifference > minTimingDifference) + { + continue; + } + Vector2 judgementSize = req.Properties.CurrentJudgementSize; Vector3 judgementOffset = req.Properties.CurrentJudgementOffset; Vector3 worldPosition = new Vector3(req.X, req.Y, 0) + judgementOffset; @@ -90,33 +94,14 @@ public void HandleTapRequests( Vector3 deltaToNote = screenPosition - input.ScreenPos; float distanceToNote = deltaToNote.sqrMagnitude; - if (ArcTapCollide(input, screenPosition, worldPosition, req.Width, judgementSize)) + if (ArcTapCollide(input, screenPosition, worldPosition, req.Width, judgementSize) + && (timingDifference < minTimingDifference || distanceToNote <= minPositionDifference)) { - if (timingDifference < minTimingDifference || distanceToNote <= minPositionDifference) - { - if (req.IsBlocker && - (minTimingDifference - timingDifference <= Values.MaxJudgeWindow - || currentTiming >= req.AutoAtTiming)) - { - continue; - } - - minTimingDifference = timingDifference; - minPositionDifference = distanceToNote; - applicableArcTapRequestExists = true; - applicableArcTapRequest = req; - applicableArcTapRequestIndex = i; - } - else if (timingDifference <= minTimingDifference + Values.MaxJudgeWindow - && applicableArcTapRequestExists && applicableArcTapRequest.IsBlocker - && !req.IsBlocker) - { - minTimingDifference = timingDifference; - minPositionDifference = distanceToNote; - applicableArcTapRequestExists = true; - applicableArcTapRequest = req; - applicableArcTapRequestIndex = i; - } + minTimingDifference = timingDifference; + minPositionDifference = distanceToNote; + applicableArcTapRequestExists = true; + applicableArcTapRequest = req; + applicableArcTapRequestIndex = i; } } diff --git a/Assets/Scripts/Gameplay/Judgement/Request/ArcTapJudgementRequest.cs b/Assets/Scripts/Gameplay/Judgement/Request/ArcTapJudgementRequest.cs index 5e875336..8529b69e 100644 --- a/Assets/Scripts/Gameplay/Judgement/Request/ArcTapJudgementRequest.cs +++ b/Assets/Scripts/Gameplay/Judgement/Request/ArcTapJudgementRequest.cs @@ -9,7 +9,6 @@ public struct ArcTapJudgementRequest public float X; public float Y; public float Width; - public bool IsBlocker; public IArcTapJudgementReceiver Receiver; public GroupProperties Properties; }