From 3e1424f8211ddd0f0339006794d79569e3bb5c54 Mon Sep 17 00:00:00 2001 From: tsunyoku Date: Sun, 29 Dec 2024 22:20:21 +0000 Subject: [PATCH] add extra FL guard for safety --- osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs index dae35583df..838cc37fae 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuDifficultyCalculator.cs @@ -212,6 +212,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty private double computeFlashlightRating(double flashlightDifficultyValue, Mod[] mods, int totalHits, double overallDifficulty) { + if (!mods.Any(m => m is OsuModFlashlight)) + return 0; + double flashlightRating = Math.Sqrt(flashlightDifficultyValue) * difficulty_multiplier; if (mods.Any(m => m is OsuModTouchDevice))