Skip to content
Merged
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 @@ -543,6 +543,7 @@ This page lists all the individual contributions to the project by their author.
- Jumpjet Climbing Logic Enhancement
- Fix for pathfinding crashes on big maps due to too small pathfinding node buffer
- Fix an issue that units' `LaserTrails` will always lags behind by one frame
- Fix an issue that the currently hovered planning node not update up-to-date, such as using hotkeys to select technos
- **Ollerus**:
- Build limit group enhancement
- Customizable rocker amplitude
Expand Down
1 change: 1 addition & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- `DeployingAnim` now supports both `Normalized=true` and `Reverse=true`. Keep in mind `Reverse` uses `LoopEnd` for frame amount instead of `End` even without `LoopCount` > 1.
- `DeployingAnim` using unit drawer now also tint accordingly with the unit.
- Fixed an issue that jumpjets in air can not correctly spawn missiles.
- Fixed an issue that the currently hovered planning node not update up-to-date, such as using hotkeys to select technos.

## 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 @@ -463,6 +463,7 @@ Vanilla fixes:
- `DeployingAnim` now supports both `Normalized=true` and `Reverse=true` (by Starkku)
- `DeployingAnim` using unit drawer now also tint accordingly with the unit (by Starkku)
- Jumpjets in air now can correctly spawn missiles (by TaranDahl)
- Fixed an issue that the currently hovered planning node not update up-to-date, such as using hotkeys to select technos (by CrimRecya)

Phobos fixes:
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)
Expand Down
30 changes: 30 additions & 0 deletions src/Misc/Hooks.BugFixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2542,3 +2542,33 @@ DEFINE_PATCH(0x42C36B, 0xB7);
// movsx eax, word ptr [eax+esi*2] -> movzx eax, word ptr [eax+esi*2]

#pragma endregion

#pragma region FixPlanningNodeConnect

// Restore the original three pop to prevent stack imbalance
void NAKED _PlanningNodeClass_UpdateHoverNode_FixCheckValidity_RET()
{
POP_REG(EDI);
POP_REG(EBP);
POP_REG(EBX);
JMP(0x638F2A);
}
DEFINE_HOOK(0x638F1E, PlanningNodeClass_UpdateHoverNode_FixCheckValidity, 0x5)
{
// Newly added checks to prevent not in-time updates
return PlanningNodeClass::PlanningModeActive ? (int)_PlanningNodeClass_UpdateHoverNode_FixCheckValidity_RET : 0;
}

DEFINE_HOOK(0x638F70, PlanningNodeClass_UpdateHoverNode_SkipDuplicateLog, 0x8)
{
enum { SkipLogString = 0x638F81 };

GET(const PlanningNodeClass* const, pCurrentNode, ESI);

const auto& pHoveringNode = Make_Global<const PlanningNodeClass* const>(0xAC4CCC);

// Only output logs when they are not the same, to avoid outputting every frame
return (pCurrentNode != pHoveringNode) ? 0 : SkipLogString;
}

#pragma endregion
Loading