Skip to content

ImportGen2Map: Fix imports of malformed maps Fixes #21126#21150

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
tinix0:fix-ts-map-import
Nov 15, 2023
Merged

ImportGen2Map: Fix imports of malformed maps Fixes #21126#21150
PunkPun merged 1 commit into
OpenRA:bleedfrom
tinix0:fix-ts-map-import

Conversation

@tinix0
Copy link
Copy Markdown
Contributor

@tinix0 tinix0 commented Oct 24, 2023

Fixes #21126
Some of the maps in the bug have unmarked comments before the first section in the map INI file, so we need to skip everything beforehand.

Other maps have invalid bottom bounds. The importer checks if we can correctly unproject the bottom bound, and if not, we reduce it, until it is valid.

@teinarss teinarss requested a review from penev92 October 24, 2023 16:22
Comment thread OpenRA.Game/Map/Map.cs Outdated
Comment thread OpenRA.Mods.Common/FileFormats/IniFile.cs Outdated
@tinix0 tinix0 force-pushed the fix-ts-map-import branch 2 times, most recently from a0e095c to 971a081 Compare October 30, 2023 16:27
Copy link
Copy Markdown
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

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

Overall LGTM, but I'd just really like the unprojection logic to be reused. Could it be extracted into a function inside Map?

Copy link
Copy Markdown
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

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

LGTM

@PunkPun PunkPun merged commit 91802e6 into OpenRA:bleed Nov 15, 2023
@PunkPun
Copy link
Copy Markdown
Member

PunkPun commented Nov 15, 2023

Changelog

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A list of TS maps that fail to import

4 participants