mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 02:53:53 +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:
parent
cb7a4d20dd
commit
8e3984ae5a
1 changed files with 1 additions and 0 deletions
|
@ -279,6 +279,7 @@ namespace MWPhysics
|
||||||
std::unique_lock lock(mSimulationMutex);
|
std::unique_lock lock(mSimulationMutex);
|
||||||
mBudget.reset(mDefaultPhysicsDt);
|
mBudget.reset(mDefaultPhysicsDt);
|
||||||
mAsyncBudget.reset(0.0f);
|
mAsyncBudget.reset(0.0f);
|
||||||
|
mActors.clear();
|
||||||
mActorsFrameData.clear();
|
mActorsFrameData.clear();
|
||||||
for (const auto& [_, actor] : actors)
|
for (const auto& [_, actor] : actors)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue