diff --git a/src/Artemis.Core/Models/Profile/Timeline.cs b/src/Artemis.Core/Models/Profile/Timeline.cs index 55ff7d3cd..de8065ca7 100644 --- a/src/Artemis.Core/Models/Profile/Timeline.cs +++ b/src/Artemis.Core/Models/Profile/Timeline.cs @@ -46,6 +46,12 @@ namespace Artemis.Core _extraTimelines = new List(); } + /// + public override string ToString() + { + return $"Progress: {Position}/{Length} - delta: {Delta}"; + } + #region Extra timelines /// @@ -95,7 +101,8 @@ namespace Artemis.Core } /// - /// Gets the cumulative delta of all calls to that took place after the last call to + /// Gets the cumulative delta of all calls to that took place after the last call to + /// /// /// Note: If this is an extra timeline is always equal to /// @@ -150,7 +157,7 @@ namespace Artemis.Core public bool IsFinished => (Position > Length || Length == TimeSpan.Zero) && !ExtraTimelines.Any(); /// - /// Gets a boolean indicating whether the timeline progress has been overridden + /// Gets a boolean indicating whether the timeline progress has been overridden /// public bool IsOverridden { get; private set; } @@ -312,14 +319,14 @@ namespace Artemis.Core Position += delta; IsOverridden = false; - if (stickToMainSegment && Position >= MainSegmentStartPosition) + if (stickToMainSegment && Position >= MainSegmentEndPosition) { // If the main segment has no length, simply stick to the start of the segment if (MainSegmentLength == TimeSpan.Zero) Position = MainSegmentStartPosition; // Ensure wrapping back around retains the delta time else - Position = MainSegmentStartPosition + TimeSpan.FromMilliseconds(Position.TotalMilliseconds % MainSegmentLength.TotalMilliseconds); + Position = MainSegmentStartPosition + TimeSpan.FromMilliseconds(delta.TotalMilliseconds % MainSegmentLength.TotalMilliseconds); } _extraTimelines.RemoveAll(t => t.IsFinished); @@ -436,12 +443,6 @@ namespace Artemis.Core } #endregion - - /// - public override string ToString() - { - return $"Progress: {Position}/{Length} - delta: {Delta}"; - } } internal enum TimelineSegment