Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ This page lists all the individual contributions to the project by their author.
- Allow jumpjet climbing ignore building height
- Fix an issue where the AI's regular targeting would also target garrisonable buildings
- Fix an issue that the move mission of the jumpjet does not end correctly
- Fix the issue that the Jumpjet must end its movement before starting the next mission
- **solar-III (凤九歌)**
- Target scanning delay customization (documentation)
- Skip target scanning function calling for unarmed technos (documentation)
Expand Down
2 changes: 1 addition & 1 deletion YRpp
Submodule YRpp updated 2 files
+3 −0 HouseClass.h
+1 −1 ObjectClass.h
1 change: 1 addition & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- 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 Jumpjet must end its movement before starting the next mission.

## Fixes / interactions with other extensions

Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ Vanilla fixes:
- Fixed the bug that techno in attack move will move to target if it cannot attack it (by NetsuNegi)
- Fixed the bug in AI scripts 56 and 57 that forced the launch of superweapons with index numbers 3 and 4 (by FlyStar)
- Buildings with `NeedsEngineer=true` are now considered to have threat value of 0 under ownership of `MultiplayPassive=true` houses regardless of their `ThreatPosed` value (by Starkku)
- Fixed the issue that the Jumpjet must end its movement before starting the next mission (by TaranDahl)

Phobos fixes:
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)
Expand Down
19 changes: 19 additions & 0 deletions src/Misc/Hooks.BugFixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3105,3 +3105,22 @@ DEFINE_HOOK(0x4D4221, FootClass_MissionMove_EndCheckFix2, 0x6)
R->AL(pThis->Locomotor.GetInterfacePtr()->Is_Moving_Now());
return 0x4D422D;
}

// According to the code comments of the open-sourced RA1, I believe that the check of IsMovingNow here is to prevent foots from starting a new mission at an unstoppable position in the cell.
// Then it is obvious that Jumpjet should not perform this check because Jumpjet's movement does not take the cell into account.
DEFINE_HOOK_AGAIN(0x521BA7, FootClass_ReadyToNextMission_MovingCheck, 0x6); // Infantry
DEFINE_HOOK(0x7442D6, FootClass_ReadyToNextMission_MovingCheck, 0x6) // Unit
{
GET(FootClass*, pThis, ESI);
auto pLoco = pThis->Locomotor.GetInterfacePtr();
R->AL(!locomotion_cast<JumpjetLocomotionClass*>(pLoco) && pLoco->Is_Moving_Now());
return R->Origin() + 0xF;
}

// Although this may seem useless because locomotor also checks IsFallingDown. But just in case.
DEFINE_HOOK(0x7442AB, UnitClass_ReadyToNextMission_FallingDown, 0x6)
{
enum { ReturnZero = 0x744383 };
GET(FootClass*, pThis, ESI);
return pThis->IsFallingDown ? ReturnZero : 0;
}