BeatmapConverter
does not clone hit objects if they are already concrete
#30818
Labels
BeatmapConverter
does not clone hit objects if they are already concrete
#30818
Note that this issue only affects tests, but I'm opening it because it's totally not what I expect a
BeatmapConverter
to do.This first came up in #30731 which adds a mod that modifies the states of the beatmap's hit objects, and as per #30731 (comment), a bug occurred in the mod's test scene wherein the beatmap is affected indefinitely, and running the test a second time applies the mod on the beatmap after the mod was already applied on it, and the test fails due to that.
This is happening because of this specific conditional in
BeatmapConverter
:osu/osu.Game/Beatmaps/BeatmapConverter.cs
Lines 86 to 90 in b33e54d
Since the beatmap written in the tests had the hit object specs in their concrete types already (
TaikoHitObject
s), the beatmap converter was passing them verbatim to the "playable beatmap" where the mod is applied, rather than recreating each one of them.This highlighted conditional above goes against the general expectations of
BeatmapConverter
, which is to produce a beatmap that is completely detached from the original one. #25467 may be related, but it's solving things at a completely higher scale, whereas this one seems to be easily applicable to the current codebase.The text was updated successfully, but these errors were encountered: