Skip to content

Commit

Permalink
Change spawnee landing direction to match the spawner's facing
Browse files Browse the repository at this point in the history
  • Loading branch information
Starkku committed Mar 2, 2024
1 parent d1f4471 commit 669391c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- 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.
- 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.
- Spawned aircraft now align with the spawner's facing when landing.

## Fixes / interactions with other extensions

Expand Down
3 changes: 2 additions & 1 deletion docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ Vanilla fixes:
- Fixed railgun and fire particles being cut off by elevation changes (by Starkku)
- Fixed teleport units' frozen-still timer being reset after load game (by Trsdy)
- 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)
-
Phobos fixes:
- Fixed a few errors of calling for superweapon launch by `LaunchSW` or building infiltration (by Trsdy)
- Add `ImmuneToCrit` for shields (by Trsdy)
Expand Down
4 changes: 4 additions & 0 deletions src/Ext/Aircraft/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ DirType AircraftExt::GetLandingDir(AircraftClass* pThis, BuildingClass* pDock)
if (!pThis)
return poseDir;

// If this is a spawnee, use the spawner's facing.
if (auto pOwner = pThis->SpawnOwner)
return pOwner->PrimaryFacing.Current().GetDir();

bool isAirportBound = true;

if (pDock || pThis->HasAnyLink())
Expand Down

0 comments on commit 669391c

Please sign in to comment.