mirror of
https://github.com/ppy/osu
synced 2025-02-15 17:47:28 +00:00
Marked target mod and traceable mod as incompatible; extracted playfield clamping logic
Nothing is visible when target mod and traceable mod are enabled together.
This commit is contained in:
parent
b09165a074
commit
c867940584
@ -40,6 +40,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override string Description => @"Practice keeping up with the beat of the song.";
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModTraceable) };
|
||||
|
||||
[SettingSource("Seed", "Use a custom seed instead of a random one", SettingControlType = typeof(SeedSettingsControl))]
|
||||
public Bindable<int?> Seed { get; } = new Bindable<int?>
|
||||
{
|
||||
@ -319,19 +321,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
var newPosition = Vector2.Add(lastPos, relativePos);
|
||||
|
||||
var radius = (float)obj.Radius;
|
||||
|
||||
if (newPosition.Y < radius)
|
||||
newPosition.Y = radius;
|
||||
else if (newPosition.Y > OsuPlayfield.BASE_SIZE.Y - radius)
|
||||
newPosition.Y = OsuPlayfield.BASE_SIZE.Y - radius;
|
||||
if (newPosition.X < radius)
|
||||
newPosition.X = radius;
|
||||
else if (newPosition.X > OsuPlayfield.BASE_SIZE.X - radius)
|
||||
newPosition.X = OsuPlayfield.BASE_SIZE.X - radius;
|
||||
|
||||
obj.Position = newPosition;
|
||||
|
||||
clampToPlayfield(obj);
|
||||
|
||||
tryCount++;
|
||||
if (tryCount % 10 == 0) distance *= 0.9f;
|
||||
} while (distance >= obj.Radius * 2 && isOverlappingWithRecent(hitObjects, i));
|
||||
@ -460,6 +453,24 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
);
|
||||
}
|
||||
|
||||
private void clampToPlayfield(OsuHitObject obj)
|
||||
{
|
||||
var position = obj.Position;
|
||||
var radius = (float)obj.Radius;
|
||||
|
||||
if (position.Y < radius)
|
||||
position.Y = radius;
|
||||
else if (position.Y > OsuPlayfield.BASE_SIZE.Y - radius)
|
||||
position.Y = OsuPlayfield.BASE_SIZE.Y - radius;
|
||||
|
||||
if (position.X < radius)
|
||||
position.X = radius;
|
||||
else if (position.X > OsuPlayfield.BASE_SIZE.X - radius)
|
||||
position.X = OsuPlayfield.BASE_SIZE.X - radius;
|
||||
|
||||
obj.Position = position;
|
||||
}
|
||||
|
||||
public class TargetBeatContainer : BeatSyncedContainer
|
||||
{
|
||||
private PausableSkinnableSound sample;
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
public override string Description => "Put your faith in the approach circles...";
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModHidden), typeof(OsuModSpinIn), typeof(OsuModObjectScaleTween) };
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModHidden), typeof(OsuModSpinIn), typeof(OsuModObjectScaleTween), typeof(OsuModTarget) };
|
||||
|
||||
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user