diff --git a/.gitattributes b/.gitattributes
index baf69b41d1..e3ffd343db 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -14,6 +14,7 @@ App.config text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.snippet text eol=crlf
+*.manifest text eol=crlf
# Check out with lf (UNIX) line endings
*.sh text eol=lf
diff --git a/app.manifest b/app.manifest
index d1c97498f4..533c6ff208 100644
--- a/app.manifest
+++ b/app.manifest
@@ -1,46 +1,46 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs b/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
index 9e48e8de74..df7578799f 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
@@ -1,13 +1,88 @@
// Copyright (c) 2007-2018 ppy Pty Ltd .
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
+using osu.Framework.MathUtils;
+using osu.Game.Rulesets.Catch.Objects;
+using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Mods;
+using System;
namespace osu.Game.Rulesets.Catch.Mods
{
- public class CatchModHardRock : ModHardRock
+ public class CatchModHardRock : ModHardRock, IApplicableToHitObject
{
public override double ScoreMultiplier => 1.12;
public override bool Ranked => true;
+
+ private float lastStartX;
+ private int lastStartTime;
+
+ public void ApplyToHitObject(CatchHitObject hitObject)
+ {
+ float position = hitObject.X;
+ int startTime = (int)hitObject.StartTime;
+
+ if (lastStartX == 0)
+ {
+ lastStartX = position;
+ lastStartTime = startTime;
+ return;
+ }
+
+ float diff = lastStartX - position;
+ int timeDiff = startTime - lastStartTime;
+
+ if (timeDiff > 1000)
+ {
+ lastStartX = position;
+ lastStartTime = startTime;
+ return;
+ }
+
+ if (diff == 0)
+ {
+ bool right = RNG.NextBool();
+
+ float rand = Math.Min(20, (float)RNG.NextDouble(0, timeDiff / 4d)) / CatchPlayfield.BASE_WIDTH;
+
+ if (right)
+ {
+ if (position + rand <= 1)
+ position += rand;
+ else
+ position -= rand;
+ }
+ else
+ {
+ if (position - rand >= 0)
+ position -= rand;
+ else
+ position += rand;
+ }
+
+ hitObject.X = position;
+
+ return;
+ }
+
+ if (Math.Abs(diff) < timeDiff / 3d)
+ {
+ if (diff > 0)
+ {
+ if (position - diff > 0)
+ position -= diff;
+ }
+ else
+ {
+ if (position - diff < 1)
+ position -= diff;
+ }
+ }
+
+ hitObject.X = position;
+
+ lastStartX = position;
+ lastStartTime = startTime;
+ }
}
}
diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs
index c7f555ff0f..3efaa02a31 100644
--- a/osu.Game/Configuration/OsuConfigManager.cs
+++ b/osu.Game/Configuration/OsuConfigManager.cs
@@ -85,6 +85,8 @@ namespace osu.Game.Configuration
Set(OsuSetting.ScreenshotFormat, ScreenshotFormat.Jpg);
Set(OsuSetting.ScreenshotCaptureMenuCursor, false);
+
+ Set(OsuSetting.SongSelectRightMouseScroll, false);
}
public OsuConfigManager(Storage storage) : base(storage)
@@ -130,6 +132,7 @@ namespace osu.Game.Configuration
SpeedChangeVisualisation,
Skin,
ScreenshotFormat,
- ScreenshotCaptureMenuCursor
+ ScreenshotCaptureMenuCursor,
+ SongSelectRightMouseScroll
}
}
diff --git a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs
index 7575105ef7..7893d76fb8 100644
--- a/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs
+++ b/osu.Game/Overlays/Settings/Sections/Gameplay/SongSelectSettings.cs
@@ -17,6 +17,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{
Children = new Drawable[]
{
+ new SettingsCheckbox
+ {
+ LabelText = "Right mouse drag to absolute scroll",
+ Bindable = config.GetBindable(OsuSetting.SongSelectRightMouseScroll),
+ },
new SettingsCheckbox
{
LabelText = "Show converted beatmaps",
diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs
index 2076807d18..3c9a14e1f4 100644
--- a/osu.Game/Screens/Select/BeatmapCarousel.cs
+++ b/osu.Game/Screens/Select/BeatmapCarousel.cs
@@ -97,6 +97,9 @@ namespace osu.Game.Screens.Select
private readonly Container scrollableContent;
+
+ public Bindable RightClickScrollingEnabled = new Bindable();
+
public Bindable RandomAlgorithm = new Bindable();
private readonly List previouslyVisitedRandomSets = new List();
private readonly Stack randomSelectedBeatmaps = new Stack();
@@ -122,6 +125,10 @@ namespace osu.Game.Screens.Select
private void load(OsuConfigManager config)
{
config.BindWith(OsuSetting.RandomSelectAlgorithm, RandomAlgorithm);
+ config.BindWith(OsuSetting.SongSelectRightMouseScroll, RightClickScrollingEnabled);
+
+ RightClickScrollingEnabled.ValueChanged += v => RightMouseScrollbar = v;
+ RightClickScrollingEnabled.TriggerChange();
}
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet)