diff --git a/CREDITS.md b/CREDITS.md index 43ac7dd017..5da50bebac 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -463,6 +463,7 @@ This page lists all the individual contributions to the project by their author. - Customize Ares's radar jam logic - Customize if cloning need power - Typeselect consider ifv mode + - Fix the bug that units keep attacking ground after target wall has been destroyed by adjacent damage/crush/wave damage - **Apollo** - Translucent SHP drawing patches - **ststl**: - Customizable `ShowTimer` priority of superweapons diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index b124266b4f..238f010480 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -277,6 +277,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Allow Reveal Crate to take effect when picking up by another player controlled house in campaign. - Fixed an issue where the vanilla script ignores jumpjets. Enable it through `[General] -> AIAirTargetingFix=true`. - Fixed the bug that naval ship will sink even they destroyed in air. +- Fixed the bug that units keep attacking ground after target wall has been destroyed by adjacent damage/crush/wave damage. ## Fixes / interactions with other extensions diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 68055abc0a..80bd8826e7 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -501,6 +501,7 @@ Vanilla fixes: - Fixed an issue where the vanilla script ignores jumpjets (by TaranDahl) - Fixed the issue where trigger events 2, 53 and 54 in persistent type triggers would be activated unconditionally after activation (by FlyStar) - Fixed the bug that naval ship will sink even they destroyed in air (by NetsuNegi) +- Fixed the bug that units keep attacking ground after target wall has been destroyed by adjacent damage/crush/wave damage (by NetsuNegi) Phobos fixes: - Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi) diff --git a/src/Ext/Cell/Hooks.cpp b/src/Ext/Cell/Hooks.cpp index 3472a5f499..161a5463ee 100644 --- a/src/Ext/Cell/Hooks.cpp +++ b/src/Ext/Cell/Hooks.cpp @@ -2,9 +2,9 @@ #include -DEFINE_HOOK(0x480EA8, CellClass_DamageWall_AdjacentWallDamage, 0x7) +DEFINE_HOOK(0x480EA8, CellClass_DamageWall_AdjacentWallDamage, 0x5) { - enum{ SkipGameCode = 0x480EB4 }; + enum { SkipGameCode = 0x480EB4 }; GET(CellClass*, pThis, EAX); pThis->DamageWall(RulesExt::Global()->AdjacentWallDamage); return SkipGameCode; diff --git a/src/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index e3f9c9ae45..56bcc1500a 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -2695,6 +2695,17 @@ DEFINE_HOOK(0x741A66, UnitClass_SetDestination_JJVehFix, 0x5) #pragma endregion +DEFINE_JUMP(LJMP, 0x4896B2, 0x4896BF) // No need this shit + +DEFINE_HOOK(0x480EF6, CellClass_DamageWall_BecomUntargetable, 0x6) +{ + GET(CellClass*, pThis, EDI); + + reinterpret_cast(0x70D4A0)(pThis);// pCell->BecomeUntargetable(); + + return 0; +} + DEFINE_HOOK(0x5194EF, InfantryClass_DrawIt_DrawShadow, 0x5) { enum { SkipDraw = 0x51958A };