Removed the High Speed and medium speed nonsense as there's no need. Just pack into one DefaultSpeed.

This commit is contained in:
Jake Huxell 2016-09-17 19:22:53 +01:00
parent 75be0895d6
commit 0837d05cfd
2 changed files with 7 additions and 9 deletions

View File

@ -16,15 +16,14 @@
// ---------------------------------------------------
const uint32_t CSpeedLimiter::m_HighSpeed = 60;
const uint32_t CSpeedLimiter::m_MediumSpeed = 15;
const uint32_t CSpeedLimiter::m_DefaultSpeed = 60;
// ---------------------------------------------------
CSpeedLimiter::CSpeedLimiter() :
m_Frames(0),
m_Speed(m_HighSpeed),
m_BaseSpeed(m_HighSpeed)
m_Speed(m_DefaultSpeed),
m_BaseSpeed(m_DefaultSpeed)
{
}
@ -87,11 +86,11 @@ void CSpeedLimiter::AlterSpeed( const ESpeedChange SpeedChange )
int32_t SpeedFactor = 1;
if (SpeedChange == DECREASE_SPEED) { SpeedFactor = -1; }
if (m_Speed >= m_HighSpeed)
if (m_Speed >= m_DefaultSpeed)
{
m_Speed += 10 * SpeedFactor;
}
else if (m_Speed >= m_MediumSpeed)
else if (m_Speed >= 15)
{
m_Speed += 5 * SpeedFactor;
}
@ -102,4 +101,4 @@ void CSpeedLimiter::AlterSpeed( const ESpeedChange SpeedChange )
SpeedChanged(m_Speed);
FixSpeedRatio();
}
}

View File

@ -38,6 +38,5 @@ private:
uint32_t m_Speed, m_BaseSpeed, m_Frames, m_MicroSecondsPerFrame;
static const uint32_t m_HighSpeed;
static const uint32_t m_MediumSpeed;
static const uint32_t m_DefaultSpeed;
};