Preserve speed segment length time on beats.

This commit is contained in:
Jason Felds
2011-06-27 14:24:55 -04:00
parent 046acb2836
commit 0919debf33
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -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
----------
+6 -1
View File
@@ -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 );