1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-20 15:40:32 +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)
{