Fix crash when adding physics scene with auto simulation

#2180
This commit is contained in:
Wojtek Figat
2024-02-06 11:49:12 +01:00
parent f1055aa0e3
commit 6d757946c5

View File

@@ -203,8 +203,11 @@ void Physics::Simulate(float dt)
void Physics::CollectResults()
{
if (DefaultScene)
DefaultScene->CollectResults();
for (PhysicsScene* scene : Scenes)
{
if (scene->GetAutoSimulation())
scene->CollectResults();
}
}
bool Physics::IsDuringSimulation()