Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GameObject change undo/redo refactor to track different options #3085

Merged
merged 8 commits into from
Oct 24, 2024

Commits on Oct 21, 2024

  1. ReaderMapping: Clear arrays only before inserting new items

    When reading an array, it is only cleared right before new items are going to be added, instead of it being done before an attempt to read the value has been made.
    Vankata453 committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    be27b59 View commit details
    Browse the repository at this point in the history
  2. GameObject change undo/redo refactor to track different options

    `GameObject`, instead of comparing all options against each other, now saves the state of and compares individual ones, so the change data is more memory-efficient.
    
    This way of tracking object changes also allows for proper undo/redo tracking with multiple remote users.
    
    `GameObjectState` was renamed to `GameObjectChange`, since it does not always preserve all object options anymore.
    
    TODO: Proper tilemap tile-change tracking
    Vankata453 committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    f65b0c3 View commit details
    Browse the repository at this point in the history
  3. Fix crash when performing undo/redo on deleted object

    Previously, an assertion was used for performing this check, which was the cause of the crash. It wasn't taken into account performing undo/redo on a remotely-deleted object.
    
    Additionally, the warning message now includes the class name of the object.
    Vankata453 committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    7c4a0f7 View commit details
    Browse the repository at this point in the history
  4. TileMap: Proper tile change tracking

    `TileMap` tile changes are now stored in pairs, containing a tile array index and old/new tile, which takes its place.
    
    Allows for lighter storage in memory for undo/redo, as well as for lower-sized packets and proper remote tile undo/redo with editor remote level networking.
    Vankata453 committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    3d5d306 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3de0fa8 View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2024

  1. Configuration menu
    Copy the full SHA
    626ca5c View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. ObjectSettings: Fix comment

    [ci skip]
    Vankata453 authored Oct 24, 2024
    Configuration menu
    Copy the full SHA
    c941522 View commit details
    Browse the repository at this point in the history
  2. objects -> changes

    [ci skip]
    Vankata453 committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    4fbe7d9 View commit details
    Browse the repository at this point in the history