From c72c963d717c7f5bf18a23af162d466d3b710e4a Mon Sep 17 00:00:00 2001 From: SuperCake Date: Fri, 28 Aug 2026 22:19:31 +0200 Subject: [PATCH] fix: prevent missile (hornets and smart bomb) friendly fire extra "weapon" is deleted after last activation but before missiles hit their target --- src/game/server/swarm/asw_marine.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/game/server/swarm/asw_marine.cpp b/src/game/server/swarm/asw_marine.cpp index 0a2ceb354..c8f1668d5 100644 --- a/src/game/server/swarm/asw_marine.cpp +++ b/src/game/server/swarm/asw_marine.cpp @@ -1421,11 +1421,14 @@ int CASW_Marine::OnTakeDamage_Alive( const CTakeDamageInfo &info ) Msg( " but all ignored, since it's from a team mate\n" ); return 0; } - //make hornet and smart bomb no longer friendlyfire - else if (!ASWDeathmatchMode() && pWeapon && (pWeapon->Classify() == CLASS_ASW_HORNET_BARRAGE || pWeapon->Classify() == CLASS_ASW_SMART_BOMB)) - { - return 0; - } + else if ( !ASWDeathmatchMode() && info.GetInflictor() && + info.GetInflictor()->Classify() == CLASS_MISSILE ) + { + // prevent hornets and smart bomb friendly fire + if ( asw_debug_marine_damage.GetBool() ) + Msg( " but all ignored, since it's from a missile\n" ); + return 0; + } else { if ( newInfo.GetDamageType() & DMG_CLUB )