mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-09 21:44:15 +00:00
Double promotion fixes.
This commit is contained in:
parent
530a1b6695
commit
a9169ed3e4
@ -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)
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -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 )
|
||||
{
|
||||
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 )
|
||||
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…
x
Reference in New Issue
Block a user