Changed resetspeed to use SET_FLOAT so it can be tweened to the way other mods can.

This commit is contained in:
Kyzentun
2014-02-14 22:26:03 -07:00
parent 13a4cccfb5
commit 0c9728a8a9
+10 -5
View File
@@ -368,11 +368,16 @@ bool PlayerOptions::FromOneModString( const RString &sOneMod, RString &sErrorOut
else if( sBit == "clearall" ) Init();
else if( sBit == "resetspeed" )
{
// Copied from Init.
m_fMaxScrollBPM = 0; m_SpeedfMaxScrollBPM = 1.0f;
m_fTimeSpacing = 0; m_SpeedfTimeSpacing = 1.0f;
m_fScrollSpeed = 1.0f; m_SpeedfScrollSpeed = 1.0f;
m_fScrollBPM = 200; m_SpeedfScrollBPM = 1.0f;
/* level is set to the values from Init() because all speed related
fields are being reset to initial values, and they each have different
initial values. -kyz */
level= 0;
SET_FLOAT(fMaxScrollBPM);
SET_FLOAT(fTimeSpacing);
level= 1.0f;
SET_FLOAT(fScrollSpeed);
level= 200.0f;
SET_FLOAT(fScrollBPM)
}
else if( sBit == "boost" ) SET_FLOAT( fAccels[ACCEL_BOOST] )
else if( sBit == "brake" || sBit == "land" ) SET_FLOAT( fAccels[ACCEL_BRAKE] )