forked from teamnwah/openmw-tes3coop
Fix the physics debug drawer lagging a frame behind
This commit is contained in:
parent
b33fe8fb62
commit
16e080e252
3 changed files with 6 additions and 0 deletions
|
@ -1175,7 +1175,10 @@ namespace MWPhysics
|
|||
|
||||
CProfileManager::Reset();
|
||||
CProfileManager::Increment_Frame_Counter();
|
||||
}
|
||||
|
||||
void PhysicsSystem::debugDraw()
|
||||
{
|
||||
if (mDebugDrawer.get())
|
||||
mDebugDrawer->step();
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ namespace MWPhysics
|
|||
bool toggleCollisionMode();
|
||||
|
||||
void stepSimulation(float dt);
|
||||
void debugDraw();
|
||||
|
||||
std::vector<MWWorld::Ptr> getCollisions(const MWWorld::Ptr &ptr, int collisionGroup, int collisionMask); ///< get handles this object collides with
|
||||
osg::Vec3f traceDown(const MWWorld::Ptr &ptr, float maxHeight);
|
||||
|
|
|
@ -1392,6 +1392,8 @@ namespace MWWorld
|
|||
}
|
||||
if(player != results.end())
|
||||
moveObjectImp(player->first, player->second.x(), player->second.y(), player->second.z());
|
||||
|
||||
mPhysics->debugDraw();
|
||||
}
|
||||
|
||||
bool World::castRay (float x1, float y1, float z1, float x2, float y2, float z2)
|
||||
|
|
Loading…
Reference in a new issue