Reimplement adjacent tile region and height check - #227
Open
Krarilotus wants to merge 1 commit into
Open
Krarilotus wants to merge 1 commit into
Krarilotus wants to merge 1 commit into
Conversation
TheRedDaemon
requested changes
Sep 11, 2026
TheRedDaemon
left a comment
Contributor
There was a problem hiding this comment.
This is missing the matching status file update.
Comment on lines
+9
to
+12
| int direction = 0; | ||
| int* neighborOffset = this->directionTranslationMatrix[row]; | ||
| for (; direction < 8; ++direction, ++neighborOffset) { | ||
| int neighborTile = tile + *neighborOffset; |
Contributor
There was a problem hiding this comment.
Can you check if this loop would also work by index access and iterating over the directions?
Basically a normal for-loop and then using this->directionTranslationMatrix[row][direction]?
If not might neighborOffset[direction] possible, avoiding the pointer?
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.
TL;DR: Reconstruct the native neighboring-tile region and height check.
Moat selection uses this helper to ask whether a neighboring tile belongs to an area within the native height limit.
Changes: Implement
TileMapState::findTileInSameAreaAndNoTooHeightDifferenceat0x500370: examine eight offsets, allow at most 16 units upward and compare the signed region ID.Review / testing: DLL build and 100% effective reccmp were reported; two independent setup instructions have different ordering. TheRedDaemon requested the matching status-file update, which is still absent from the current diff. This reconstructs existing behavior rather than changing moat routing.