fix: Activate player units for STC theft battle - #1498
Merged
Conversation
The Mechanicus STC theft battle created obj_ncombat and its obj_pnunit formation columns, then called instance_deactivate_all_safe before reactivating only obj_ncombat. The following roster setup uses instance_nearest to select each unit's destination column. Because instance_nearest ignores deactivated instances, it returned noone for every marine, so their placement blocks were skipped. The obj_ncombat setup alarm then had no populated column against which to measure the player formation and threw an error. Refs: Adeptus-Dominus#1494
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1494
Tested by reproducing the reported crash in game prior to the fix. Post fix the crash could not be reproduced.
Summary by cubic
Fixes the crash in the Mechanicus STC theft battle by reactivating player unit columns alongside combat units.
Closes #1494. The battle deactivated all instances but only reactivated
obj_ncombat, leavingobj_pnunitcolumns inactive.instance_nearestignores deactivated instances, so marine placement columns were skipped and the setup alarm threw an error.Written for commit ad77c39. Summary will update on new commits.