diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 88cc760eaf..6dc057dfb3 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -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 diff --git a/src/NotesLoaderSMA.cpp b/src/NotesLoaderSMA.cpp index 449f5d7b29..c902b1f103 100644 --- a/src/NotesLoaderSMA.cpp +++ b/src/NotesLoaderSMA.cpp @@ -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 ) {