1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 20:53:52 +00:00

Clear mActors when reseting the simulation. Otherwise during next run we can try to read past the end of mActorsFrameData.

This commit is contained in:
fredzio 2021-08-09 14:46:41 +02:00 committed by Frederic Chardon
parent cb7a4d20dd
commit 8e3984ae5a

View file

@ -279,6 +279,7 @@ namespace MWPhysics
std::unique_lock lock(mSimulationMutex);
mBudget.reset(mDefaultPhysicsDt);
mAsyncBudget.reset(0.0f);
mActors.clear();
mActorsFrameData.clear();
for (const auto& [_, actor] : actors)
{