Skip to content

Ensure starting units or units granted by a crate are not isolated.#21521

Merged
Mailaender merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:spawned-reachable
Aug 4, 2024
Merged

Ensure starting units or units granted by a crate are not isolated.#21521
Mailaender merged 1 commit into
OpenRA:bleedfrom
RoosterDragon:spawned-reachable

Conversation

@RoosterDragon
Copy link
Copy Markdown
Member

When spawning starting units, or spawning units when collecting a crate, nearby locations will be used. If a nearby location cannot be reached, e.g. it is on top of a cliff or blocked in by trees, then any unit spawned there will be isolated which is not ideal.

Use the PathMightExistForLocomotorBlockedByImmovable method to filter nearby locations to those where the spawned unit can path back to the original location. This ensures the spawned unit is not isolated.

Fixes #12057 Fixes #6515


The following test map can be used to check that units do not spawn in the area blocked off by the cacti, both at start and when collecting crates.

spawntest.oramap.zip

image

When spawning starting units, or spawning units when collecting a crate, nearby locations will be used. If a nearby location cannot be reached, e.g. it is on top of a cliff or blocked in by trees, then any unit spawned there will be isolated which is not ideal.

Use the PathMightExistForLocomotorBlockedByImmovable method to filter nearby locations to those where the spawned unit can path back to the original location. This ensures the spawned unit is not isolated.
Copy link
Copy Markdown
Member

@Mailaender Mailaender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking sensible, and I can't spot regression in-game.

@Mailaender Mailaender merged commit 2c435c0 into OpenRA:bleed Aug 4, 2024
@Mailaender
Copy link
Copy Markdown
Member

Changelog

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Starting units can be incarcerated Duplicate units crate action creates stuck units

2 participants