Skip to content

Conversation

@Stubbjax
Copy link

@Stubbjax Stubbjax commented Nov 4, 2025

Fixes #245

This change fixes an issue where units that are located above the terrain can be immediately teleported into airborne transports.

When an airborne transport unloads units, the transport is often not exactly level with the terrain at the time of unloading as the landed condition is based on a distance threshold to the landing location. This can result in disembarked units floating slightly above the terrain, which bypasses the condition on the transport having landed before embarking.

This is also why disembarked units often remain clumped together in the one spot, as this floating state cancels out pathfinding. The floating issue can be seen below.

FLOATY.mp4

Fixing the floating issue would also solve this issue, however it is still proper to ensure the z-bounds of the respective objects overlap before boarding can occur.

Before

Floating infantry can teleport back aboard the Chinook

TELEPORT.mp4

After

Floating infantry can not teleport back aboard the Chinook

NORMAL.mp4

@Stubbjax Stubbjax self-assigned this Nov 4, 2025
@Stubbjax Stubbjax added AI Is AI related Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour NoRetail This fix or change is not applicable with Retail game compatibility labels Nov 4, 2025
@bobtista
Copy link

bobtista commented Nov 4, 2025

LGTM, though maybe add a comment eg // Check if transport and unit Z-bounds overlap. If they don't overlap vertically, prevent boarding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Is AI related Bug Something is not working right, typically is user facing Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker NoRetail This fix or change is not applicable with Retail game compatibility ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Units can teleport into USA Chinook, Helicopter after drop off over impassable terrain

2 participants