Browse Source

Double promotion fixes.

thegate
Andrey Akhmichin 5 years ago
parent
commit
a9169ed3e4
  1. 4
      cl_dll/TheGate/scope.cpp
  2. 8
      dlls/rpg.cpp

4
cl_dll/TheGate/scope.cpp

@ -28,7 +28,7 @@ static int HUD_IsWidescreen(int iWidth, int iHeight) @@ -28,7 +28,7 @@ static int HUD_IsWidescreen(int iWidth, int iHeight)
{
float ratio = iWidth / iHeight;
return (ratio >= 1.77) ? 1 : 0;
return (ratio >= 1.77f) ? 1 : 0;
}
DECLARE_MESSAGE(m_Scope, Scope)
@ -285,4 +285,4 @@ int CHudScope::MsgFunc_Scope(const char *pszName, int iSize, void *pbuf) @@ -285,4 +285,4 @@ int CHudScope::MsgFunc_Scope(const char *pszName, int iSize, void *pbuf)
}
return 1;
}
}

8
dlls/rpg.cpp

@ -209,9 +209,9 @@ void CRpgRocket::FlyThink( void ) @@ -209,9 +209,9 @@ void CRpgRocket::FlyThink( void )
// this acceleration and turning math is totally wrong, but it seems to respond well so don't change it.
float flSpeed = pev->velocity.Length();
if( gpGlobals->time - m_flIgniteTime < 1.0 )
if( gpGlobals->time - m_flIgniteTime < 1.0f )
{
pev->velocity = pev->velocity * 0.2 + vecTarget * ( flSpeed * 0.8 + 400 );
pev->velocity = pev->velocity * 0.2f + vecTarget * ( flSpeed * 0.8f + 400.0f );
if( pev->waterlevel == 3 )
{
// go slow underwater
@ -219,7 +219,7 @@ void CRpgRocket::FlyThink( void ) @@ -219,7 +219,7 @@ void CRpgRocket::FlyThink( void )
{
pev->velocity = pev->velocity.Normalize() * 300;
}
UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1, pev->origin, 4 );
UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1f, pev->origin, 4 );
}
else
{
@ -236,7 +236,7 @@ void CRpgRocket::FlyThink( void ) @@ -236,7 +236,7 @@ void CRpgRocket::FlyThink( void )
pev->effects = 0;
STOP_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav" );
}
pev->velocity = pev->velocity * 0.2 + vecTarget * flSpeed * 0.798;
pev->velocity = pev->velocity * 0.2f + vecTarget * flSpeed * 0.798f;
if( pev->waterlevel == 0 && pev->velocity.Length() < 1500 )
{
Detonate();

Loading…
Cancel
Save