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 @@ -608,6 +608,7 @@ This page lists all the individual contributions to the project by their author.
- Use `SkipCrushSlowdown=true` to avoid the bug related to `Accelerates=true` and `MovementZone=CrushAll`
- Auto deploy for GI-like infantry
- Fix an issue that Ares' Type Conversion not resetting barrel's direction by `FireAngle`
- Fix an issue that jumpjets in air can not correctly spawn missiles
- **solar-III (凤九歌)**
- Target scanning delay customization (documentation)
- Skip target scanning function calling for unarmed technos (documentation)
Expand Down
3 changes: 2 additions & 1 deletion docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ 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 the bug that armor multiplier of new attacheffect will have extra take effect once if restricted warheads.
- Fixed an issue that units' `LaserTrails` will always lags behind by one frame
- Fixed an issue that units' `LaserTrails` will always lags behind by one frame.
- Fixed an issue that jumpjets in air can not correctly spawn missiles.

## 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 @@ -462,6 +462,7 @@ Vanilla fixes:
- If `DeployingAnim` with `Shadow=true` is played for unit currently in air its shadow will now be drawn on ground (by Starkku)
- `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)

Phobos fixes:
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)
Expand Down
16 changes: 16 additions & 0 deletions src/Ext/Techno/Hooks.Misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <SpawnManagerClass.h>
#include <TunnelLocomotionClass.h>
#include <JumpjetLocomotionClass.h>

#include <Ext/Anim/Body.h>

Expand Down Expand Up @@ -79,6 +80,21 @@ DEFINE_HOOK(0x6B7265, SpawnManagerClass_AI_UpdateTimer, 0x6)
return 0;
}

// Fix Jumpjets can not spawn missiles in air.
DEFINE_HOOK(0x6B72FE, SpawnerManagerClass_AI_MissileCheck, 0x9)
{
enum { SpawnMissile = 0x6B735C, NoSpawn = 0x6B795A };

GET(SpawnManagerClass*, pThis, ESI);

auto pLoco = ((FootClass*)pThis->Owner)->Locomotor; // Ares has already handled the building case.
auto pLocoInterface = pLoco.GetInterfacePtr();

return (pLocoInterface->Is_Moving_Now()
|| (!locomotion_cast<JumpjetLocomotionClass*>(pLoco) && pLocoInterface->Is_Moving())) // Jumpjet should only check Is_Moving_Now.
? NoSpawn : SpawnMissile;
}

DEFINE_HOOK_AGAIN(0x6B73BE, SpawnManagerClass_AI_SpawnTimer, 0x6)
DEFINE_HOOK(0x6B73AD, SpawnManagerClass_AI_SpawnTimer, 0x5)
{
Expand Down
Loading