Browse Source

Defaulting recorder state to All instead of None because otherwise validation will trigger an assert

Jorrit Rouwe 2 years ago
parent
commit
3963ad13f9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Jolt/Physics/PhysicsSystem.cpp

+ 1 - 1
Jolt/Physics/PhysicsSystem.cpp

@@ -2395,7 +2395,7 @@ bool PhysicsSystem::RestoreState(StateRecorder &inStream)
 {
 	JPH_PROFILE_FUNCTION();
 
-	EStateRecorderState state = EStateRecorderState::None;
+	EStateRecorderState state = EStateRecorderState::All; // Set this value for validation. If a partial state is saved, validation will not work anyway.
 	inStream.Read(state);
 
 	if (uint8(state) & uint8(EStateRecorderState::Global))