Skip to content

Commit 819afa2

Browse files
authored
Fixed the issue that the move mission of the jumpjet does not end correctly (#2100)
Which would prevent AttackMove from finishing.
1 parent 12143d7 commit 819afa2

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ This page lists all the individual contributions to the project by their author.
706706
- Weapon range finding in cylinder
707707
- Allow jumpjet climbing ignore building height
708708
- Fix an issue where the AI's regular targeting would also target garrisonable buildings
709+
- Fix an issue that the move mission of the jumpjet does not end correctly
709710
- **solar-III (凤九歌)**
710711
- Target scanning delay customization (documentation)
711712
- 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
@@ -302,6 +302,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
302302
- Vehicles overlapping `Wall=true` OverlayTypes no longer display sell cursor and cannot be sold.
303303
- Fixed vehicles disguised as trees incorrectly displaying veterancy insignia when they shouldn't.
304304
- Fixed the issue where the AI's regular targeting would also target garrisonable buildings.
305+
- Fixed the issue that the move mission of the jumpjet does not end correctly.
305306

306307
## Fixes / interactions with other extensions
307308

docs/Whats-New.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,7 @@ Vanilla fixes:
12541254
- Allowed observers to see a selected building's radial indicator (by Trsdy)
12551255
- Allow voxel projectiles to use `AnimPalette` and `FirersPalette` (by NetsuNegi)
12561256
- Fixed the issue where the AI's regular targeting would also target garrisonable buildings (by TaranDahl)
1257+
- Fixed the issue that the move mission of the jumpjet does not end correctly (by TaranDahl)
12571258
12581259
Phobos fixes:
12591260
- Fixed shields being able to take damage when the parent TechnoType was under effects of a `Temporal` Warhead (by Starkku)

src/Misc/Hooks.BugFixes.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,3 +3089,19 @@ DEFINE_HOOK(0x6F833E, TechnoClass_CanAutoTargetObject_Garrisonable, 0x6)
30893089
R->AL(garrisonable && (isFullMap || pThis->MegaMissionIsAttackMove())); // Attack move is allowed because it can switch to Mission::Attack
30903090
return 0;
30913091
}
3092+
3093+
// Fix the issue that the movement mission of jumpjet does not end correctly.
3094+
DEFINE_HOOK(0x4D4203, FootClass_MissionMove_EndCheckFix1, 0x6)
3095+
{
3096+
GET(FootClass*, pThis, ESI);
3097+
R->EAX(pThis->Destination && (!locomotion_cast<JumpjetLocomotionClass*>(pThis->Locomotor) || pThis->DistanceFrom(pThis->Destination) > Unsorted::LeptonsPerCell));
3098+
return 0x4D4209;
3099+
}
3100+
3101+
// Replace IsMoving by IsMovingNow.
3102+
DEFINE_HOOK(0x4D4221, FootClass_MissionMove_EndCheckFix2, 0x6)
3103+
{
3104+
GET(FootClass*, pThis, ESI);
3105+
R->AL(pThis->Locomotor.GetInterfacePtr()->Is_Moving_Now());
3106+
return 0x4D422D;
3107+
}

0 commit comments

Comments
 (0)