From 0919debf3306cfdee486191d1b158c0eceadceed Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Mon, 27 Jun 2011 14:24:55 -0400 Subject: [PATCH] Preserve speed segment length time on beats. --- Docs/Changelog_sm5.txt | 2 ++ src/TimingData.cpp | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index ba9638fb85..00067dc2d1 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -13,6 +13,8 @@ StepMania 5.0 Preview 2 | 201106?? * [Steps] Make sure #ATTACKS are copied when requested. [Wolfman2000] * [ScreenEdit] Have Step Author up front instead of Chart Style. This is probably going to be better overall. [Wolfman2000] +* [TimingData] Preserve the length of time for Speed Segment scaling when using + beats. [Wolfman2000] 2011/06/26 ---------- diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 5e1644b5fa..8b9bdf9531 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -1332,7 +1332,12 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool m_LabelSegments[i].Scale( iStartIndex, length, newLength ); for ( unsigned i = 0; i < m_SpeedSegments.size(); i++ ) - m_SpeedSegments[i].Scale( iStartIndex, length, newLength ); + { + SpeedSegment &s = m_SpeedSegments[i]; + s.Scale( iStartIndex, length, newLength ); + if (s.GetUnit() == 0) // beats + s.SetLength(s.GetLength() * fScale); + } for( unsigned i = 0; i < m_FakeSegments.size(); i++ ) m_FakeSegments[i].Scale( iStartIndex, length, newLength );