From dc95f6d62ec9587b6fc2a0afa777095119a1c1c4 Mon Sep 17 00:00:00 2001 From: SuperCake Date: Sat, 9 May 2026 23:42:08 +0200 Subject: [PATCH 1/2] fix(attack): notify if flamer has no ammo after secondary attack Just mimic behavior from primary attack --- src/game/shared/swarm/asw_weapon_flamer_shared.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/shared/swarm/asw_weapon_flamer_shared.cpp b/src/game/shared/swarm/asw_weapon_flamer_shared.cpp index 0ad02d2b5..b75ab3d8f 100644 --- a/src/game/shared/swarm/asw_weapon_flamer_shared.cpp +++ b/src/game/shared/swarm/asw_weapon_flamer_shared.cpp @@ -407,6 +407,7 @@ void CASW_Weapon_Flamer::SecondaryAttack( void ) { // decrement ammo m_iClip1 -= 2; + NotifyIfNoneClip1Ammo( pMarine ); } } if (!rd_flamer_infinite_extinguisher.GetBool() || m_iClip1 > 0) // only force the fire wait time if we have ammo for another shot From 1661414cee96366273309ae4dc8855d759a30409 Mon Sep 17 00:00:00 2001 From: SuperCake Date: Sun, 10 May 2026 00:00:49 +0200 Subject: [PATCH 2/2] fix(attack): notify if tesla gun has no ammo after any attack Should check ammo amount after it was decreased --- src/game/shared/swarm/asw_weapon_tesla_gun_shared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/shared/swarm/asw_weapon_tesla_gun_shared.cpp b/src/game/shared/swarm/asw_weapon_tesla_gun_shared.cpp index 37f1871a4..f37cdb98f 100644 --- a/src/game/shared/swarm/asw_weapon_tesla_gun_shared.cpp +++ b/src/game/shared/swarm/asw_weapon_tesla_gun_shared.cpp @@ -200,6 +200,7 @@ void CASW_Weapon_Tesla_Gun::PrimaryAttack( void ) { m_iClip1 = MAX( 0, m_iClip1 - 1 ); m_flLastDischargeTime = gpGlobals->curtime; + NotifyIfNoneClip1Ammo( pMarine ); } m_flNextPrimaryAttack = gpGlobals->curtime; @@ -325,6 +326,7 @@ void CASW_Weapon_Tesla_Gun::ShockEntity() // decrement ammo m_iClip1 = MAX( 0, m_iClip1 - 1 ); + NotifyIfNoneClip1Ammo( pMarine ); CPASFilter filter( pShockBaseEntity->GetAbsOrigin() ); CBaseEntity::EmitSound( filter, SOUND_FROM_WORLD, "ASW_Tesla_Laser.Damage", &pShockBaseEntity->GetAbsOrigin() ); @@ -489,8 +491,6 @@ void CASW_Weapon_Tesla_Gun::Fire( const Vector &vecOrigSrc, const Vector &vecDir SetFiringState( ASW_TG_FIRE_DISCHARGE ); } - NotifyIfNoneClip1Ammo( pMarine ); - if ( tr.DidHit() ) { vecDest = tr.endpos;