mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Use closest endTime for holdAddition validity
This commit is contained in:
@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Mania.Difficulty.Skills
|
|||||||
var maniaCurrent = (ManiaDifficultyHitObject)current;
|
var maniaCurrent = (ManiaDifficultyHitObject)current;
|
||||||
double endTime = maniaCurrent.EndTime;
|
double endTime = maniaCurrent.EndTime;
|
||||||
int column = maniaCurrent.BaseObject.Column;
|
int column = maniaCurrent.BaseObject.Column;
|
||||||
|
double closestEndTime = 100;
|
||||||
|
|
||||||
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
|
||||||
@ -44,24 +45,26 @@ namespace osu.Game.Rulesets.Mania.Difficulty.Skills
|
|||||||
// 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, buuuuuut...
|
// If there is at least one other overlapping end or note, then we get an addition
|
||||||
if (Precision.DefinitelyBigger(holdEndTimes[i], maniaCurrent.StartTime, 1) && Precision.DefinitelyBigger(endTime, holdEndTimes[i], 1))
|
if (Precision.DefinitelyBigger(holdEndTimes[i], maniaCurrent.StartTime, 1) && Precision.DefinitelyBigger(endTime, holdEndTimes[i], 1))
|
||||||
holdAddition = 1.0;
|
holdAddition = 1.0;
|
||||||
|
|
||||||
// ... this 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
|
|
||||||
if (Precision.AlmostEquals(endTime, holdEndTimes[i], 1))
|
|
||||||
holdAddition = 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))
|
||||||
holdFactor = 1.25;
|
holdFactor = 1.25;
|
||||||
|
|
||||||
|
closestEndTime = Math.Min(closestEndTime, Math.Abs(endTime - holdEndTimes[i]));
|
||||||
|
|
||||||
// Decay individual strains
|
// Decay individual strains
|
||||||
individualStrains[i] = applyDecay(individualStrains[i], current.DeltaTime, individual_decay_base);
|
individualStrains[i] = applyDecay(individualStrains[i], current.DeltaTime, individual_decay_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
|
if (closestEndTime < 1)
|
||||||
|
holdAddition = 0;
|
||||||
|
|
||||||
// Increase individual strain in own column
|
// Increase individual strain in own column
|
||||||
individualStrains[column] += 2.0 * holdFactor;
|
individualStrains[column] += 2.0 * holdFactor;
|
||||||
individualStrain = individualStrains[column];
|
individualStrain = individualStrains[column];
|
||||||
|
Reference in New Issue
Block a user