mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Use isOverlapping bool to determine holdAddition
This commit is contained in:
@ -41,13 +41,13 @@ namespace osu.Game.Rulesets.Mania.Difficulty.Skills
|
|||||||
|
|
||||||
double holdFactor = 1.0; // Factor to all additional strains in case something else is held
|
double holdFactor = 1.0; // Factor to all additional strains in case something else is held
|
||||||
double holdAddition = 0; // Addition to the current note in case it's a hold and has to be released awkwardly
|
double holdAddition = 0; // Addition to the current note in case it's a hold and has to be released awkwardly
|
||||||
|
bool isOverlapping = false;
|
||||||
|
|
||||||
// Fill up the holdEndTimes array
|
// Fill up the holdEndTimes array
|
||||||
for (int i = 0; i < holdEndTimes.Length; ++i)
|
for (int i = 0; i < holdEndTimes.Length; ++i)
|
||||||
{
|
{
|
||||||
// If there is at least one other overlapping end or note, then we get an addition
|
// The current note is overlapped if a previous note or end is overlapping the current note body
|
||||||
if (Precision.DefinitelyBigger(holdEndTimes[i], maniaCurrent.StartTime, 1) && Precision.DefinitelyBigger(endTime, holdEndTimes[i], 1))
|
isOverlapping |= Precision.DefinitelyBigger(holdEndTimes[i], maniaCurrent.StartTime, 1) && Precision.DefinitelyBigger(endTime, holdEndTimes[i], 1);
|
||||||
holdAddition = 1.0;
|
|
||||||
|
|
||||||
// We give a slight bonus to everything if something is held meanwhile
|
// We give a slight bonus to everything if something is held meanwhile
|
||||||
if (Precision.DefinitelyBigger(holdEndTimes[i], endTime, 1))
|
if (Precision.DefinitelyBigger(holdEndTimes[i], endTime, 1))
|
||||||
@ -61,10 +61,10 @@ namespace osu.Game.Rulesets.Mania.Difficulty.Skills
|
|||||||
|
|
||||||
holdEndTimes[column] = endTime;
|
holdEndTimes[column] = endTime;
|
||||||
|
|
||||||
// The hold addition only is valid if there is _no_ other note with the same ending. Releasing multiple notes at the same time is just as easy as releasing 1
|
// The hold addition is given if there was an overlap, however it is only valid if there are no other note with a similar ending.
|
||||||
// Nerfs the hold addition by half if the closest release is 24ms away
|
// Releasing multiple notes is just as easy as releasing 1. Nerfs the hold addition by half if the closest release is 24ms away.
|
||||||
if (holdAddition > 0)
|
if (isOverlapping)
|
||||||
holdAddition *= 1 / (1 + Math.Exp(0.5 * (24 - closestEndTime)));
|
holdAddition = 1 / (1 + Math.Exp(0.5 * (24 - closestEndTime)));
|
||||||
|
|
||||||
// Increase individual strain in own column
|
// Increase individual strain in own column
|
||||||
individualStrains[column] += 2.0 * holdFactor;
|
individualStrains[column] += 2.0 * holdFactor;
|
||||||
|
Reference in New Issue
Block a user