From 5c44ca09ecee1fc8c8f3277a2acbb689159f236d Mon Sep 17 00:00:00 2001 From: Jenny Crowe Date: Sun, 27 Feb 2022 15:12:17 -0700 Subject: [PATCH] Space Soccer: Backwards compatibility with levels using old swing system. --- Assets/Scripts/Games/SpaceSoccer/Ball.cs | 3 +++ Assets/Scripts/Games/SpaceSoccer/Kicker.cs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Assets/Scripts/Games/SpaceSoccer/Ball.cs b/Assets/Scripts/Games/SpaceSoccer/Ball.cs index 0800ef6c..ff0d9237 100644 --- a/Assets/Scripts/Games/SpaceSoccer/Ball.cs +++ b/Assets/Scripts/Games/SpaceSoccer/Ball.cs @@ -85,6 +85,9 @@ namespace RhythmHeavenMania.Games.SpaceSoccer else { highKickSwing = highKicks[i].swing; + if (highKickSwing == 0f) + highKickSwing = 0.5f; + if (highKicks[i].beat + GetAnimLength(State.HighKicked) > currentBeat) { //Debug.Log("Setting state to high kick"); diff --git a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs index 357f2e11..0febffa2 100644 --- a/Assets/Scripts/Games/SpaceSoccer/Kicker.cs +++ b/Assets/Scripts/Games/SpaceSoccer/Kicker.cs @@ -203,7 +203,11 @@ namespace RhythmHeavenMania.Games.SpaceSoccer canKick = false; if (ball) + { ball.highKickSwing = highKicks[i].swing; + if (ball.highKickSwing == 0f) + ball.highKickSwing = 0.5f; + } break; } else