Repository navigation
fix(terrain): honor the configured map size - #1141
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Problem
MapFunctions::newMap(true)constructs a map usingSettings::mapSize, and point indexing/boundary checks use that same size. However,TerrainGenerator::generateTerrainuses the separateTerrainSettings::mapSizedefault of 128.With the supported
Game.MapSizeset to 32, the map consequently receives 16,384 nodes instead of 1,024. The node vector's coordinate stride no longer agrees withPoint::toIndex()or the map dimensions. This is reproducible through the productionMapFunctionsAPI, without malformed save files or out-of-range coordinates.Change
Generate terrain using the configured map size already used by the owning map and point operations. Add a regression checking node count and the final coordinate for a 32x32 map. This does not implement the separate terrain-generation dialog in #975.
Validation