Browse Source

Fix melee weapons damage.

half-screwed
Andrey Akhmichin 2 years ago
parent
commit
4e85533681
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 7
      dlls/hs/beamkatana.cpp
  2. 7
      dlls/hs/fotns.cpp

7
dlls/hs/beamkatana.cpp

@ -262,7 +262,14 @@ int CBeamKatana::Swing( int fFirst ) @@ -262,7 +262,14 @@ int CBeamKatana::Swing( int fFirst )
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.plrDmgBeamKatana, gpGlobals->v_forward, &tr, DMG_CLUB );

7
dlls/hs/fotns.cpp

@ -279,7 +279,14 @@ int CFOTN::Swing( int fFirst ) @@ -279,7 +279,14 @@ int CFOTN::Swing( int fFirst )
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.plrDmgFOTN, gpGlobals->v_forward, &tr, DMG_CLUB );

Loading…
Cancel
Save