Skip to content

Commit

Permalink
Gameplay: Fix locked hold giving miss early
Browse files Browse the repository at this point in the history
  • Loading branch information
0thElement committed Jul 27, 2024
1 parent 2bbe2a4 commit 938ba93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Assets/Scripts/Gameplay/Data/Events/Hold.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using ArcCreate.Gameplay.Judgement;
using ArcCreate.Gameplay.Render;
using ArcCreate.Utility;
using ArcCreate.Utility.Extension;
using UnityEngine;
Expand All @@ -21,6 +20,8 @@ public class Hold : LongNote, ILongNote, ILaneTapJudgementReceiver, ILaneHoldJud

public int Lane { get; set; }

public bool IsLocked => locked;

public override ArcEvent Clone()
{
return new Hold()
Expand Down Expand Up @@ -241,7 +242,7 @@ public void ProcessLaneHoldJudgement(bool isExpired, bool isJudgement, GroupProp
holdHighlightRequestSent = false;
}

if (locked || isExpired)
if (isExpired)
{
longParticleUntil = int.MinValue;
highlight = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void HandleLaneHoldRequests(int currentTiming, UnorderedList<LaneHoldJudg
{
LaneHoldJudgementRequest req = requests[i];

if (currentTiming < req.StartAtTiming)
if (currentTiming < req.StartAtTiming || req.Receiver.IsLocked)
{
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public struct LaneHoldJudgementRequest
public int AutoAtTiming;
public int Lane;
public bool IsJudgement;
public ILaneHoldJudgementReceiver Receiver;
public Hold Receiver;
public GroupProperties Properties;
}
}

0 comments on commit 938ba93

Please sign in to comment.