From 7113204d5133ed67975bd9220fe50b6ae8b1fda9 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Sun, 2 Jul 2017 16:42:54 +0500 Subject: [PATCH] Merge https://github.com/ValveSoftware/halflife/pull/1600/commits/8903b33ef34cbe7e33bfbaa15f5c418bf9d01a02 --- dlls/crowbar.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/crowbar.cpp b/dlls/crowbar.cpp index 00b16d57..051d2309 100644 --- a/dlls/crowbar.cpp +++ b/dlls/crowbar.cpp @@ -220,8 +220,14 @@ int CCrowbar::Swing( int fFirst ) CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit ); ClearMultiDamage(); - + // If building with the clientside weapon prediction system, + // UTIL_WeaponTimeBase() is always 0 and m_flNextPrimaryAttack is >= -1.0f, thus making + // m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() always evaluate to false. +#ifdef CLIENT_WEAPONS + if( ( m_flNextPrimaryAttack + 1 == UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) +#else if( ( m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() ) +#endif { // first swing does full damage pEntity->TraceAttack( m_pPlayer->pev, gSkillData.plrDmgCrowbar, gpGlobals->v_forward, &tr, DMG_CLUB );