From 851b1e3a0fdc22e84fd11205c38df4f35319cf54 Mon Sep 17 00:00:00 2001 From: Okladnoj Date: Mon, 3 Aug 2026 19:58:43 +0300 Subject: [PATCH] bugfix(weapon): Fix missing Aurora Alpha second explosion on structures SupW_AuroraFuelBombWeapon does not specify MissileCallsOnDie in INI, so getDieOnDetonate() returns false and MissileAIUpdate::detonate() skips the attemptDamage() call that runs the die modules of the projectile. The second explosion then never happens when the target is a structure. The fix belongs in the game data, which does not live in this repository, so the flag is forced for that one weapon behind PRESERVE_MISSING_AURORA_SECOND_EXPLOSION. Retail builds are unaffected. --- Core/GameEngine/Include/Common/GameDefines.h | 4 ++++ .../GameEngine/Source/GameLogic/Object/Weapon.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Core/GameEngine/Include/Common/GameDefines.h b/Core/GameEngine/Include/Common/GameDefines.h index 7a6f4be4d11..886da9c0e9d 100644 --- a/Core/GameEngine/Include/Common/GameDefines.h +++ b/Core/GameEngine/Include/Common/GameDefines.h @@ -47,6 +47,10 @@ #define PRESERVE_NO_XP_FROM_OCL_KILLS (1) #endif +#ifndef PRESERVE_MISSING_AURORA_SECOND_EXPLOSION +#define PRESERVE_MISSING_AURORA_SECOND_EXPLOSION (0) +#endif + #ifndef PRESERVE_NO_XP_FROM_POISON_KILLS #define PRESERVE_NO_XP_FROM_POISON_KILLS (1) #endif diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp index 475811e44c0..de8449ced13 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp @@ -30,6 +30,8 @@ // INCLUDES /////////////////////////////////////////////////////////////////////////////////////// #include "PreRTS.h" // This must go first in EVERY cpp file in the GameEngine +#include + #define DEFINE_DEATH_NAMES #define DEFINE_WEAPONBONUSCONDITION_NAMES #define DEFINE_WEAPONBONUSFIELD_NAMES @@ -1672,6 +1674,16 @@ WeaponTemplate *WeaponStore::newWeaponTemplate(AsciiString name) WeaponTemplate *wt = newInstance(WeaponTemplate); wt->m_name = name; wt->m_nameKey = TheNameKeyGenerator->nameToKey( name ); + +#if !RETAIL_COMPATIBLE_CRC && !PRESERVE_MISSING_AURORA_SECOND_EXPLOSION + // TheSuperHackers @bugfix Okladnoj 03/08/2026 Force MissileCallsOnDie; missing in INI breaks second explosion. + if (strcmp(name.str(), "SupW_AuroraFuelBombWeapon") == 0) + { + wt->m_dieOnDetonate = TRUE; + DEBUG_LOG(("WeaponStore::newWeaponTemplate() - forcing MissileCallsOnDie for %s", name.str())); + } +#endif + m_weaponTemplateVector.push_back(wt); m_weaponTemplateHashMap[wt->m_nameKey] = wt;