ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.32k stars 2.28k forks source link

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

Closed Skubers closed 11 months ago

Skubers commented 1 year ago

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 commented 1 year ago

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

https://github.com/ppy/osu/blob/88ac53557a328b3e149b6392752fb5884107f374/osu.Game/Rulesets/Objects/Types/IHasComboInformation.cs#L67-L86

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.