some optimizations

This commit is contained in:
Eduardo Bart
2012-06-02 11:43:27 -03:00
parent 4c143f4a33
commit 1c5b906b5b
24 changed files with 120 additions and 105 deletions

View File

@@ -114,7 +114,7 @@ void SoundSource::setVelocity(const Point& velocity)
void SoundSource::setFading(FadeState state, float fadeTime)
{
float now = g_clock.time();
float now = g_clock.seconds();
if(m_fadeState != NoFading) {
float elapsed = now - m_fadeStartTime;
float add;
@@ -132,7 +132,7 @@ void SoundSource::setFading(FadeState state, float fadeTime)
void SoundSource::update()
{
float now = g_clock.time();
float now = g_clock.seconds();
if(m_fadeState == FadingOn) {
float elapsed = now - m_fadeStartTime;
if(elapsed >= m_fadeTime) {