mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Merge branch 'aim-refactor-velocity' into aim-refactor-ppcalc
This commit is contained in:
commit
e0632c4b1f
@ -63,7 +63,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
prevVelocity = Math.Max(prevVelocity, movementVelocity + travelVelocity);
|
prevVelocity = Math.Max(prevVelocity, movementVelocity + travelVelocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
double angleBonus = 0;
|
double wideAngleBonus = 0;
|
||||||
|
double acuteAngleBonus = 0;
|
||||||
double sliderBonus = 0;
|
double sliderBonus = 0;
|
||||||
double velChangeBonus = 0;
|
double velChangeBonus = 0;
|
||||||
|
|
||||||
@ -78,10 +79,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
double lastLastAngle = osuLastLastObj.Angle.Value;
|
double lastLastAngle = osuLastLastObj.Angle.Value;
|
||||||
|
|
||||||
// Rewarding angles, take the smaller velocity as base.
|
// Rewarding angles, take the smaller velocity as base.
|
||||||
angleBonus = Math.Min(currVelocity, prevVelocity);
|
double angleBonus = Math.Min(currVelocity, prevVelocity);
|
||||||
|
|
||||||
double wideAngleBonus = calcWideAngleBonus(currAngle);
|
wideAngleBonus = calcWideAngleBonus(currAngle);
|
||||||
double acuteAngleBonus = calcAcuteAngleBonus(currAngle);
|
acuteAngleBonus = calcAcuteAngleBonus(currAngle);
|
||||||
|
|
||||||
if (osuCurrObj.StrainTime > 100) // Only buff deltaTime exceeding 300 bpm 1/2.
|
if (osuCurrObj.StrainTime > 100) // Only buff deltaTime exceeding 300 bpm 1/2.
|
||||||
acuteAngleBonus = 0;
|
acuteAngleBonus = 0;
|
||||||
@ -95,21 +96,20 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
|
|
||||||
wideAngleBonus *= angleBonus * (1 - Math.Min(wideAngleBonus, Math.Pow(calcWideAngleBonus(lastAngle), 3))); // Penalize wide angles if they're repeated, reducing the penalty as the lastAngle gets more acute.
|
wideAngleBonus *= angleBonus * (1 - Math.Min(wideAngleBonus, Math.Pow(calcWideAngleBonus(lastAngle), 3))); // Penalize wide angles if they're repeated, reducing the penalty as the lastAngle gets more acute.
|
||||||
acuteAngleBonus *= 0.5 + 0.5 * (1 - Math.Min(acuteAngleBonus, Math.Pow(calcAcuteAngleBonus(lastLastAngle), 3))); // Penalize acute angles if they're repeated, reducing the penalty as the lastLastAngle gets more obtuse.
|
acuteAngleBonus *= 0.5 + 0.5 * (1 - Math.Min(acuteAngleBonus, Math.Pow(calcAcuteAngleBonus(lastLastAngle), 3))); // Penalize acute angles if they're repeated, reducing the penalty as the lastLastAngle gets more obtuse.
|
||||||
|
|
||||||
angleBonus = Math.Max(acuteAngleBonus * acute_angle_multiplier, wideAngleBonus * wide_angle_multiplier); // Take the max of the multipliers.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.Max(prevVelocity, currVelocity) != 0)
|
if (Math.Max(prevVelocity, currVelocity) != 0)
|
||||||
{
|
{
|
||||||
prevVelocity = (osuLastObj.JumpDistance + osuLastObj.TravelDistance) / osuLastObj.StrainTime; // We want to use the average velocity when awarding differences, not necessarily combined.
|
prevVelocity = (osuLastObj.JumpDistance + osuLastObj.TravelDistance) / osuLastObj.StrainTime; // We want to use the average velocity over the whole object when awarding differences, not the individual jump and slider path velocities.
|
||||||
currVelocity = (osuCurrObj.JumpDistance + osuCurrObj.TravelDistance) / osuCurrObj.StrainTime;
|
currVelocity = (osuCurrObj.JumpDistance + osuCurrObj.TravelDistance) / osuCurrObj.StrainTime;
|
||||||
|
|
||||||
velChangeBonus = Math.Max(Math.Abs(prevVelocity - currVelocity) // reward for % distance slowed down compared to previous, paying attention to not award overlap
|
double distRatio = Math.Pow(Math.Sin(Math.PI / 2 * Math.Abs(prevVelocity - currVelocity) / Math.Max(prevVelocity, currVelocity)), 2); // scale with ratio of difference compared to max
|
||||||
* Math.Pow(Math.Sin(Math.PI / 2 * Math.Min(1, osuCurrObj.JumpDistance / 100)), 2) // do not award overlap
|
double overlapVelocityBuff = Math.Min(125 / Math.Min(osuCurrObj.StrainTime, osuLastObj.StrainTime), Math.Abs(prevVelocity - currVelocity)); // reward for % distance up to 125 / strainTime for overlaps where velocity is still changing.
|
||||||
* Math.Pow(Math.Sin(Math.PI / 2 * Math.Abs(prevVelocity - currVelocity) / Math.Max(prevVelocity, currVelocity)), 2), // scale with ratio of difference compared to max
|
double nonOverlapVelocityBuff = Math.Abs(prevVelocity - currVelocity) // reward for % distance slowed down compared to previous, paying attention to not award overlap
|
||||||
Math.Min(125 / Math.Min(osuCurrObj.StrainTime, osuLastObj.StrainTime), Math.Abs(prevVelocity - currVelocity)) // reward for % distance up to 125 / strainTime for overlaps where velocity is still changing.
|
* Math.Pow(Math.Sin(Math.PI / 2 * Math.Min(1, osuCurrObj.JumpDistance / 100)), 2); // do not award overlap
|
||||||
* Math.Pow(Math.Sin(Math.PI / 2 * Math.Abs(prevVelocity - currVelocity) / Math.Max(prevVelocity, currVelocity)), 2)); // scale with ratio of difference compared to max
|
|
||||||
|
velChangeBonus = Math.Max(overlapVelocityBuff, nonOverlapVelocityBuff) * distRatio; // choose larger distance, multiplied by ratio.
|
||||||
|
|
||||||
velChangeBonus *= Math.Pow(Math.Min(osuCurrObj.StrainTime, osuLastObj.StrainTime) / Math.Max(osuCurrObj.StrainTime, osuLastObj.StrainTime), 2); // penalize for rhythm changes.
|
velChangeBonus *= Math.Pow(Math.Min(osuCurrObj.StrainTime, osuLastObj.StrainTime) / Math.Max(osuCurrObj.StrainTime, osuLastObj.StrainTime), 2); // penalize for rhythm changes.
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
sliderBonus = osuCurrObj.TravelDistance / osuCurrObj.TravelTime; // add some slider rewards
|
sliderBonus = osuCurrObj.TravelDistance / osuCurrObj.TravelTime; // add some slider rewards
|
||||||
}
|
}
|
||||||
|
|
||||||
aimStrain += Math.Max(angleBonus, velChangeBonus * vel_change_multiplier); // Add in angle bonus or velchange bonus, whichever is larger.
|
aimStrain += Math.Max(acuteAngleBonus * acute_angle_multiplier, wideAngleBonus * wide_angle_multiplier + velChangeBonus * vel_change_multiplier); // Add in acute angle bonus or wide angle bonus + velchange bonus, whichever is larger.
|
||||||
aimStrain += sliderBonus * slider_multiplier; // Add in additional slider velocity.
|
aimStrain += sliderBonus * slider_multiplier; // Add in additional slider velocity.
|
||||||
|
|
||||||
return aimStrain;
|
return aimStrain;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user