Fix the crowbar damage always being calculated halved.

Resolves ValveSoftware/halflife#1600
This commit is contained in:
Sam V 2021-12-25 15:56:42 +01:00
parent d9410e2989
commit fe8a54065c
3 changed files with 4 additions and 4 deletions

View file

@ -823,9 +823,9 @@ void HUD_WeaponsPostThink(local_state_s* from, local_state_s* to, usercmd_t* cmd
pto->m_fNextAimBonus = -1.0;
}
if (pto->m_flNextPrimaryAttack < -1.0)
if (pto->m_flNextPrimaryAttack < -1.1)
{
pto->m_flNextPrimaryAttack = -1.0;
pto->m_flNextPrimaryAttack = -1.1;
}
if (pto->m_flNextSecondaryAttack < -0.001)

View file

@ -2600,7 +2600,7 @@ pt_end:
if (gun && gun->UseDecrement())
{
gun->m_flNextPrimaryAttack = V_max(gun->m_flNextPrimaryAttack - gpGlobals->frametime, -1.0);
gun->m_flNextPrimaryAttack = V_max(gun->m_flNextPrimaryAttack - gpGlobals->frametime, -1.1);
gun->m_flNextSecondaryAttack = V_max(gun->m_flNextSecondaryAttack - gpGlobals->frametime, -0.001);
if (gun->m_flTimeWeaponIdle != 1000)

View file

@ -995,7 +995,7 @@ void CBasePlayerWeapon::RetireWeapon()
//=========================================================================
float CBasePlayerWeapon::GetNextAttackDelay(float delay)
{
if (m_flLastFireTime == 0 || m_flNextPrimaryAttack == -1)
if (m_flLastFireTime == 0 || m_flNextPrimaryAttack <= -1.1)
{
// At this point, we are assuming that the client has stopped firing
// and we are going to reset our book keeping variables.