From 3164c97623397c024e632869c4523a47d6956230 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sat, 11 Jan 2020 02:22:24 +0500 Subject: [PATCH] Double promotion fixes. --- cl_dll/ev_hldm.cpp | 4 ++-- dlls/aomdc/axe.cpp | 16 ++++++++-------- dlls/aomdc/baddavid.cpp | 4 ++-- dlls/aomdc/beretta.cpp | 2 +- dlls/aomdc/deagle.cpp | 5 ++--- dlls/aomdc/glock.cpp | 2 +- dlls/aomdc/gmgeneral.cpp | 8 ++++---- dlls/aomdc/hammer.cpp | 12 ++++++------ dlls/aomdc/knife.cpp | 22 +++++++++++----------- dlls/aomdc/mp5k.cpp | 12 ++++++------ dlls/aomdc/p228.cpp | 2 +- dlls/aomdc/spear.cpp | 20 ++++++++++---------- dlls/aomdc/uzi.cpp | 10 +++++----- dlls/aomdc/wheelchair.cpp | 2 +- dlls/bmodels.cpp | 4 ++-- dlls/buttons.cpp | 4 ++-- dlls/items.cpp | 2 +- dlls/scripted.cpp | 2 +- dlls/shotgun.cpp | 2 +- 19 files changed, 67 insertions(+), 68 deletions(-) diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index b78b05c8..43f27b96 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -473,9 +473,9 @@ void EV_TrainPitchAdjust( event_args_t *args ) us_params = (unsigned short)args->iparam1; stop = args->bparam1; - m_flVolume = (float)( us_params & 0x003f ) / 40.0; + m_flVolume = (float)( us_params & 0x003f ) / 40.0f; noise = (int)( ( ( us_params ) >> 12 ) & 0x0007 ); - pitch = (int)( 10.0 * (float)( ( us_params >> 6 ) & 0x003f ) ); + pitch = (int)( 10.0f * (float)( ( us_params >> 6 ) & 0x003f ) ); switch( noise ) { diff --git a/dlls/aomdc/axe.cpp b/dlls/aomdc/axe.cpp index 8ee10776..8745d06f 100644 --- a/dlls/aomdc/axe.cpp +++ b/dlls/aomdc/axe.cpp @@ -107,7 +107,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecHullEnd = vecSrc + ((vecHullEnd - vecSrc)*2); UTIL_TraceLine( vecSrc, vecHullEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { tr = tmpTrace; return; @@ -124,7 +124,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecEnd.z = vecHullEnd.z + minmaxs[k][2]; UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { float thisDistance = (tmpTrace.vecEndPos - vecSrc).Length(); if ( thisDistance < distance ) @@ -176,10 +176,10 @@ int CAxe::Swing( int fFirst ) UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); #ifndef CLIENT_DLL - if ( tr.flFraction >= 1.0 ) + if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); - if ( tr.flFraction < 1.0 ) + if ( tr.flFraction < 1.0f ) { // Calculate the point of intersection of the line (or hull) and the object we hit // This is and approximation of the "best" intersection @@ -196,13 +196,13 @@ int CAxe::Swing( int fFirst ) 0.0, 0, 0.0 ); - if ( tr.flFraction >= 1.0 ) + if ( tr.flFraction >= 1.0f ) { if (fFirst) { // miss - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.9; - + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.9f; + // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); } @@ -269,7 +269,7 @@ int CAxe::Swing( int fFirst ) m_pPlayer->m_iWeaponVolume = flVol * CROWBAR_WALLHIT_VOLUME; - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.9; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.9f; SetThink(&CAxe:: Smack ); SetNextThink( 0.2 ); diff --git a/dlls/aomdc/baddavid.cpp b/dlls/aomdc/baddavid.cpp index d0f7399b..d2351be0 100644 --- a/dlls/aomdc/baddavid.cpp +++ b/dlls/aomdc/baddavid.cpp @@ -24,7 +24,7 @@ #define BADDAVID_AE_ATTACK 1 #define BADDAVID_AE_FLINCH 1013 -#define BADDAVID_FLINCH_DELAY 15.0 +#define BADDAVID_FLINCH_DELAY 15.0f #define BADDAVID_HEALTH 1800 #define SF_NOELECTROCUTE ( 1 << 5 ) @@ -428,7 +428,7 @@ LINK_ENTITY_TO_CLASS( lightning_effect_boss, CLightningEffect ) void CLightningEffect::Spawn() { SetThink( &CLightningEffect::ElectricityAttack2 ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; } void CLightningEffect::ElectricityAttack2() diff --git a/dlls/aomdc/beretta.cpp b/dlls/aomdc/beretta.cpp index 7cc3d7b1..46f651b1 100644 --- a/dlls/aomdc/beretta.cpp +++ b/dlls/aomdc/beretta.cpp @@ -113,7 +113,7 @@ void CBeretta::PrimaryAttack( void ) if( m_iClip <= 0 || (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) ) { PlayEmptySound(); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } diff --git a/dlls/aomdc/deagle.cpp b/dlls/aomdc/deagle.cpp index 617083e6..baea25d3 100644 --- a/dlls/aomdc/deagle.cpp +++ b/dlls/aomdc/deagle.cpp @@ -102,13 +102,12 @@ BOOL CDeagle::Deploy( ) void CDeagle::PrimaryAttack( void ) { - float flSpread = 0.01; - + float flSpread = 0.01f; if ( m_iClip <= 0 || (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) ) { PlayEmptySound(); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } diff --git a/dlls/aomdc/glock.cpp b/dlls/aomdc/glock.cpp index 8db5f867..d1b865a8 100644 --- a/dlls/aomdc/glock.cpp +++ b/dlls/aomdc/glock.cpp @@ -126,7 +126,7 @@ void CGlock::GlockFire( float flSpread, float flCycleTime, BOOL fUseBurst ) if( m_iClip <= 0 || (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) ) { PlayEmptySound(); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } diff --git a/dlls/aomdc/gmgeneral.cpp b/dlls/aomdc/gmgeneral.cpp index d78a17bd..1baf7344 100644 --- a/dlls/aomdc/gmgeneral.cpp +++ b/dlls/aomdc/gmgeneral.cpp @@ -117,7 +117,7 @@ void CGMGeneral::PrimaryAttack() if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) { PlayEmptySound( ); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } @@ -142,10 +142,10 @@ void CGMGeneral::PrimaryAttack() PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usGMGeneral, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.07; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.07f; if ( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() ) - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.07; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.07f; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); } @@ -164,7 +164,7 @@ void CGMGeneral::SecondaryAttack() } EMIT_SOUND(ENT(pev), CHAN_ITEM, "gmgeneral/gm_fov.wav", 1, ATTN_NORM); - m_flNextPrimaryAttack = m_flNextSecondaryAttack = 0.4; + m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.4f; } void CGMGeneral::Reload( void ) diff --git a/dlls/aomdc/hammer.cpp b/dlls/aomdc/hammer.cpp index 978458cf..f402270b 100644 --- a/dlls/aomdc/hammer.cpp +++ b/dlls/aomdc/hammer.cpp @@ -107,7 +107,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecHullEnd = vecSrc + ((vecHullEnd - vecSrc)*2); UTIL_TraceLine( vecSrc, vecHullEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { tr = tmpTrace; return; @@ -124,7 +124,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecEnd.z = vecHullEnd.z + minmaxs[k][2]; UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { float thisDistance = (tmpTrace.vecEndPos - vecSrc).Length(); if ( thisDistance < distance ) @@ -145,7 +145,7 @@ void CHammer::PrimaryAttack() SendWeaponAnim( HAMMER_WHACK ); #ifndef CLIENT_DLL SetThink( &CHammer::BigWhackThink ); - pev->nextthink = gpGlobals->time + 0.45; + pev->nextthink = gpGlobals->time + 0.45f; #endif } @@ -160,10 +160,10 @@ void CHammer::BigWhackThink() UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); #ifndef CLIENT_DLL - if ( tr.flFraction >= 1.0 ) + if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); - if ( tr.flFraction < 1.0 ) + if ( tr.flFraction < 1.0f ) { // Calculate the point of intersection of the line (or hull) and the object we hit // This is and approximation of the "best" intersection @@ -178,7 +178,7 @@ void CHammer::BigWhackThink() 0.0, g_vecZero, g_vecZero, 0, 0, 0, 0.0, 0, 0.0 ); - if ( tr.flFraction < 1.0 ) + if ( tr.flFraction < 1.0f ) { // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); diff --git a/dlls/aomdc/knife.cpp b/dlls/aomdc/knife.cpp index 7ce6029d..2d5b53c7 100644 --- a/dlls/aomdc/knife.cpp +++ b/dlls/aomdc/knife.cpp @@ -100,7 +100,7 @@ BOOL CKnife::Deploy( ) void CKnife::Holster( int skiplocal /* = 0 */ ) { - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; SendWeaponAnim( KNIFE_HOLSTER ); } @@ -118,7 +118,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecHullEnd = vecSrc + ((vecHullEnd - vecSrc)*2); UTIL_TraceLine( vecSrc, vecHullEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { tr = tmpTrace; return; @@ -135,7 +135,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecEnd.z = vecHullEnd.z + minmaxs[k][2]; UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { float thisDistance = (tmpTrace.vecEndPos - vecSrc).Length(); if ( thisDistance < distance ) @@ -187,10 +187,10 @@ int CKnife::Swing( int fFirst ) UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); #ifndef CLIENT_DLL - if ( tr.flFraction >= 1.0 ) + if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); - if ( tr.flFraction < 1.0 ) + if ( tr.flFraction < 1.0f ) { // Calculate the point of intersection of the line (or hull) and the object we hit // This is and approximation of the "best" intersection @@ -207,13 +207,13 @@ int CKnife::Swing( int fFirst ) 0.0, 0, 0.0 ); - if ( tr.flFraction >= 1.0 ) + if ( tr.flFraction >= 1.0f ) { if (fFirst) { // miss - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; - + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5f; + // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); } @@ -262,7 +262,7 @@ int CKnife::Swing( int fFirst ) m_pPlayer->m_iWeaponVolume = CROWBAR_BODYHIT_VOLUME; if ( !pEntity->IsAlive() ) { - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25; //LRC: corrected half-life bug + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.25f; //LRC: corrected half-life bug return TRUE; } else @@ -304,8 +304,8 @@ int CKnife::Swing( int fFirst ) m_pPlayer->m_iWeaponVolume = flVol * CROWBAR_WALLHIT_VOLUME; - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; - + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5f; + SetThink(&CKnife:: Smack ); SetNextThink( 0.2 ); #endif diff --git a/dlls/aomdc/mp5k.cpp b/dlls/aomdc/mp5k.cpp index 36155d8d..6dc34840 100644 --- a/dlls/aomdc/mp5k.cpp +++ b/dlls/aomdc/mp5k.cpp @@ -117,14 +117,14 @@ void CMP5K::PrimaryAttack() if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) { PlayEmptySound( ); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } if (m_iClip <= 0) { PlayEmptySound(); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } @@ -143,7 +143,7 @@ void CMP5K::PrimaryAttack() Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, gSkillData.plrDmgMP5K, m_pPlayer->pev, m_pPlayer->random_seed ); - int flags; + int flags; #if defined( CLIENT_WEAPONS ) flags = FEV_NOTHOST; #else @@ -152,10 +152,10 @@ void CMP5K::PrimaryAttack() PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usMP5k, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.06; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.06f; if ( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() ) - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.06; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.06f; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); } @@ -165,7 +165,7 @@ void CMP5K::Reload( void ) if( m_pPlayer->m_rgAmmo[m_iPrimaryAmmoType] <= 0 || m_iClip == MP5K_MAX_CLIP ) return; - DefaultReload( MP5K_MAX_CLIP, MP5K_RELOAD, 3.6 ); + DefaultReload( MP5K_MAX_CLIP, MP5K_RELOAD, 3.6f ); } diff --git a/dlls/aomdc/p228.cpp b/dlls/aomdc/p228.cpp index ed82f07d..60230166 100644 --- a/dlls/aomdc/p228.cpp +++ b/dlls/aomdc/p228.cpp @@ -111,7 +111,7 @@ void CP228::PrimaryAttack( void ) if( m_iClip <= 0 || (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) ) { PlayEmptySound(); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } diff --git a/dlls/aomdc/spear.cpp b/dlls/aomdc/spear.cpp index f31beb5f..55b269dd 100644 --- a/dlls/aomdc/spear.cpp +++ b/dlls/aomdc/spear.cpp @@ -113,7 +113,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecHullEnd = vecSrc + ((vecHullEnd - vecSrc)*2); UTIL_TraceLine( vecSrc, vecHullEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { tr = tmpTrace; return; @@ -130,7 +130,7 @@ void FindHullIntersection( const Vector &vecSrc, TraceResult &tr, float *mins, f vecEnd.z = vecHullEnd.z + minmaxs[k][2]; UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, pEntity, &tmpTrace ); - if ( tmpTrace.flFraction < 1.0 ) + if ( tmpTrace.flFraction < 1.0f ) { float thisDistance = (tmpTrace.vecEndPos - vecSrc).Length(); if ( thisDistance < distance ) @@ -150,7 +150,7 @@ void CSpear::PrimaryAttack() if( FBitSet( m_pPlayer->pev->flags, FL_INWATER ) ) { SendWeaponAnim( SPEAR_ELECTROCUTE ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 2.34; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 2.34f; #ifndef CLIENT_DLL UTIL_ScreenFade( m_pPlayer, Vector( 255, 255, 255 ), 0.5, 0.0, 100, FFADE_IN ); m_pPlayer->TakeDamage(m_pPlayer->pev, m_pPlayer->pev, DAMAGE_AIM, DMG_GENERIC ); @@ -160,10 +160,10 @@ void CSpear::PrimaryAttack() else { SendWeaponAnim( SPEAR_STAB_START ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.0; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 1.0f; SetThink( &CSpear::BigSpearStab ); - pev->nextthink = gpGlobals->time + 0.3; + pev->nextthink = gpGlobals->time + 0.3f; } } @@ -182,10 +182,10 @@ void CSpear::BigSpearStab() UTIL_TraceLine( vecSrc, vecEnd, dont_ignore_monsters, ENT( m_pPlayer->pev ), &tr ); #ifndef CLIENT_DLL - if ( tr.flFraction >= 1.0 ) + if ( tr.flFraction >= 1.0f ) { UTIL_TraceHull( vecSrc, vecEnd, dont_ignore_monsters, head_hull, ENT( m_pPlayer->pev ), &tr ); - if ( tr.flFraction < 1.0 ) + if ( tr.flFraction < 1.0f ) { // Calculate the point of intersection of the line (or hull) and the object we hit // This is and approximation of the "best" intersection @@ -201,7 +201,7 @@ void CSpear::BigSpearStab() 0.0, g_vecZero, g_vecZero, 0, 0, 0, 0.0, 0, 0.0 ); - if ( tr.flFraction < 1.0 ) + if ( tr.flFraction < 1.0f ) { SendWeaponAnim( SPEAR_STAB ); @@ -220,12 +220,12 @@ void CSpear::BigSpearStab() m_pPlayer->EnableControl(FALSE); SetThink( &CSpear::UnStab ); - pev->nextthink = gpGlobals->time + 0.4; + pev->nextthink = gpGlobals->time + 0.4f; if (pEntity) { ClearMultiDamage( ); - pEntity->TraceAttack(m_pPlayer->pev, gSkillData.plrDmgKnife * 2.2, gpGlobals->v_forward, &tr, DMG_SPEAR ); + pEntity->TraceAttack(m_pPlayer->pev, gSkillData.plrDmgKnife * 2.2f, gpGlobals->v_forward, &tr, DMG_SPEAR ); ApplyMultiDamage( m_pPlayer->pev, m_pPlayer->pev ); if ( pEntity->Classify() != CLASS_NONE && pEntity->Classify() != CLASS_MACHINE ) diff --git a/dlls/aomdc/uzi.cpp b/dlls/aomdc/uzi.cpp index f94e45ff..d23f659e 100644 --- a/dlls/aomdc/uzi.cpp +++ b/dlls/aomdc/uzi.cpp @@ -114,14 +114,14 @@ void CUzi::PrimaryAttack() if (m_pPlayer->pev->waterlevel == 3 && m_pPlayer->pev->watertype > CONTENT_FLYFIELD) { PlayEmptySound( ); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } if (m_iClip <= 0) { PlayEmptySound(); - m_flNextPrimaryAttack = 0.15; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.15f; return; } @@ -140,7 +140,7 @@ void CUzi::PrimaryAttack() Vector vecAiming = m_pPlayer->GetAutoaimVector( AUTOAIM_5DEGREES ); Vector vecDir = m_pPlayer->FireBulletsPlayer( 1, vecSrc, vecAiming, VECTOR_CONE_3DEGREES, 8192, BULLET_PLAYER_MP5, 2, gSkillData.plrDmgUzi, m_pPlayer->pev, m_pPlayer->random_seed ); - int flags; + int flags; #if defined( CLIENT_WEAPONS ) flags = FEV_NOTHOST; #else @@ -149,10 +149,10 @@ void CUzi::PrimaryAttack() PLAYBACK_EVENT_FULL( flags, m_pPlayer->edict(), m_usUzi, 0.0, g_vecZero, g_vecZero, vecDir.x, vecDir.y, 0, 0, 0, 0 ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.08; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.08f; if ( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() ) - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.08; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.08f; m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 ); } diff --git a/dlls/aomdc/wheelchair.cpp b/dlls/aomdc/wheelchair.cpp index 40ef803b..17aef94e 100644 --- a/dlls/aomdc/wheelchair.cpp +++ b/dlls/aomdc/wheelchair.cpp @@ -21,7 +21,7 @@ #define WHEELCHAIR_AE_BLOODSQUIRT 1 #define WHEELCHAIR_AE_WALK 1011 -#define WHEELCHAIR_FLINCH_DELAY 5.0 +#define WHEELCHAIR_FLINCH_DELAY 5.0f class CWheelchair : public CZombie { diff --git a/dlls/bmodels.cpp b/dlls/bmodels.cpp index 335e5033..bf685c79 100644 --- a/dlls/bmodels.cpp +++ b/dlls/bmodels.cpp @@ -176,7 +176,7 @@ void CFuncLol::Spawn() { CFuncWall::Spawn(); SetThink( &CFuncLol::Lol ); - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; } void CFuncLol::Lol() @@ -196,7 +196,7 @@ void CFuncLol::Lol() ClearBits( pev->effects, EF_NODRAW ); } - pev->nextthink = gpGlobals->time + 1.0; + pev->nextthink = gpGlobals->time + 1.0f; return; } } diff --git a/dlls/buttons.cpp b/dlls/buttons.cpp index 61e01074..61d74e5e 100644 --- a/dlls/buttons.cpp +++ b/dlls/buttons.cpp @@ -218,7 +218,7 @@ void CEnvState::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use m_iState = STATE_TURN_OFF; if (pev->spawnflags & SF_ENVSTATE_DEBUG) { - ALERT(at_console,"DEBUG: env_state \"%s\" triggered; will turn off in %f seconds.\n", STRING(pev->targetname), (float)m_fTurnOffTime); + ALERT(at_console,"DEBUG: env_state \"%s\" triggered; will turn off in %f seconds.\n", STRING(pev->targetname), (double)m_fTurnOffTime); } SetNextThink( m_fTurnOffTime ); } @@ -250,7 +250,7 @@ void CEnvState::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use m_iState = STATE_TURN_ON; if (pev->spawnflags & SF_ENVSTATE_DEBUG) { - ALERT(at_console,"DEBUG: env_state \"%s\" triggered; will turn on in %f seconds.\n", STRING(pev->targetname), m_fTurnOnTime); + ALERT(at_console,"DEBUG: env_state \"%s\" triggered; will turn on in %f seconds.\n", STRING(pev->targetname), (double)m_fTurnOnTime); } SetNextThink( m_fTurnOnTime ); } diff --git a/dlls/items.cpp b/dlls/items.cpp index d081b762..ee6a0921 100644 --- a/dlls/items.cpp +++ b/dlls/items.cpp @@ -349,7 +349,7 @@ class CItemFlashlight : public CItem EMIT_SOUND( pPlayer->edict(), CHAN_ITEM, "items/gunpickup2.wav", 1, ATTN_NORM ); pPlayer->pev->weapons |= ( 1 << WEAPON_FLASHLIGHT ); - pPlayer->m_flFlashLightTime = gpGlobals->time + 0.3; // + FLASH_CHARGE_TIME; + pPlayer->m_flFlashLightTime = gpGlobals->time + 0.3f; // + FLASH_CHARGE_TIME; return TRUE; } }; diff --git a/dlls/scripted.cpp b/dlls/scripted.cpp index 83568c7f..401cb15f 100644 --- a/dlls/scripted.cpp +++ b/dlls/scripted.cpp @@ -432,7 +432,7 @@ void CCineMonster::PossessEntity( void ) pTarget->pev->effects |= EF_NOINTERP; pTarget->pev->angles.y = pev->angles.y; pTarget->m_scriptState = SCRIPT_WAIT; - m_startTime = gpGlobals->time + 1E6; + m_startTime = gpGlobals->time + (float)1E6; // UNDONE: Add a flag to do this so people can fixup physics after teleporting monsters pTarget->pev->flags &= ~FL_ONGROUND; break; diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index b99cdf13..7efc384a 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -140,7 +140,7 @@ void CShotgun::PrimaryAttack() #ifndef CLIENT_DLL SetThink( &CShotgun::LolShell ); - pev->nextthink = gpGlobals->time + 0.6; + pev->nextthink = gpGlobals->time + 0.6f; #endif m_iClip--;