Browse Source

Double promotion fixes.

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

2
cl_dll/TheGate/scope.cpp

@ -28,7 +28,7 @@ static int HUD_IsWidescreen(int iWidth, int iHeight)
{ {
float ratio = iWidth / iHeight; float ratio = iWidth / iHeight;
return (ratio >= 1.77) ? 1 : 0; return (ratio >= 1.77f) ? 1 : 0;
} }
DECLARE_MESSAGE(m_Scope, Scope) DECLARE_MESSAGE(m_Scope, Scope)

8
dlls/rpg.cpp

@ -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. // this acceleration and turning math is totally wrong, but it seems to respond well so don't change it.
float flSpeed = pev->velocity.Length(); 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 ) if( pev->waterlevel == 3 )
{ {
// go slow underwater // go slow underwater
@ -219,7 +219,7 @@ void CRpgRocket::FlyThink( void )
{ {
pev->velocity = pev->velocity.Normalize() * 300; 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 else
{ {
@ -236,7 +236,7 @@ void CRpgRocket::FlyThink( void )
pev->effects = 0; pev->effects = 0;
STOP_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav" ); 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 ) if( pev->waterlevel == 0 && pev->velocity.Length() < 1500 )
{ {
Detonate(); Detonate();

Loading…
Cancel
Save