diff --git a/CREDITS.md b/CREDITS.md index e9773e684a..33620628bf 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -490,6 +490,7 @@ This page lists all the individual contributions to the project by their author. - Fix 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 - Fix the bug that building with `Explodes=yes` use Ares's rubble logic will cause it's owner cannot defeat normally - Customizable disk drain logic + - Fix the bug that cause technos teleport to cell 0,0 by ChronoSphere superweapon - **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 4193783447..7779d9a2a5 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -295,6 +295,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - 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. - Fixed the issue where units recruited by a team with `AreTeamMembersRecruitable=false` cannot be recruited even if they have been liberated by that team. - Allow the default value of `DefaultToGuardArea` to be defined by `[General] -> DefaultToGuardArea`. +- Fixed the bug that cause technos teleport to cell 0,0 by ChronoSphere superweapon. ## Fixes / interactions with other extensions diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 4afcf3f597..2b52125b77 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -590,6 +590,7 @@ Vanilla fixes: - 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) - Fixed an issue that retaliation will make the unit keep switching among multiple targets with the same amount of threat (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) +- Fixed the bug that cause technos teleport to cell 0,0 by ChronoSphere superweapon (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/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index 1055bcf761..8c7d765393 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -1161,6 +1161,23 @@ DEFINE_HOOK(0x743664, UnitClass_ReadFromINI_Follower3, 0x6) #pragma endregion +DEFINE_HOOK(0x7184CE, TeleportLocomotionClass_MakeRoom_GetMovement_CellFix, 0x7) +{ + REF_STACK(CoordStruct, coords, STACK_OFFSET(0x5C, 0x4)); + + R->Stack(STACK_OFFSET(0x38, -0x18), MapClass::Instance.GetCellAt(coords)); + return 0; +} + +DEFINE_HOOK(0x7185DA, TeleportLocomotionClass_MakeRoom_DestFix, 0x6) +{ + enum { ReturnTrue = 0x71878F }; + + GET(CellStruct*, pCellAt, EAX); + + return *pCellAt == CellStruct::Empty ? ReturnTrue : 0; +} + #pragma region TeleportLocomotionOccupationFix DEFINE_HOOK(0x71872C, TeleportLocomotionClass_MakeRoom_OccupationFix, 0x9)