mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 13:47:38 +08:00
Merge pull request #1602 from smoogipoo/fix-mania-conversion
Fix possible invalid cast when generating mania patterns
This commit is contained in:
commit
5947af13b7
@ -138,8 +138,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
Pattern newPattern = conversion.Generate();
|
Pattern newPattern = conversion.Generate();
|
||||||
lastPattern = newPattern;
|
lastPattern = newPattern;
|
||||||
|
|
||||||
var stairPatternGenerator = (HitObjectPatternGenerator)conversion;
|
var stairPatternGenerator = conversion as HitObjectPatternGenerator;
|
||||||
lastStair = stairPatternGenerator.StairType;
|
lastStair = stairPatternGenerator?.StairType ?? lastStair;
|
||||||
|
|
||||||
return newPattern.HitObjects;
|
return newPattern.HitObjects;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user