Type and parsing fixes.

This commit is contained in:
teejusb
2021-10-22 18:18:15 -07:00
parent ef3b2142af
commit 547b379765
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -611,7 +611,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
else if ( EndsWith(s, "ms") ) else if ( EndsWith(s, "ms") )
{ {
// Strip off the "ms" before parsing. // Strip off the "ms" before parsing.
RString ms_value = s.substr( s.size()-2 ); RString ms_value = s.substr(0, s.size()-2 );
level = StringToFloat( ms_value ); level = StringToFloat( ms_value );
} }
else if( isdigit(s[0]) || s[0] == '-' ) else if( isdigit(s[0]) || s[0] == '-' )
@@ -1141,7 +1141,7 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
} }
else if( sBit == "zbuffer" ) m_bZBuffer = on; else if( sBit == "zbuffer" ) m_bZBuffer = on;
else if( sBit == "cosecant" ) m_bCosecant = on; else if( sBit == "cosecant" ) m_bCosecant = on;
else if( sBit == "visualdelay" ) m_fVisualDelay = level * 1.0f; else if( sBit == "visualdelay" ) m_fVisualDelay = level;
// deprecated mods/left in for compatibility // deprecated mods/left in for compatibility
else if( sBit == "converge" ) SET_FLOAT( fScrolls[SCROLL_CENTERED] ) else if( sBit == "converge" ) SET_FLOAT( fScrolls[SCROLL_CENTERED] )
// end of the list // end of the list
+1 -1
View File
@@ -396,7 +396,7 @@ public:
RString m_sNoteSkin; RString m_sNoteSkin;
/** @brief The Visual Delay additionally applied on a per-player basis in ms. */ /** @brief The Visual Delay additionally applied on a per-player basis in ms. */
int m_fVisualDelay; float m_fVisualDelay;
void NextAccel(); void NextAccel();
void NextEffect(); void NextEffect();