Skip to content

[TA Sub-PR 05] Fix unit deployment with attachments into buildings - #2444

Open
FS-21 wants to merge 1 commit into
Phobos-developers:feature/techno-attachmentfrom
FS-21:feature/ta-subpr-05-deploy-into-fix
Open

FS-21 wants to merge 1 commit into
Phobos-developers:feature/techno-attachmentfrom
FS-21:feature/ta-subpr-05-deploy-into-fix

Conversation

@FS-21

@FS-21 FS-21 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

This is the split nº 5 (of 16 commits) of the PR #2437 for code review as suggested by the original author.
Once reviewed all 16 I should merge them into TA branch and then update the branch with latest develop to have TA updated.

Without this a deployable vehicle like a MCV with a child attached will make the deploy impossible.

What kind of change is this?

  • New feature, vanilla bugfix or enhancement of a released feature - changelog, docs and credits entries are needed.
  • Improvement to a new (unreleased) feature - docs and credits entries are needed; no changelog entry (Skip Changelog).
  • Bugfix to a new (unreleased) feature - credits entry is needed; no changelog or docs entries (Skip Changelog, Skip Docs).
  • Bugfix to an old (released) feature - changelog and credits entries are needed; no docs entry (Skip Docs).
  • Completely minor change (e.g. a typo fix) - no entries are needed (Skip Changelog, Skip Docs, Skip Credits).

The next text is generated by AI:

Summary

Fixes an issue where deployable vehicles (DeploysInto) possessing attached child technos failed to deploy into structures because the cell placement check detected the unit's own attachments as blocking obstacles, and TechnoExt::Deployer was not set during UnitClass::TryToDeploy.

Changes

  1. Deployer Context:

    • Added hooks around UnitClass_TryToDeploy_CanCreateHere in Hooks.DeploysInto.cpp to assign TechnoExt::Deployer = pThis before CanCreateHere, and clear it on success or failure.
  2. Cell Placement Check:

    • In CellClass_CanThisExistHere_IgnoreSomething, ignore attached child technos if they belong to TechnoExt::Deployer (IsChildOf), or do not occupy cells as a child (DoesntOccupyCellAsChild), or if their parent is deploying into the building.

@FS-21 FS-21 added No test needed This PR is simple enough, or changes no in-game logic, so no in-game testing is required. Skip Changelog PR does not need a changelog entry in docs/Whats-New.md Skip Docs PR does not need a documentation entry Skip Credits PR does not need a credits entry in CREDITS.md labels Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No test needed This PR is simple enough, or changes no in-game logic, so no in-game testing is required. Skip Changelog PR does not need a changelog entry in docs/Whats-New.md Skip Credits PR does not need a credits entry in CREDITS.md Skip Docs PR does not need a documentation entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant