Просмотр исходного кода

Do not pass dt to update() and do not update physics graphs

Daniele Bartolini 12 лет назад
Родитель
Сommit
f0865b70f2
2 измененных файлов с 3 добавлено и 4 удалено
  1. 2 3
      engine/physics/PhysicsWorld.cpp
  2. 1 1
      engine/physics/PhysicsWorld.h

+ 2 - 3
engine/physics/PhysicsWorld.cpp

@@ -130,13 +130,12 @@ void PhysicsWorld::set_gravity(const Vector3& g)
 }
 
 //-----------------------------------------------------------------------------
-void PhysicsWorld::update(float dt)
+void PhysicsWorld::update()
 {
+	// Run with fixed timestep
 	m_scene->simulate(1.0 / 60.0);
 
 	while (!m_scene->fetchResults());
-
-	m_graph_manager.update();
 }
 
 } // namespace crown

+ 1 - 1
engine/physics/PhysicsWorld.h

@@ -61,7 +61,7 @@ public:
 	Vector3		gravity() const;
 	void		set_gravity(const Vector3& g);
 
-	void		update(float dt);
+	void		update();
 
 public: