Browse Source

More double promotion fixes.

half-secret
Andrey Akhmichin 5 years ago
parent
commit
73397679c2
  1. 4
      cl_dll/MOTD.cpp
  2. 2
      cl_dll/ammo.cpp
  3. 2
      cl_dll/ammo_secondary.cpp
  4. 2
      cl_dll/battery.cpp
  5. 2
      cl_dll/health.cpp
  6. 14
      cl_dll/hl/hl_weapons.cpp
  7. 6
      cl_dll/scoreboard.cpp
  8. 2
      dlls/apache.cpp
  9. 2
      dlls/ggrenade.cpp
  10. 4
      dlls/zombie.cpp

4
cl_dll/MOTD.cpp

@ -80,9 +80,9 @@ int CHudMOTD::Draw( float fTime ) @@ -80,9 +80,9 @@ int CHudMOTD::Draw( float fTime )
{
ypos = ROW_RANGE_MIN + 7 + scroll;
if( ypos > ROW_RANGE_MIN + 4 )
scroll-= ( ypos - ( ROW_RANGE_MIN + 4 ) ) / 3.0;
scroll-= ( ypos - ( ROW_RANGE_MIN + 4 ) ) / 3.0f;
if( ypos + height < ROW_RANGE_MAX )
scroll+= ( ROW_RANGE_MAX - ( ypos + height ) ) / 3.0;
scroll+= ( ROW_RANGE_MAX - ( ypos + height ) ) / 3.0f;
ypos_r = ROW_RANGE_MIN;
height = ROW_RANGE_MAX;
}

2
cl_dll/ammo.cpp

@ -864,7 +864,7 @@ int CHudAmmo::Draw( float flTime ) @@ -864,7 +864,7 @@ int CHudAmmo::Draw( float flTime )
a = (int)Q_max( MIN_ALPHA, m_fFade );
if( m_fFade > 0 )
m_fFade -= ( gHUD.m_flTimeDelta * 20 );
m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f );
UnpackRGB( r, g, b, RGB_YELLOWISH );

2
cl_dll/ammo_secondary.cpp

@ -63,7 +63,7 @@ int CHudAmmoSecondary::Draw( float flTime ) @@ -63,7 +63,7 @@ int CHudAmmoSecondary::Draw( float flTime )
UnpackRGB( r, g, b, RGB_YELLOWISH );
a = (int)Q_max( MIN_ALPHA, m_fFade );
if( m_fFade > 0 )
m_fFade -= ( gHUD.m_flTimeDelta * 20 ); // slowly lower alpha to fade out icons
m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f ); // slowly lower alpha to fade out icons
ScaleColors( r, g, b, a );
AmmoWidth = gHUD.GetSpriteRect( gHUD.m_HUD_number_0 ).right - gHUD.GetSpriteRect( gHUD.m_HUD_number_0 ).left;

2
cl_dll/battery.cpp

@ -91,7 +91,7 @@ int CHudBattery::Draw( float flTime ) @@ -91,7 +91,7 @@ int CHudBattery::Draw( float flTime )
if( m_fFade > FADE_TIME )
m_fFade = FADE_TIME;
m_fFade -= ( gHUD.m_flTimeDelta * 20 );
m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f );
if( m_fFade <= 0 )
{
a = 128;

2
cl_dll/health.cpp

@ -191,7 +191,7 @@ int CHudHealth::Draw( float flTime ) @@ -191,7 +191,7 @@ int CHudHealth::Draw( float flTime )
// Has health changed? Flash the health #
if( m_fFade )
{
m_fFade -= ( gHUD.m_flTimeDelta * 20 );
m_fFade -= ( (float)gHUD.m_flTimeDelta * 20.0f );
if( m_fFade <= 0 )
{
a = MIN_ALPHA;

14
cl_dll/hl/hl_weapons.cpp

@ -163,7 +163,7 @@ BOOL CBasePlayerWeapon::DefaultReload( int iClipSize, int iAnim, float fDelay, i @@ -163,7 +163,7 @@ BOOL CBasePlayerWeapon::DefaultReload( int iClipSize, int iAnim, float fDelay, i
m_fInReload = TRUE;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3;
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 3.0f;
return TRUE;
}
@ -944,12 +944,12 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm @@ -944,12 +944,12 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
pto->iuser3 = pCurrent->m_fireState;
// Decrement weapon counters, server does this at same time ( during post think, after doing everything else )
pto->m_flNextReload -= cmd->msec / 1000.0;
pto->m_fNextAimBonus -= cmd->msec / 1000.0;
pto->m_flNextPrimaryAttack -= cmd->msec / 1000.0;
pto->m_flNextSecondaryAttack -= cmd->msec / 1000.0;
pto->m_flTimeWeaponIdle -= cmd->msec / 1000.0;
pto->fuser1 -= cmd->msec / 1000.0;
pto->m_flNextReload -= cmd->msec / 1000.0f;
pto->m_fNextAimBonus -= cmd->msec / 1000.0f;
pto->m_flNextPrimaryAttack -= cmd->msec / 1000.0f;
pto->m_flNextSecondaryAttack -= cmd->msec / 1000.0f;
pto->m_flTimeWeaponIdle -= cmd->msec / 1000.0f;
pto->fuser1 -= cmd->msec / 1000.0f;
to->client.vuser3[2] = pCurrent->m_iSecondaryAmmoType;
to->client.vuser4[0] = pCurrent->m_iPrimaryAmmoType;

6
cl_dll/scoreboard.cpp

@ -171,12 +171,12 @@ int CHudScoreboard::Draw( float fTime ) @@ -171,12 +171,12 @@ int CHudScoreboard::Draw( float fTime )
DrawUtfString( PL_RANGE_MAX + xpos_rel - 35, ypos, ScreenWidth, "pkt loss", 255, 140, 0 );
}
list_slot += 1.2;
list_slot += 1.2f;
ypos = ROW_RANGE_MIN + ( list_slot * ROW_GAP );
// xpos = NAME_RANGE_MIN + xpos_rel;
FillRGBA( xpos - 4, ypos, FAR_RIGHT -2, 1, 255, 140, 0, 255 ); // draw the seperator line
list_slot += 0.8;
list_slot += 0.8f;
if( !gHUD.m_Teamplay )
{
@ -328,7 +328,7 @@ int CHudScoreboard::Draw( float fTime ) @@ -328,7 +328,7 @@ int CHudScoreboard::Draw( float fTime )
}
// draw all the players who are not in a team
list_slot += 0.5;
list_slot += 0.5f;
DrawPlayers( xpos_rel, list_slot, 0, "" );
return 1;

2
dlls/apache.cpp

@ -668,7 +668,7 @@ void CApache::Flight( void ) @@ -668,7 +668,7 @@ void CApache::Flight( void )
{
// ALERT( at_console, "F " );
// lean forward
pev->avelocity.x -= 12.0;
pev->avelocity.x -= 12.0f;
}
else if( flDist < 0.0f && flSpeed > -50.0f && pev->angles.x + pev->avelocity.x < 20.0f )
{

2
dlls/ggrenade.cpp

@ -243,7 +243,7 @@ void CGrenade::BounceTouch( CBaseEntity *pOther ) @@ -243,7 +243,7 @@ void CGrenade::BounceTouch( CBaseEntity *pOther )
// or thrown very far tend to slow down too quickly for me to always catch just by testing velocity.
// trimming the Z velocity a bit seems to help quite a bit.
vecTestVelocity = pev->velocity;
vecTestVelocity.z *= 0.45;
vecTestVelocity.z *= 0.45f;
if( !m_fRegisteredSound && vecTestVelocity.Length() <= 60 )
{

4
dlls/zombie.cpp

@ -136,11 +136,11 @@ int CZombie::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float @@ -136,11 +136,11 @@ int CZombie::TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float
// Take 30% damage from bullets
if( bitsDamageType == DMG_BULLET )
{
Vector vecDir = pev->origin - (pevInflictor->absmin + pevInflictor->absmax) * 0.5;
Vector vecDir = pev->origin - ( pevInflictor->absmin + pevInflictor->absmax ) * 0.5f;
vecDir = vecDir.Normalize();
float flForce = DamageForce( flDamage );
pev->velocity = pev->velocity + vecDir * flForce;
flDamage *= 0.3;
flDamage *= 0.3f;
}
// HACK HACK -- until we fix this.

Loading…
Cancel
Save