mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Cleanup of code
This commit is contained in:
parent
6b1a4a53d4
commit
f4ceb17064
@ -192,7 +192,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
{
|
||||
double flashlightValue = 0.0;
|
||||
|
||||
if (mods.Any(h => h is OsuModFlashlight)) {
|
||||
if (mods.Any(h => h is OsuModFlashlight))
|
||||
{
|
||||
flashlightValue = Math.Pow(Attributes.FlashlightStrain, 2.0) * 25.0;
|
||||
|
||||
// Add an additional bonus for HDFL.
|
||||
|
@ -40,19 +40,20 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
{
|
||||
double cumulativeStrainTime = 0.0;
|
||||
|
||||
for (int i = 0; i < Previous.Count; i++) {
|
||||
for (int i = 0; i < Previous.Count; i++)
|
||||
{
|
||||
var osuPrevious = (OsuDifficultyHitObject)Previous[i];
|
||||
var osuPreviousHitObject = (OsuHitObject)(osuPrevious.BaseObject);
|
||||
|
||||
if (!(osuPrevious.BaseObject is Spinner)) {
|
||||
if (!(osuPrevious.BaseObject is Spinner))
|
||||
{
|
||||
double jumpDistance = (osuHitObject.StackedPosition - osuPreviousHitObject.EndPosition).Length;
|
||||
|
||||
cumulativeStrainTime += osuPrevious.StrainTime;
|
||||
|
||||
// We want to nerf objects that can be easily seen within the Flashlight circle radius.
|
||||
if (i == 0 && jumpDistance < 50.0) {
|
||||
if (i == 0 && jumpDistance < 50.0)
|
||||
smallDistNerf = jumpDistance / 50.0;
|
||||
}
|
||||
|
||||
result += Math.Pow(0.8, i) * scalingFactor * jumpDistance / cumulativeStrainTime;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user