fix glitches if the time is set far ahead during gameplay
This commit is contained in:
@@ -335,12 +335,12 @@ void Actor::Update( float fDeltaTime )
|
|||||||
break;
|
break;
|
||||||
case spin:
|
case spin:
|
||||||
m_current.rotation += fDeltaTime*m_vEffectMagnitude;
|
m_current.rotation += fDeltaTime*m_vEffectMagnitude;
|
||||||
if( m_current.rotation.x > 360 ) m_current.rotation.x -= 360;
|
while( m_current.rotation.x > 360 ) m_current.rotation.x -= 360;
|
||||||
if( m_current.rotation.y > 360 ) m_current.rotation.y -= 360;
|
while( m_current.rotation.y > 360 ) m_current.rotation.y -= 360;
|
||||||
if( m_current.rotation.z > 360 ) m_current.rotation.z -= 360;
|
while( m_current.rotation.z > 360 ) m_current.rotation.z -= 360;
|
||||||
if( m_current.rotation.x < -360 ) m_current.rotation.x += 360;
|
while( m_current.rotation.x < -360 ) m_current.rotation.x += 360;
|
||||||
if( m_current.rotation.y < -360 ) m_current.rotation.y += 360;
|
while( m_current.rotation.y < -360 ) m_current.rotation.y += 360;
|
||||||
if( m_current.rotation.z < -360 ) m_current.rotation.z += 360;
|
while( m_current.rotation.z < -360 ) m_current.rotation.z += 360;
|
||||||
break;
|
break;
|
||||||
case vibrate:
|
case vibrate:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user