Skip to content

Add terrain storage change synchronization - #11666

Open
aidencurtis wants to merge 1 commit into
Facepunch:masterfrom
aidencurtis:terrain-undo-fix
Open

Add terrain storage change synchronization#11666
aidencurtis wants to merge 1 commit into
Facepunch:masterfrom
aidencurtis:terrain-undo-fix

Conversation

@aidencurtis

Copy link
Copy Markdown
Contributor

Pull Request

Thanks for contributing to s&box ❤️
Please fill out the sections below to help us review your change efficiently.


Summary

Adds ApplyStorageChanges which applies storage changes to collision and rendering and notifies terrain-dependent systems.

Previously, modifying terrain would trigger OnTerrainModified, but using the undo feature in the editor would not. This centralizes the storage changes triggered by the Undo process to prevent future drift and alerts terrain-dependent systems like normal terrain operations.

Motivation & Context

Editor user experience improvement. Without this change, systems subscribing to OnTerrainModified would not be notified appropriately when a terrain change was undone via the Undo system.

Implementation Details

Screenshots / Videos (if applicable)

Checklist

  • Code follows existing style and conventions
  • No unnecessary formatting or unrelated changes
  • Public APIs are documented (if applicable)
  • Unit tests added where applicable and all passing
  • I’m okay with this PR being rejected or requested to change 🙂

@antopilo antopilo self-assigned this Aug 15, 2026
@antopilo antopilo added the triaged triaged pull-requests are replicated on the internal sbox repo label Aug 15, 2026
Add ApplyStorageChanges to upload CPU edits, refresh collision, and notify
terrain-dependent systems through a single path. Use it for brush undo/redo
and texture painting, preserving half-open dirty-region bounds at terrain
edges.

Add integration coverage for notification ordering, collision-only updates,
and final-row/final-column synchronization.
@handsomematt handsomematt added triaged triaged pull-requests are replicated on the internal sbox repo and removed triaged triaged pull-requests are replicated on the internal sbox repo labels Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triaged triaged pull-requests are replicated on the internal sbox repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants