Skip to content

Spatial Query Optimizations - #2858

Merged
Z1Meme merged 3 commits into
devfrom
Spatial-Query-Optimizations
Aug 22, 2026
Merged

Z1Meme merged 3 commits into
devfrom
Spatial-Query-Optimizations

Conversation

@johnoclockdk

@johnoclockdk johnoclockdk commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

Spatial Query Optimizations

  • Construction placement & crafting proximity checks → TTL-cached spatial hash.
  • Foundation glitch checks (furnace/campfire) → spatial hash (behavior unchanged).
  • Crop harvest permission checks → spatial hash (security semantics preserved).
  • Zombie, exploder & gasser corpse-smell detection → character spatial grid / aiTargetSpatialMap.
  • Gasser gas charge & gas cloud damage → character spatial grid / aiTargetSpatialMap.
  • Screamer scream detection → character spatial grid / aiTargetSpatialMap.
  • Gas grenade damage ticks → grid narrowed.
  • Trap AOE (SNARE, BARBED_WIRE, TRAP_FIRE) → grid narrowed using getClientsInRange() / getVehiclesInRange().

@github-actions github-actions Bot added the client-2016 About the 2016 client label Jul 31, 2026
@QuentinGruber QuentinGruber added this to the 0.50.0 milestone Aug 1, 2026
@johnoclockdk
johnoclockdk requested a review from Z1Meme August 21, 2026 19:54
Z1Meme and others added 2 commits August 21, 2026 22:32
- screamer: restore vanished/hidden guard dropped in the rewrite so vanished/hidden
  players aren't hit by the SCREAM modifier
- construction: force a fresh stacked-placement hash in detectStackedPlacement so the
  anti-stack check always sees just-placed constructions (cache kept for the proximity
  readers where 1s staleness is harmless)
- trap: use getVehiclesInRange for the vehicle-detonation scan instead of iterating all
  vehicles, completing the intended optimization
fix: address review feedback on spatial query optimizations
@Z1Meme
Z1Meme merged commit e85b0ac into dev Aug 22, 2026
18 checks passed
@Z1Meme
Z1Meme deleted the Spatial-Query-Optimizations branch August 22, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-2016 About the 2016 client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants