mirror of
https://github.com/ppy/osu.git
synced 2025-03-22 22:17:46 +08:00
Fix off-by-one colour retrieval.
This commit is contained in:
parent
b72e9221fd
commit
da18e2d4f6
@ -40,7 +40,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
StartTime = time,
|
||||
Position = new Vector2(RNG.Next(0, 512), RNG.Next(0, 384)),
|
||||
NewCombo = (i + 1) % 4 == 0
|
||||
NewCombo = i % 4 == 0
|
||||
});
|
||||
|
||||
time += 500;
|
||||
|
@ -48,12 +48,12 @@ namespace osu.Game.Beatmaps.Formats
|
||||
new Color4(121,9,13, 255),
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
int i = -1;
|
||||
|
||||
foreach (HitObject h in b.HitObjects)
|
||||
{
|
||||
h.Colour = colours[i];
|
||||
if (h.NewCombo) i = (i + 1) % colours.Count;
|
||||
h.Colour = colours[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user