1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-08 23:16:39 +00:00

Stop postponing physics for objects that _don't_ have physics

This commit is contained in:
Evil Eye 2025-05-03 17:25:27 +02:00
parent 0e76a6edb5
commit 87014016a2

View file

@ -375,7 +375,6 @@ namespace MWWorld
if (object->getShapeInstance()->mVisualCollisionType == Resource::VisualCollisionType::None) if (object->getShapeInstance()->mVisualCollisionType == Resource::VisualCollisionType::None)
mNavigator.removeObject(DetourNavigator::ObjectId(object), navigatorUpdateGuard); mNavigator.removeObject(DetourNavigator::ObjectId(object), navigatorUpdateGuard);
mPhysics->remove(ptr); mPhysics->remove(ptr);
ptr.mRef->mData.mPhysicsPostponed = false;
} }
else if (mPhysics->getActor(ptr)) else if (mPhysics->getActor(ptr))
{ {
@ -383,6 +382,8 @@ namespace MWWorld
mRendering.removeActorPath(ptr); mRendering.removeActorPath(ptr);
mPhysics->remove(ptr); mPhysics->remove(ptr);
} }
else
ptr.mRef->mData.mPhysicsPostponed = false;
MWBase::Environment::get().getLuaManager()->objectRemovedFromScene(ptr); MWBase::Environment::get().getLuaManager()->objectRemovedFromScene(ptr);
} }