mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Fix melee weapons damage.
This commit is contained in:
parent
e4987d2891
commit
4e85533681
@ -262,7 +262,14 @@ int CBeamKatana::Swing( int fFirst )
|
||||
|
||||
ClearMultiDamage( );
|
||||
|
||||
if ( (m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() )
|
||||
// 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.plrDmgBeamKatana, gpGlobals->v_forward, &tr, DMG_CLUB );
|
||||
|
@ -279,7 +279,14 @@ int CFOTN::Swing( int fFirst )
|
||||
|
||||
ClearMultiDamage( );
|
||||
|
||||
if ( (m_flNextPrimaryAttack + 1 < UTIL_WeaponTimeBase() ) || g_pGameRules->IsMultiplayer() )
|
||||
// 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.plrDmgFOTN, gpGlobals->v_forward, &tr, DMG_CLUB );
|
||||
|
Loading…
x
Reference in New Issue
Block a user