mirror of
https://github.com/ppy/osu
synced 2024-12-12 01:48:49 +00:00
Fix possible invalid cast when generating mania patterns
This commit is contained in:
parent
90e1f16645
commit
2c53be7853
@ -138,8 +138,8 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
||||
Pattern newPattern = conversion.Generate();
|
||||
lastPattern = newPattern;
|
||||
|
||||
var stairPatternGenerator = (HitObjectPatternGenerator)conversion;
|
||||
lastStair = stairPatternGenerator.StairType;
|
||||
var stairPatternGenerator = conversion as HitObjectPatternGenerator;
|
||||
lastStair = stairPatternGenerator?.StairType ?? lastStair;
|
||||
|
||||
return newPattern.HitObjects;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user