From 878b1896b9734e0e8e86d49337a509bfe56a57d2 Mon Sep 17 00:00:00 2001 From: Coronia <2217891145@qq.com> Date: Sun, 9 Aug 2026 19:26:57 +0800 Subject: [PATCH 1/4] experiment with removing moving check --- src/Misc/Hooks.BugFixes.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index 54346ddea4..c74a02f710 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -3310,9 +3310,10 @@ DEFINE_HOOK(0x73992B, UnitClass_TryToDeploy_SetBuildingHealthPercentage, 0x7) DEFINE_HOOK_AGAIN(0x521BA7, FootClass_ReadyToNextMission_MovingCheck, 0x6); // Infantry DEFINE_HOOK(0x7442D6, FootClass_ReadyToNextMission_MovingCheck, 0x6) // Unit { - GET(FootClass*, pThis, ESI); - const auto pLoco = pThis->Locomotor.GetInterfacePtr(); - R->AL(!locomotion_cast(pLoco) && !locomotion_cast(pLoco) && pLoco->Is_Moving_Now()); + //GET(FootClass*, pThis, ESI); + //const auto pLoco = pThis->Locomotor.GetInterfacePtr(); + //R->AL(!locomotion_cast(pLoco) && !locomotion_cast(pLoco) && pLoco->Is_Moving_Now()); + R->AL(0); return R->Origin() + 0xF; } From 3ad6c1b389de5762058d34481fe6ebde82333f30 Mon Sep 17 00:00:00 2001 From: Coronia <2217891145@qq.com> Date: Mon, 10 Aug 2026 14:52:15 +0800 Subject: [PATCH 2/4] add toggle --- src/Ext/Rules/Body.cpp | 3 +++ src/Ext/Rules/Body.h | 2 ++ src/Misc/Hooks.BugFixes.cpp | 13 +++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Ext/Rules/Body.cpp b/src/Ext/Rules/Body.cpp index 13856705e2..5f1a6ab7d8 100644 --- a/src/Ext/Rules/Body.cpp +++ b/src/Ext/Rules/Body.cpp @@ -600,6 +600,8 @@ void RulesExt::ExtData::LoadBeforeTypeData(RulesClass* pThis, CCINIClass* pINI) this->ApproachTarget_StopWhenInRange.Read(exINI, GameStrings::General, "AttackMove.StopWhenTargetAcquired"); this->ApproachTarget_StopWhenInRange.Read(exINI, GameStrings::General, "ApproachTarget.StopWhenInRange"); + this->ReadyToNextMission_MovingCheck.Read(exINI, GameStrings::General, "ReadyToNextMission.MovingCheck"); + // Section AITargetTypes int itemsCount = pINI->GetKeyCount("AITargetTypes"); for (int i = 0; i < itemsCount; ++i) @@ -1071,6 +1073,7 @@ void RulesExt::ExtData::Serialize(T& Stm) .Process(this->PoseDir_Production) .Process(this->PoseDir_Field) .Process(this->ApproachTarget_StopWhenInRange) + .Process(this->ReadyToNextMission_MovingCheck) ; } diff --git a/src/Ext/Rules/Body.h b/src/Ext/Rules/Body.h index 0711960642..cae5c9046e 100644 --- a/src/Ext/Rules/Body.h +++ b/src/Ext/Rules/Body.h @@ -527,6 +527,7 @@ class RulesExt Nullable PoseDir_Field; Valueable ApproachTarget_StopWhenInRange; + Valueable ReadyToNextMission_MovingCheck; ExtData(RulesClass* OwnerObject) : Extension(OwnerObject) , Storage_TiberiumIndex { -1 } @@ -990,6 +991,7 @@ class RulesExt , PoseDir_Field{} , ApproachTarget_StopWhenInRange { false } + , ReadyToNextMission_MovingCheck { false } { } virtual ~ExtData() = default; diff --git a/src/Misc/Hooks.BugFixes.cpp b/src/Misc/Hooks.BugFixes.cpp index a0d8963d41..af35a93a06 100644 --- a/src/Misc/Hooks.BugFixes.cpp +++ b/src/Misc/Hooks.BugFixes.cpp @@ -3311,10 +3311,15 @@ DEFINE_HOOK(0x73992B, UnitClass_TryToDeploy_SetBuildingHealthPercentage, 0x7) DEFINE_HOOK_AGAIN(0x521BA7, FootClass_ReadyToNextMission_MovingCheck, 0x6); // Infantry DEFINE_HOOK(0x7442D6, FootClass_ReadyToNextMission_MovingCheck, 0x6) // Unit { - //GET(FootClass*, pThis, ESI); - //const auto pLoco = pThis->Locomotor.GetInterfacePtr(); - //R->AL(!locomotion_cast(pLoco) && !locomotion_cast(pLoco) && pLoco->Is_Moving_Now()); - R->AL(0); + bool result = false; + + if (RulesExt::Global()->ReadyToNextMission_MovingCheck) + { + GET(FootClass*, pThis, ESI); + result = pThis->Locomotor.GetInterfacePtr()->Is_Moving_Now(); + } + + R->AL(result); return R->Origin() + 0xF; } From 6ff74f35d81abc15d9713c06c750b9b1623a2ec9 Mon Sep 17 00:00:00 2001 From: Coronia <2217891145@qq.com> Date: Mon, 10 Aug 2026 14:55:24 +0800 Subject: [PATCH 3/4] doc --- docs/Fixed-or-Improved-Logics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Fixed-or-Improved-Logics.md b/docs/Fixed-or-Improved-Logics.md index 25ae3556ec..aa41f7b434 100644 --- a/docs/Fixed-or-Improved-Logics.md +++ b/docs/Fixed-or-Improved-Logics.md @@ -292,7 +292,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho - Vehicles overlapping `Wall=true` OverlayTypes no longer display sell cursor and cannot be sold. - Fixed vehicles disguised as trees incorrectly displaying veterancy insignia when they shouldn't. - Fixed the issue where the AI's regular targeting would also target garrisonable buildings. -- Fixed the issue that the move mission of the jumpjet does not end correctly. +- Fixed the issue that the move mission doesn't end when the techno is moving, which is mostly problematic for jumpjet and hover techno. Set `[General] -> ReadyToNextMission.MovingCheck` to true to disable the fix. - AI team garrison scripts now re-evaluate destination immediately instead of trying to garrison ungarrisonable building before changing target. - Fixed the bug that `DeploysInto` and `UndeploysInto` will make damaged techno lose 1 health. - Fixed the issue that the Jumpjet must end its movement before starting the next mission. From bf070fc8b1d4b4ddcd3fb422fdacfd35863b4b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=88=AA=E5=91=B3=E9=BA=BB=E9=85=B1?= <93972760+TaranDahl@users.noreply.github.com> Date: Tue, 11 Aug 2026 00:55:59 +0800 Subject: [PATCH 4/4] Update Hooks.Firing.cpp --- src/Ext/Techno/Hooks.Firing.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Ext/Techno/Hooks.Firing.cpp b/src/Ext/Techno/Hooks.Firing.cpp index 697ddaa85b..6f6f8e0f88 100644 --- a/src/Ext/Techno/Hooks.Firing.cpp +++ b/src/Ext/Techno/Hooks.Firing.cpp @@ -1256,6 +1256,10 @@ DEFINE_HOOK(0x4D5A34, FootClass_ApproachTarget_StopWhenInRange, 0x6) if (closeEnough) { GET(FootClass*, pThis, EBX); + + if (pThis->InLimbo) + return 0; + const auto pTypeExt = TechnoExt::Fetch(pThis)->TypeExtData; // Per-type setting takes priority, falls back to the global one.