forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into tgi74-rightclicks…
…crolling
- Loading branch information
Showing
49 changed files
with
1,149 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> | ||
<assemblyIdentity version="1.0.0.0" name="osu!" /> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> | ||
<security> | ||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> | ||
</requestedPrivileges> | ||
<applicationRequestMinimum> | ||
<defaultAssemblyRequest permissionSetReference="Custom" /> | ||
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" /> | ||
</applicationRequestMinimum> | ||
</security> | ||
</trustInfo> | ||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
<application> | ||
<!-- Windows Vista --> | ||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" /> | ||
<!-- Windows 7 --> | ||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" /> | ||
<!-- Windows 8 --> | ||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" /> | ||
<!-- Windows 8.1 --> | ||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" /> | ||
<!-- Windows 10 --> | ||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> | ||
</application> | ||
</compatibility> | ||
<asmv3:application> | ||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> | ||
<dpiAware>true</dpiAware> | ||
</asmv3:windowsSettings> | ||
</asmv3:application> | ||
<dependency> | ||
<dependentAssembly> | ||
<assemblyIdentity | ||
type="win32" | ||
name="Microsoft.Windows.Common-Controls" | ||
version="6.0.0.0" | ||
processorArchitecture="*" | ||
publicKeyToken="6595b64144ccf1df" | ||
language="*" | ||
/> | ||
</dependentAssembly> | ||
</dependency> | ||
</asmv1:assembly> |
Submodule osu-framework
updated
459 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,88 @@ | ||
// Copyright (c) 2007-2018 ppy Pty Ltd <[email protected]>. | ||
// 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<CatchHitObject> | ||
{ | ||
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.