diff --git a/CREDITS.md b/CREDITS.md index 5d9ea011ce..4baf9d7c21 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -738,6 +738,7 @@ This page lists all the individual contributions to the project by their author. - Remove the restriction that prohibits InfantryTypes from using the InitialPayload logic - Add `ammo`, `health`, `mission`, `landtype` and `sequence` conditions to `DiscardOn` - Disable AlphaImage during Buildup + - Allow `SW.ShowCameo` and `SW.ManualFire` to work independently of `SW.AutoFire` - **Ollerus**: - Build limit group enhancement - Customizable rocker amplitude diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index 2f3ca0ff90..51d7b72041 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -381,6 +381,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed the issue of Ares' EMP not suspending the production of AI factories. - Removed the restriction that prohibits InfantryTypes from using the InitialPayload logic. - `ProjectileRange` now has weapon range modifiers applied to it if greater than 0 and unless `ProjectileRange.ApplyModifiers` is set to false on the WeaponType. +- Allowed `SW.ShowCameo` and `SW.ManualFire` to work independently of `SW.AutoFire`. ## Newly added global settings diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 3f918553c5..5f8743d889 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -826,6 +826,7 @@ HideShakeEffects=false ; boolean - Fixed the issue of Ares' EMP not suspending the production of AI factories (by CrimRecya) - Removed the restriction that prohibits InfantryTypes from using the InitialPayload logic (by Noble_Fish) - `ProjectileRange` now has weapon range modifiers applied to it if greater than 0 and unless `ProjectileRange.ApplyModifiers` is set to false on the WeaponType (by Starkku) +- Allowed `SW.ShowCameo` and `SW.ManualFire` to work independently of `SW.AutoFire` (by Noble_Fish) ``` ### 0.4.0.3 diff --git a/src/Ext/Sidebar/SWSidebar/SWButtonClass.cpp b/src/Ext/Sidebar/SWSidebar/SWButtonClass.cpp index 31b4e2f023..afb8cf31f9 100644 --- a/src/Ext/Sidebar/SWSidebar/SWButtonClass.cpp +++ b/src/Ext/Sidebar/SWSidebar/SWButtonClass.cpp @@ -182,7 +182,7 @@ bool SWButtonClass::LaunchSuper() const const auto pSuper = pCurrent->Supers[this->SuperIndex]; const auto pType = pSuper->Type; const auto pSWExt = SWTypeExt::Fetch(pType); - const bool manual = !pSWExt->SW_ManualFire && pSWExt->SW_AutoFire; + const bool manual = !pSWExt->SW_ManualFire; const bool unstoppable = pType->UseChargeDrain && pSuper->ChargeDrainState == ChargeDrainState::Draining && pSWExt->SW_Unstoppable; if (!pSuper->CanFire() && !manual) diff --git a/src/Ext/Sidebar/SWSidebar/SWSidebarClass.cpp b/src/Ext/Sidebar/SWSidebar/SWSidebarClass.cpp index 72fc4943b9..0245cec68d 100644 --- a/src/Ext/Sidebar/SWSidebar/SWSidebarClass.cpp +++ b/src/Ext/Sidebar/SWSidebar/SWSidebarClass.cpp @@ -129,7 +129,7 @@ bool SWSidebarClass::AddButton(int superIdx) const auto pSWExt = SWTypeExt::Fetch(pSWType); - if (!pSWExt->SW_ShowCameo && pSWExt->SW_AutoFire) + if (!pSWExt->SW_ShowCameo) return false; if (!pSWExt->SuperWeaponSidebar_Allow.Get(RulesExt::Global()->SuperWeaponSidebar_AllowByDefault)) diff --git a/src/Misc/Hooks.Ares.cpp b/src/Misc/Hooks.Ares.cpp index 1e9d201176..ace8948e13 100644 --- a/src/Misc/Hooks.Ares.cpp +++ b/src/Misc/Hooks.Ares.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -292,6 +292,11 @@ void Apply_Ares3_0_Patches() Patch::Apply_CALL(AresHelper::AresBaseAddress + 0x13FA7, &BuildingExt::UpdateFactoryQueues); Patch::Apply_CALL(AresHelper::AresBaseAddress + 0x4CD9E, &BuildingExt::UpdateFactoryQueues); Patch::Apply_CALL(AresHelper::AresBaseAddress + 0x4CE84, &BuildingExt::UpdateFactoryQueues); + + // Decouple SW.ShowCameo from SW.AutoFire - Ares' HouseClass_UpdateSuperWeaponsUnavailable + Patch::Apply_LJMP(AresHelper::AresBaseAddress + 0x39635, AresHelper::AresBaseAddress + 0x39664); + // Decouple SW.ManualFire from SW.AutoFire - Ares' SidebarClass_ProcessCameoClick_SuperWeapons + Patch::Apply_LJMP(AresHelper::AresBaseAddress + 0x34DD0, AresHelper::AresBaseAddress + 0x34DD9); } void Apply_Ares3_0p1_Patches() @@ -403,4 +408,9 @@ void Apply_Ares3_0p1_Patches() Patch::Apply_CALL(AresHelper::AresBaseAddress + 0x14537, &BuildingExt::UpdateFactoryQueues); Patch::Apply_CALL(AresHelper::AresBaseAddress + 0x4DA0E, &BuildingExt::UpdateFactoryQueues); Patch::Apply_CALL(AresHelper::AresBaseAddress + 0x4DAF4, &BuildingExt::UpdateFactoryQueues); + + // Decouple SW.ShowCameo from SW.AutoFire - Ares' HouseClass_UpdateSuperWeaponsUnavailable + Patch::Apply_LJMP(AresHelper::AresBaseAddress + 0x3A0B5, AresHelper::AresBaseAddress + 0x3A0E4); + // Decouple SW.ManualFire from SW.AutoFire - Ares' SidebarClass_ProcessCameoClick_SuperWeapons + Patch::Apply_LJMP(AresHelper::AresBaseAddress + 0x35810, AresHelper::AresBaseAddress + 0x35819); }