Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions wurst/util/UnitSpatialIndex.wurst
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ public function rebuildSpatialIndexGrid(vec2 worldMin, vec2 worldMax)
let u = indexedUnit[idx]
if u != null
let pos = u.getPos()
// Stamp the tick wherever a live position is read, or the query would keep padding this
// entry by a full sweep cycle despite its cache having just been made exact.
lastSweepTick[idx] = sweepTick
linkIntoCell(idx, cellAt(pos.x, pos.y), pos.x, pos.y)

/** Internal-grid cell for tests and diagnostics. */
Expand Down