make ComPlicitNgine a little faster

This commit is contained in:
floralrainfall 2023-07-21 04:53:27 -04:00
parent 4417e3b8cb
commit 6d964be479
3 changed files with 3 additions and 7 deletions

2
Dependencies/Luau vendored

@ -1 +1 @@
Subproject commit 218159140c7d79ae745e646da721d12331f536f5
Subproject commit e25de95445f2d635a125ab463426bb7fda017093

View File

@ -40,7 +40,6 @@ namespace RNR
void ComPlicitNgine::updateTreeRender()
{
m_world->physicsIterateLock.lock();
for(int j = m_dynamicsWorld->getNumCollisionObjects() - 1; j >= 0; j--)
{
btCollisionObject* obj = m_dynamicsWorld->getCollisionObjectArray()[j];
@ -48,8 +47,7 @@ namespace RNR
continue;
PartInstance* part = (PartInstance*)obj->getUserPointer();
part->updateMatrix();
}
m_world->physicsIterateLock.unlock();
}
}
void ComPlicitNgine::updateTree()

View File

@ -166,10 +166,8 @@ namespace RNR
if(m_runService && m_runService->getRunning() && !m_runService->getPaused())
{
m_runService->step(timestep);
m_dynamicsWorld->stepSimulation(timestep, 2);
physicsIterateLock.lock();
m_dynamicsWorld->stepSimulation(timestep, 1);
m_ngine->updateTree();
physicsIterateLock.unlock();
}
return 0.0;
}