mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Merge branch 'master' into fix-song-progress-counters
This commit is contained in:
commit
2e648a90c8
@ -1 +1 @@
|
||||
Subproject commit 8c4f23269447d9ce21a5dbd3a0fd4f6caae9ab38
|
||||
Subproject commit fac688633b8fcf34ae5d0514c26b03e217161eb4
|
@ -32,7 +32,8 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
||||
countHitCircles = Beatmap.HitObjects.Count(h => h is HitCircle);
|
||||
|
||||
beatmapMaxCombo = Beatmap.HitObjects.Count();
|
||||
beatmapMaxCombo += Beatmap.HitObjects.OfType<Slider>().Sum(s => s.NestedHitObjects.Count) + 1;
|
||||
// Add the ticks + tail of the slider. 1 is subtracted because the "headcircle" would be counted twice (once for the slider itself in the line above)
|
||||
beatmapMaxCombo += Beatmap.HitObjects.OfType<Slider>().Sum(s => s.NestedHitObjects.Count - 1);
|
||||
}
|
||||
|
||||
public override double Calculate(Dictionary<string, double> categoryRatings = null)
|
||||
@ -121,7 +122,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
||||
aimValue *= approachRateFactor;
|
||||
|
||||
if (mods.Any(h => h is OsuModHidden))
|
||||
aimValue *= 1.18f;
|
||||
aimValue *= 1.03f;
|
||||
|
||||
if (mods.Any(h => h is OsuModFlashlight))
|
||||
{
|
||||
@ -152,6 +153,9 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
||||
if (beatmapMaxCombo > 0)
|
||||
speedValue *= Math.Min(Math.Pow(scoreMaxCombo, 0.8f) / Math.Pow(beatmapMaxCombo, 0.8f), 1.0f);
|
||||
|
||||
if (mods.Any(m => m is OsuModHidden))
|
||||
speedValue *= 1.18f;
|
||||
|
||||
// Scale the speed value with accuracy _slightly_
|
||||
speedValue *= 0.5f + accuracy / 2.0f;
|
||||
// It is important to also consider accuracy difficulty when doing that
|
||||
|
@ -223,6 +223,26 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnJoystickPress(InputState state, Framework.Input.JoystickEventArgs args)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return false;
|
||||
|
||||
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state));
|
||||
finalise();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnJoystickRelease(InputState state, Framework.Input.JoystickEventArgs args)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return base.OnJoystickRelease(state, args);
|
||||
|
||||
finalise();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void finalise()
|
||||
{
|
||||
if (bindTarget != null)
|
||||
|
@ -49,18 +49,21 @@ namespace osu.Game.Rulesets.Scoring.Legacy
|
||||
score.User = new User { Username = sr.ReadString() };
|
||||
/* var localScoreChecksum = */
|
||||
sr.ReadString();
|
||||
/* score.Count300 = */
|
||||
sr.ReadUInt16();
|
||||
/* score.Count100 = */
|
||||
sr.ReadUInt16();
|
||||
/* score.Count50 = */
|
||||
sr.ReadUInt16();
|
||||
/* score.CountGeki = */
|
||||
sr.ReadUInt16();
|
||||
/* score.CountKatu = */
|
||||
sr.ReadUInt16();
|
||||
/* score.CountMiss = */
|
||||
sr.ReadUInt16();
|
||||
|
||||
var count300 = sr.ReadUInt16();
|
||||
var count100 = sr.ReadUInt16();
|
||||
var count50 = sr.ReadUInt16();
|
||||
var countGeki = sr.ReadUInt16();
|
||||
var countKatu = sr.ReadUInt16();
|
||||
var countMiss = sr.ReadUInt16();
|
||||
|
||||
score.Statistics[HitResult.Great] = count300;
|
||||
score.Statistics[HitResult.Good] = count100;
|
||||
score.Statistics[HitResult.Meh] = count50;
|
||||
score.Statistics[HitResult.Perfect] = countGeki;
|
||||
score.Statistics[HitResult.Ok] = countKatu;
|
||||
score.Statistics[HitResult.Miss] = countMiss;
|
||||
|
||||
score.TotalScore = sr.ReadInt32();
|
||||
score.MaxCombo = sr.ReadUInt16();
|
||||
/* score.Perfect = */
|
||||
@ -81,6 +84,34 @@ namespace osu.Game.Rulesets.Scoring.Legacy
|
||||
/*OnlineId =*/
|
||||
sr.ReadInt32();
|
||||
|
||||
switch (score.Ruleset.ID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
int totalHits = count50 + count100 + count300 + countMiss;
|
||||
score.Accuracy = totalHits > 0 ? (double)(count50 * 50 + count100 * 100 + count300 * 300) / (totalHits * 300) : 1;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
int totalHits = count50 + count100 + count300 + countMiss;
|
||||
score.Accuracy = totalHits > 0 ? (double)(count100 * 150 + count300 * 300) / (totalHits * 300) : 1;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
int totalHits = count50 + count100 + count300 + countMiss + countKatu;
|
||||
score.Accuracy = totalHits > 0 ? (double)(count50 + count100 + count300 ) / totalHits : 1;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
int totalHits = count50 + count100 + count300 + countMiss + countGeki + countKatu;
|
||||
score.Accuracy = totalHits > 0 ? (double)(count50 * 50 + count100 * 100 + countKatu * 200 + (count300 + countGeki) * 300) / (totalHits * 300) : 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
using (var replayInStream = new MemoryStream(compressedReplay))
|
||||
{
|
||||
byte[] properties = new byte[5];
|
||||
|
Loading…
Reference in New Issue
Block a user