Repository navigation
bugfix(worldbuilder): Keep new and resized maps within the map size limit - #3501
tintinhamans wants to merge 2 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughWorldHeightMap now separates total-map and playable-map size validation. Both WorldBuilder variants use playable-size checks when creating or resizing maps and when loading configured defaults. New-map dialogs request confirmation when the bordered map area exceeds 1024² cells. ChangesHeight-map validation
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
ba592df to
e9975d0
Compare
[Medium impact] The PR appears safe to merge; no blocking issues were found.
|
|
As WWB2 mentioned in the other PR, we might want to limit the map Area rather than hard limit dimensions, since it's the overall area that causes problems and not just individual dimensions. So the Max area being 4096 squared etc |
e9975d0 to
679d8f2
Compare
The limit is now an area of 4096x4096. Each side is still capped at 8192 because shoreline tiles pack coordinates into 16 bits and the shroud texture spans the map. |
679d8f2 to
e1712e5
Compare
df25ef5 to
c12b922
Compare
c12b922 to
a72fd31
Compare
|
Needs rebase? |
a72fd31 to
17859d5
Compare
17859d5 to
89141b1
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
53dcd0b2-9b8e-4756-a3d8-b91caf5b9538
📒 Files selected for processing: 4
Generals/Code/Tools/WorldBuilder/include/WHeightMapEdit.hGenerals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cppGeneralsMD/Code/Tools/WorldBuilder/include/WHeightMapEdit.hGeneralsMD/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
4701c4e to
9594539
Compare
5700853 to
db6eb02
Compare
xezon
left a comment
There was a problem hiding this comment.
Why do we need 2 different map validation methods? It looks like world builder uses a different one than game does.
db6eb02 to
b0f7488
Compare
both use the same validator now. the playable wrapper just safely adds the border before calling it. |
b0f7488 to
0e70107
Compare
0e70107 to
f985cba
Compare
This change has 2 commits: resize-memory fixes first, then map-size validation.
The new map and resize dialog accepts sizes the loader rejects.
isValidTotalMapSizeenforcesMAX_MAP_DIMENSIONandMAX_MAP_AREAon dimensions that include the border.isValidPlayableMapSizechecks that adding the border cannot overflow, then calls the same validator. WorldBuilder validates creation, resizing and saved defaults, and warns above 1024x1024.resizealso keeps the extra height-data row allocated by the constructor, frees its arrays withdelete[], and clears the new flip and cliff state.