From 31a718537dcc076a46042543ca0ce64971f3bab8 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sun, 5 Jul 2020 23:14:39 +0500 Subject: [PATCH] double-promotion fixes. --- dlls/crowbar.cpp | 2 +- dlls/glock.cpp | 2 +- dlls/shotgun.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index 707398a3..10dcce87 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -210,7 +210,7 @@ int CCrowbar::Swing( int fFirst ) EMIT_SOUND_DYN( ENT( m_pPlayer->pev ), CHAN_WEAPON, "weapons/cbar_miss1.wav", 1, ATTN_NORM, 0, 94 + RANDOM_LONG( 0, 0xF ) ); - m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5; + m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.5f; // player "shoot" animation m_pPlayer->SetAnimation( PLAYER_ATTACK1 ); diff --git a/dlls/glock.cpp b/dlls/glock.cpp index d863f3fb..bcba6ba9 100644 --- a/dlls/glock.cpp +++ b/dlls/glock.cpp @@ -115,7 +115,7 @@ void CGlock::Holster( int skiplocal /*= 0*/ ) { m_fInReload = FALSE;// cancel any reload in progress. - m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5; + m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 0.5f; SendWeaponAnim( GLOCK_HOLSTER ); m_fInAttack = 0; diff --git a/dlls/shotgun.cpp b/dlls/shotgun.cpp index 7210e752..abc333e2 100644 --- a/dlls/shotgun.cpp +++ b/dlls/shotgun.cpp @@ -177,7 +177,7 @@ void CShotgun::PrimaryAttack() // HEV suit - indicate out of ammo condition m_pPlayer->SetSuitUpdate( "!HEV_AMO0", FALSE, 0 ); - m_flPumpTime = gpGlobals->time + 0.5; + m_flPumpTime = gpGlobals->time + 0.5f; m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.75f; m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.75f;