Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color-hexed beatmaps don't translate correctly into Lazer #24270

Closed
Skubers opened this issue Jul 17, 2023 · 1 comment · Fixed by #25551
Closed

Color-hexed beatmaps don't translate correctly into Lazer #24270

Skubers opened this issue Jul 17, 2023 · 1 comment · Fixed by #25551
Assignees
Labels
area:beatmap-parsing .osu file format parsing ruleset/osu!

Comments

@Skubers
Copy link

Skubers commented Jul 17, 2023

Type

Game behaviour

Bug description

Taking my ranked mapset as an example: https://osu.ppy.sh/beatmapsets/1724593#osu/3524570

I've color-hexed the map, so that my parts are: blue, light blue, blue, light blue
and Sonnyc's parts are: pink, light pink, pink, light pink

As you can see in the second kiai, the colors are mixed.

Screenshots or videos

image
image

Version

2023.717.0-lazer

Logs

network.log
performance.log
runtime.log
updater.log
database.log
input.log
legacy-ipc.log

@bdach
Copy link
Collaborator

bdach commented Jul 17, 2023

As far as I can tell this is caused by the spinner at the start of the map. It appears that on stable spinners never increment combo index on their own (but they're eligible for offset "hax"):

                if (currHitObject.IsType(HitObjectType.Spinner))
                {
                    if (Beatmap.BeatmapVersion <= 8)
                        forceNew = true;
                    else if (currHitObject.NewCombo)
                    {
                        // make colourhax possible when the spinner has a new combo but the object after does not:
                        // the player may set colourhax on the spinner itself in this case and get carried over.
                        combo += offset;
                        forceNew = true;
                    }
                }
                else if (forceNew || (currHitObject.Type & HitObjectType.NewCombo) > 0 || //Keep bit flag intact here as it is necessary for CTB to alternate fruit color while still keeping track of combo.
                         (i == 0 && !(currHitObject is HitCircleFruits)))
                {
                    comboNumber = 1;
                    currHitObject.ComboNumber = comboNumber;
                    combo += offset + 1;
                    forceNew = false;
                }
                else
                    currHitObject.ComboNumber = ++comboNumber;

while lazer is using the much more naive

/// <summary>
/// Given the previous object in the beatmap, update relevant combo information.
/// </summary>
/// <param name="lastObj">The previous hitobject, or null if this is the first object in the beatmap.</param>
void UpdateComboInformation(IHasComboInformation? lastObj)
{
ComboIndex = lastObj?.ComboIndex ?? 0;
ComboIndexWithOffsets = lastObj?.ComboIndexWithOffsets ?? 0;
IndexInCurrentCombo = (lastObj?.IndexInCurrentCombo + 1) ?? 0;
if (NewCombo || lastObj == null)
{
IndexInCurrentCombo = 0;
ComboIndex++;
ComboIndexWithOffsets += ComboOffset + 1;
if (lastObj != null)
lastObj.LastInCombo = true;
}
}

Map in question has an NC spinner at the start and then an NC slider. This can be experimentally tested by removing NC from the second slider, as it causes the colours to come back to normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:beatmap-parsing .osu file format parsing ruleset/osu!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants