1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 01:22:54 +08:00

Don't serialize HitObject.Kiai

This commit is contained in:
smoogipoo 2017-12-07 14:42:36 +09:00
parent f5f7658e90
commit e573db04d4

View File

@ -1,6 +1,7 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using Newtonsoft.Json;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
@ -33,6 +34,7 @@ namespace osu.Game.Rulesets.Objects
/// <summary> /// <summary>
/// Whether this <see cref="HitObject"/> is in Kiai time. /// Whether this <see cref="HitObject"/> is in Kiai time.
/// </summary> /// </summary>
[JsonIgnore]
public bool Kiai { get; private set; } public bool Kiai { get; private set; }
/// <summary> /// <summary>
@ -45,7 +47,7 @@ namespace osu.Game.Rulesets.Objects
SoundControlPoint soundPoint = controlPointInfo.SoundPointAt(StartTime); SoundControlPoint soundPoint = controlPointInfo.SoundPointAt(StartTime);
EffectControlPoint effectPoint = controlPointInfo.EffectPointAt(StartTime); EffectControlPoint effectPoint = controlPointInfo.EffectPointAt(StartTime);
Kiai |= effectPoint.KiaiMode; Kiai = effectPoint.KiaiMode;
// Initialize first sample // Initialize first sample
Samples.ForEach(s => s.ControlPoint = soundPoint); Samples.ForEach(s => s.ControlPoint = soundPoint);