Fix subcells imported from Gen1 maps #21397
Merged
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.
This should correct a minor issue with RA/CnC imports of infantry. The subcell number is copied as-is, though ORA's assignment for them is different.
OpenRA/OpenRA.Game/Map/MapGrid.cs
Lines 119 to 124 in 7b82d85
Below, each number is the original subcell index. The SW corner becomes the center and a possible duplicate, while the SE corner replaces the SW one.
The Gen2 importer has its own adjustments.
OpenRA/OpenRA.Mods.Cnc/UtilityCommands/ImportGen2MapCommand.cs
Lines 286 to 295 in 4fca85f
I had seen odd subcells on occasion but hadn't dug into it until I noticed Soviets in
allies-03
were less likely to be hidden by trees. That is something the enemy does fairly often in Tiberian Dawn as well.