From f2d96668a8df21f9ac3ffdae01c14dae8764c63c Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 21:31:20 +0000 Subject: [PATCH] bugfix(gameplay): Prevent countermeasures from destroyed units --- .../Code/GameEngine/Source/GameLogic/Object/Weapon.cpp | 5 ++++- tmp/weapon_patch_check.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 tmp/weapon_patch_check.txt diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp index fc1f8db6a9..20cd020001 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp @@ -1174,7 +1174,7 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate } //If we're launching a missile at a unit with valid countermeasures, then communicate it - if( projectile->isKindOf( KINDOF_SMALL_MISSILE ) && victimObj && victimObj->hasCountermeasures() ) + if( projectile->isKindOf( KINDOF_SMALL_MISSILE ) && victimObj && !victimObj->isDestroyed() && victimObj->hasCountermeasures() ) { const AIUpdateInterface *ai = victimObj->getAI(); //Only allow jets not currently supersonic to launch countermeasures @@ -3647,4 +3647,7 @@ void WeaponBonusSet::appendBonuses(WeaponBonusConditionFlags flags, WeaponBonus& } + + + diff --git a/tmp/weapon_patch_check.txt b/tmp/weapon_patch_check.txt new file mode 100644 index 0000000000..b3a425249b --- /dev/null +++ b/tmp/weapon_patch_check.txt @@ -0,0 +1 @@ +placeholder \ No newline at end of file