Skip to content

bugfix(partitioning): Correct cell world coordinate calculation for overlap checks#477

Open
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/partition-cell-coords
Open

bugfix(partitioning): Correct cell world coordinate calculation for overlap checks#477
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/partition-cell-coords

Conversation

@seer-by-sentry
Copy link
Copy Markdown

Fixes CLIENT-4ES. The issue was that: Incorrect world-to-cell coordinate conversion in doCircleFillPrecise causes COI array overflow, leading to memory corruption and access violation during iteration.

  • The calculation for cellWorldX and cellWorldY was updated to correctly determine the lower-left corner of a cell.
  • Previously, x * cellSize and y * cellSize were used, which did not account for the world extents offset.
  • Now, ThePartitionManager->getCellCenterPos is used to get the cell's center, which correctly considers m_worldExtents.lo.
  • halfCellSize is then subtracted from the cell's center coordinates to derive the lower-left corner, aligning with the expectations of doesCircleOverlapCell.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 13741494

Not quite right? Click here to continue debugging with Seer.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants