Skip to content

Avoid unnecessary DirtyField() calls#5620

Merged
metalgearsloth merged 2 commits intospace-wizards:masterfrom
ElectroJr:misc-physics-delta-state
Jan 27, 2025
Merged

Avoid unnecessary DirtyField() calls#5620
metalgearsloth merged 2 commits intospace-wizards:masterfrom
ElectroJr:misc-physics-delta-state

Conversation

@ElectroJr
Copy link
Copy Markdown
Member

Small collection of miscellaneous physics & delta state changes:

  • Makes the client's DirtyField() check IGameTiming.InPrediction
  • Makes various setter methods in PhysicsSystem check the dirty bool
    • I'm not sure why, but they were all removed in Add sourcegenned field deltas #5155
    • I'm not even sure if they're required if InPrediction gets checked, but might keep using the argument while it exists.
  • Adds a new DirtyFields() method for simultaneously marking several fields as dirty.
    • I love params ReadOnlySpan<>
  • Sets PhysicsComponent.Force to zero when changing body type. I think this was just accidentally removed in Add sourcegenned field deltas #5155?

This PR also removes the Pure attribute from the EntityQuery<T>.Resolve() methods, making them them consistent with the other Resolves.

@metalgearsloth metalgearsloth merged commit 3f37846 into space-wizards:master Jan 27, 2025
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.

2 participants