Fix parsing of beats vs seconds on speeds.

This commit is contained in:
Jason Felds
2011-06-04 23:44:26 -04:00
parent 0e834467ba
commit 26c5fa4e15
2 changed files with 8 additions and 4 deletions
+1
View File
@@ -13,6 +13,7 @@ StepMania 5.0 Preview 2 | 20110???
* Changed default MusicWheelSwitchSpeed to 15 (was 10). [AJ]
* [AnnouncerManager] Fixed a bug where no announcers would be loaded. [AJ]
* Restored the UserPrefAutoSetStyle behavior. [Wolfman2000]
* [NotesLoaderSMA] Better way of identifying beats and seconds. [Wolfman2000]
================================================================================
StepMania 5.0 Preview 1a | 20110603
+7 -4
View File
@@ -337,11 +337,14 @@ void SMALoader::ProcessSpeeds( TimingData &out, const int iRowsPerBeat, const RS
const float fBeat = RowToBeat( vs2[0], iRowsPerBeat );
unsigned short tmp = ( (vs2[2].find("s") || vs2[2].find("S") )
? 1 : 0);
RString backup = vs2[2];
Trim(vs2[2], "s");
Trim(vs2[2], "S");
SpeedSegment seg(fBeat, StringToFloat( vs2[1] ), StringToFloat(vs2[2]));
seg.SetUnit(tmp);
unsigned short tmp = ((backup != vs2[2]) ? 1 : 0);
SpeedSegment seg(fBeat, StringToFloat( vs2[1] ), StringToFloat(vs2[2]), tmp);
//seg.SetUnit(tmp);
if( fBeat < 0 )
{