Skip to content

Commit

Permalink
Remove jumpjet deceleration when crashing onto buildings
Browse files Browse the repository at this point in the history
requested by @reedom114514

Co-Authored-By: Netsu_Negi <[email protected]>
  • Loading branch information
chaserli and NetsuNegi committed Mar 15, 2024
1 parent fc877c9 commit 50562f3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ This page lists all the individual contributions to the project by their author.
- **FlyStar**
- Campaign load screen PCX support
- New condition for automatic self-destruction logic when TechnoTypes exist/don't exist
- **NetsuNegi** - Forbidding parallel AI queues by type
- **NetsuNegi**
- Forbidding parallel AI queues by type
- Jumpjet crash speed fix when crashing onto building
- **Apollo** - Translucent SHP drawing patches
- **ststl**
- Customizable ShowTimer priority of superweapons
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 @@ -142,6 +142,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- Fix [EIP 00529A14](https://modenc.renegadeprojects.com/Internal_Error/YR#eip_00529A14) when attempting to read `[Header]` section of campaign maps.
- Units will no longer rotate its turret under EMP.
- Jumpjets will no longer wobble under EMP.
- Removed jumpjet units' deceleration when crashing onto buildings.
- Fixed `AmbientDamage` when used with `IsRailgun=yes` being cut off by elevation changes.
- Fixed railgun and fire particles being cut off by elevation changes.
- Fixed teleport units' (for example CLEG) frozen-still timer being cleared after load game.
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ Vanilla fixes:
- Aircraft docking on buildings now respect `[AudioVisual]`->`PoseDir` as the default setting and do not always land facing north or in case of pre-placed buildings, the building's direction (by Starkku)
- Spawned aircraft now align with the spawner's facing when landing (by Starkku)
- Fixed infantries attempted to entering buildings when waypointing together with engineer/agent/occupier/etc (by Trsdy)
- Fixed jumpjet crash speed when crashing onto buildings (by NetsuNegi)
Phobos fixes:
- Fixed a few errors of calling for superweapon launch by `LaunchSW` or building infiltration (by Trsdy)
Expand Down
1 change: 0 additions & 1 deletion src/Ext/Aircraft/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ DirType AircraftExt::GetLandingDir(AircraftClass* pThis, BuildingClass* pDock)

if (pDock || pThis->HasAnyLink())
{
auto pBuilding = pDock;
auto pLink = pThis->GetNthLink(0);

if (auto pBuilding = pDock ? pDock : abstract_cast<BuildingClass*>(pLink))
Expand Down
10 changes: 7 additions & 3 deletions src/Ext/Unit/Hooks.Jumpjet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ DEFINE_HOOK(0x736EE9, UnitClass_UpdateFiring_FireErrorIsOK, 0x6)
return 0;
}

DEFINE_HOOK(0x54D208, JumpjetLocomotionClass_ProcessMove_EMPWobble, 0x5)
DEFINE_HOOK(0x54D326, JumpjetLocomotionClass_MovementAI_CrashSpeedFix, 0x6)
{
GET(JumpjetLocomotionClass*, pThis, ESI);
return pThis->LinkedTo->IsCrashing ? 0x54D350 : 0;
}

DEFINE_HOOK(0x54D208, JumpjetLocomotionClass_MovementAI_EMPWobble, 0x5)
{
GET(JumpjetLocomotionClass* const, pThis, ESI);
enum { ZeroWobble = 0x54D22C };
Expand Down Expand Up @@ -183,8 +189,6 @@ FireError __stdcall JumpjetLocomotionClass_Can_Fire(ILocomotion* pThis)

DEFINE_JUMP(VTABLE, 0x7ECDF4, GET_OFFSET(JumpjetLocomotionClass_Can_Fire));

//TODO : Issue #690 #655

// Fix initial facing when jumpjet locomotor is being attached
DEFINE_HOOK(0x54AE44, JumpjetLocomotionClass_LinkToObject_FixFacing, 0x7)
{
Expand Down

0 comments on commit 50562f3

Please sign in to comment.