diff --git a/Assets/Scripts/Games/PlayerActionEvent.cs b/Assets/Scripts/Games/PlayerActionEvent.cs index d2fdbe569..4e3b65d24 100644 --- a/Assets/Scripts/Games/PlayerActionEvent.cs +++ b/Assets/Scripts/Games/PlayerActionEvent.cs @@ -46,6 +46,8 @@ namespace HeavenStudio.Games public bool countsForAccuracy = true; //Indicates if the input counts for the accuracy or not. If set to false, it'll not be counted in the accuracy calculation + public bool missable = false; //Indicates if the miss input counts for the accuracy or not. If set to true, it'll not be counted in the accuracy calculation + public void setHitCallback(ActionEventCallbackState OnHit) { this.OnHit = OnHit; @@ -332,7 +334,7 @@ namespace HeavenStudio.Games OnMiss(this); } - if (countsForAccuracy && gm.canInput && !(noAutoplay || autoplayOnly)) + if (countsForAccuracy && !missable && gm.canInput && !(noAutoplay || autoplayOnly)) { gm.ScoreInputAccuracy(startBeat + timer, 0, true, 2.0, weight, false); GoForAPerfect.instance.Miss(); diff --git a/Assets/Scripts/Games/SickBeats/SickBeats.cs b/Assets/Scripts/Games/SickBeats/SickBeats.cs index dbc35f81e..2df3eb686 100644 --- a/Assets/Scripts/Games/SickBeats/SickBeats.cs +++ b/Assets/Scripts/Games/SickBeats/SickBeats.cs @@ -216,6 +216,7 @@ namespace HeavenStudio.Games PlayerActionEvent.ActionEventHittableQuery HittableQuery = null) { PlayerActionEvent evt = ScheduleInput(startBeat, timer, inputAction, OnHit, OnMiss, OnBlank, HittableQuery); + evt.missable = true; return evt; } @@ -232,6 +233,20 @@ namespace HeavenStudio.Games if (BeatIsInBopRegion(beat)) Bop(beat); } + [NonSerialized] public double gameEndBeat = double.MaxValue; + public override void OnGameSwitch(double beat) + { + var entities = GameManager.instance.Beatmap.Entities; + // find out when the next game switch (or remix end) happens + RiqEntity firstEnd = entities.Find(c => (c.datamodel.StartsWith("gameManager/switchGame") || c.datamodel.Equals("gameManager/end")) && c.beat > beat); + gameEndBeat = firstEnd?.beat ?? double.MaxValue; + } + + public override void OnPlay(double beat) + { + OnGameSwitch(beat); + } + void Update() { var cond = Conductor.instance; diff --git a/Assets/Scripts/Games/SickBeats/Virus.cs b/Assets/Scripts/Games/SickBeats/Virus.cs index eeed980c6..18c1d55b8 100644 --- a/Assets/Scripts/Games/SickBeats/Virus.cs +++ b/Assets/Scripts/Games/SickBeats/Virus.cs @@ -31,7 +31,7 @@ namespace HeavenStudio.Games.Scripts_SickBeats public void Appear() { - + if (startBeat >= game.gameEndBeat) return; MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("sickBeats/appear"+UnityEngine.Random.Range(0, 2).ToString(), startBeat), @@ -42,7 +42,7 @@ namespace HeavenStudio.Games.Scripts_SickBeats })}); isJust = false; - + PlayerInput.InputAction InputAction; if (PlayerInput.PlayerHasControl() && PlayerInput.CurrentControlStyle is InputSystem.InputController.ControlStyles.Touch) {