mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Merge branch 'master' into difficulty-icon-tooltip
This commit is contained in:
@ -44,9 +44,12 @@ namespace osu.Game.Rulesets.Catch.Replays
|
|||||||
double timeAvailable = h.StartTime - lastTime;
|
double timeAvailable = h.StartTime - lastTime;
|
||||||
|
|
||||||
// So we can either make it there without a dash or not.
|
// So we can either make it there without a dash or not.
|
||||||
double speedRequired = positionChange / timeAvailable;
|
// If positionChange is 0, we don't need to move, so speedRequired should also be 0 (could be NaN if timeAvailable is 0 too)
|
||||||
|
// The case where positionChange > 0 and timeAvailable == 0 results in PositiveInfinity which provides expected beheaviour.
|
||||||
|
double speedRequired = positionChange == 0 ? 0 : positionChange / timeAvailable;
|
||||||
|
|
||||||
bool dashRequired = speedRequired > movement_speed && h.StartTime != 0;
|
bool dashRequired = speedRequired > movement_speed;
|
||||||
|
bool impossibleJump = speedRequired > movement_speed * 2;
|
||||||
|
|
||||||
// todo: get correct catcher size, based on difficulty CS.
|
// todo: get correct catcher size, based on difficulty CS.
|
||||||
const float catcher_width_half = CatcherArea.CATCHER_SIZE / CatchPlayfield.BASE_WIDTH * 0.3f * 0.5f;
|
const float catcher_width_half = CatcherArea.CATCHER_SIZE / CatchPlayfield.BASE_WIDTH * 0.3f * 0.5f;
|
||||||
@ -59,9 +62,8 @@ namespace osu.Game.Rulesets.Catch.Replays
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h is Banana)
|
if (impossibleJump)
|
||||||
{
|
{
|
||||||
// auto bananas unrealistically warp to catch 100% combo.
|
|
||||||
Replay.Frames.Add(new CatchReplayFrame(h.StartTime, h.X));
|
Replay.Frames.Add(new CatchReplayFrame(h.StartTime, h.X));
|
||||||
}
|
}
|
||||||
else if (h.HyperDash)
|
else if (h.HyperDash)
|
||||||
|
@ -31,9 +31,9 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
public List<APIChangelogEntry> ChangelogEntries { get; set; }
|
public List<APIChangelogEntry> ChangelogEntries { get; set; }
|
||||||
|
|
||||||
[JsonProperty("versions")]
|
[JsonProperty("versions")]
|
||||||
public VersionNatigation Versions { get; set; }
|
public VersionNavigation Versions { get; set; }
|
||||||
|
|
||||||
public class VersionNatigation
|
public class VersionNavigation
|
||||||
{
|
{
|
||||||
[JsonProperty("next")]
|
[JsonProperty("next")]
|
||||||
public APIChangelogBuild Next { get; set; }
|
public APIChangelogBuild Next { get; set; }
|
||||||
|
@ -181,7 +181,7 @@ namespace osu.Game
|
|||||||
configSkin.ValueChanged += skinId => SkinManager.CurrentSkinInfo.Value = SkinManager.Query(s => s.ID == skinId.NewValue) ?? SkinInfo.Default;
|
configSkin.ValueChanged += skinId => SkinManager.CurrentSkinInfo.Value = SkinManager.Query(s => s.ID == skinId.NewValue) ?? SkinInfo.Default;
|
||||||
configSkin.TriggerChange();
|
configSkin.TriggerChange();
|
||||||
|
|
||||||
LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolumeAdjust);
|
LocalConfig.BindWith(OsuSetting.VolumeInactive, userInactiveVolume);
|
||||||
|
|
||||||
IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);
|
IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);
|
||||||
}
|
}
|
||||||
@ -686,15 +686,27 @@ namespace osu.Game
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly BindableDouble inactiveVolumeAdjust = new BindableDouble();
|
#region Inactive audio dimming
|
||||||
|
|
||||||
|
private readonly BindableDouble userInactiveVolume = new BindableDouble();
|
||||||
|
|
||||||
|
private readonly BindableDouble inactiveVolumeFade = new BindableDouble();
|
||||||
|
|
||||||
private void updateActiveState(bool isActive)
|
private void updateActiveState(bool isActive)
|
||||||
{
|
{
|
||||||
if (isActive)
|
if (isActive)
|
||||||
Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust);
|
{
|
||||||
else
|
this.TransformBindableTo(inactiveVolumeFade, 1, 500, Easing.OutQuint)
|
||||||
Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeAdjust);
|
.Finally(_ => Audio.RemoveAdjustment(AdjustableProperty.Volume, inactiveVolumeFade)); //wait for the transition to finish to remove the inactive audio adjustment
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade);
|
||||||
|
this.TransformBindableTo(inactiveVolumeFade, userInactiveVolume.Value, 1500, Easing.OutSine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public bool OnReleased(GlobalAction action) => false;
|
public bool OnReleased(GlobalAction action) => false;
|
||||||
|
|
||||||
|
@ -36,12 +36,11 @@ namespace osu.Game.Screens.Edit.Components
|
|||||||
playButton = new IconButton
|
playButton = new IconButton
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.CentreLeft,
|
||||||
Scale = new Vector2(1.4f),
|
Scale = new Vector2(1.4f),
|
||||||
IconScale = new Vector2(1.4f),
|
IconScale = new Vector2(1.4f),
|
||||||
Icon = FontAwesome.Regular.PlayCircle,
|
Icon = FontAwesome.Regular.PlayCircle,
|
||||||
Action = togglePause,
|
Action = togglePause,
|
||||||
Padding = new MarginPadding { Left = 20 }
|
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new OsuSpriteText
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user