Skip to content

Commit 42b6d58

Browse files
authored
Fixed the issue where units recruited by a team with AreTeamMembersRecruitable=false cannot be recruited even if they have been liberated by that team (#2022)
<!-- Please manually add a label named [No Documentation Needed] if this change should not be mentioned in documentation, what's new and no credit needs to be given. If the changes are solely made to the documentation, please set the target branch to the pull request named "Weekly Regular Documentation Revisions", rather than the repository's existing branches. -->
1 parent 488657a commit 42b6d58

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,7 @@ This page lists all the individual contributions to the project by their author.
686686
- Fix an issue that the AI would look for the first house in the array as an enemy instead of the nearest one when there were no enemies
687687
- `AllowBerzerkOnAllies`
688688
- Fixed an issue that retaliation will make the unit keep switching among multiple targets with the same amount of threat
689+
- Fix an issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team
689690
- **solar-III (凤九歌)**
690691
- Target scanning delay customization (documentation)
691692
- Skip target scanning function calling for unarmed technos (documentation)

docs/Fixed-or-Improved-Logics.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
293293
- Fixed an issue where mining vehicles could not move after leaving a tank bunker.
294294
- `ProductionAnim` is now available for `Factory=InfantryType` as well as non-`ConstructionYard=true` `Factory=BuildingType` buildings. `IdleAnim` will cease to play for its duration normally as well.
295295
- Fixed the bug where selected technos would lose their selection if their regular mind control was replaced with permanent mind control or with the control from the Psychic Dominator superweapon.
296+
- Fixed the issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team.
296297

297298
## Fixes / interactions with other extensions
298299

docs/Whats-New.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ Vanilla fixes:
583583
- Fixed an issue where mining vehicles could not move after leaving a tank bunker (by FlyStar)
584584
- Fixed the bug where selected technos would lose their selection if their regular mind control was replaced with permanent mind control or with the control from the Psychic Dominator superweapon (by NetsuNegi)
585585
- Fixed an issue that retaliation will make the unit keep switching among multiple targets with the same amount of threat (by TaranDahl)
586+
- 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)
586587
587588
Phobos fixes:
588589
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)

src/Misc/Hooks.BugFixes.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2963,3 +2963,11 @@ DEFINE_HOOK(0x708A81, TechnoClass_CanRetaliate_CheckThreat, 0x5)
29632963

29642964
return pThis->ThreatCoeffients(pAttacker, &CoordStruct::Empty) <= pThis->ThreatCoeffients((ObjectClass*)(pThis->Target), &CoordStruct::Empty) ? SkipRetaliate : GoOtherChecks;
29652965
}
2966+
2967+
// Fixed the issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team.
2968+
DEFINE_HOOK(0x6EA870, TeamClass_LiberateMember_Start, 0x6)
2969+
{
2970+
GET_STACK(FootClass*, pMember, 0x4);
2971+
pMember->RecruitableB = true;
2972+
return 0;
2973+
}

0 commit comments

Comments
 (0)