diff --git a/CREDITS.md b/CREDITS.md index 57f41e8e92..6cf663b66b 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -657,6 +657,7 @@ This page lists all the individual contributions to the project by their author. - CellSpread damage check if victim is in air or on floor - Fix an issue where non-repairer units needed sensors to attack cloaked friendly units - Allow customizing whether to synchronously change the owner of the RadioLink-linked units when the owner of a building changes + - Fix an issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team - **solar-III (凤九歌)** - Target scanning delay customization (documentation) - Skip target scanning function calling for unarmed technos (documentation) diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index 99838b773a..5e3b891cfd 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -283,6 +283,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Fixed a bug where units can be promoted when created via trigger actions even if they have `Trainable=false`. - Fixed the bug that ai will try to product aircraft even the airport has no free dock for it. - Fixed the issue where non-repairer units needed sensors to attack cloaked friendly units. +- Fixed the issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team. ## Fixes / interactions with other extensions diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 1595e7dd91..c09e0623bb 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -515,6 +515,7 @@ Vanilla fixes: - Fixed a bug where units can be promoted when created via trigger actions even if they have `Trainable=false` (by NetsuNegi) - Fixed the bug that ai will try to product aircraft even the airport has no free dock for it (by NetsuNegi) - Fixed the issue where non-repairer units needed sensors to attack cloaked friendly units (by TaranDahl) +- Fixed the issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team (by TaranDahl) Phobos fixes: - Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi) diff --git a/src/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index ca8ac8733a..487e11de54 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -2912,3 +2912,11 @@ DEFINE_HOOK(0x65DE82, TeamTypeClass_CreateTeamMembers_Veterancy, 0x6) // Fixed the issue where non-repairer units needed sensors to attack cloaked friendly units. DEFINE_JUMP(LJMP, 0x6FC278, 0x6FC289); + +// Fixed the issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team. +DEFINE_HOOK(0x6EA870, TeamClass_LiberateMember_Start, 0x6) +{ + GET_STACK(FootClass*, pMember, 0x4); + pMember->RecruitableB = true; + return 0; +}