Jelajahi Sumber

Re-enable scene graphs update

Daniele Bartolini 12 tahun lalu
induk
melakukan
89c6971266
2 mengubah file dengan 11 tambahan dan 11 penghapusan
  1. 10 10
      engine/World.cpp
  2. 1 1
      engine/World.h

+ 10 - 10
engine/World.cpp

@@ -141,11 +141,11 @@ void World::update(float dt)
 		(*uu)->update();
 	}
 
-	// Update scene graphs
-	//m_scenegraph_manager.update();
-
 	// Update physics world
-	m_physics_world.update(dt);
+	m_physics_world.update();
+
+	// Update scene graphs
+	m_scenegraph_manager.update();
 }
 
 //-----------------------------------------------------------------------------
@@ -155,12 +155,6 @@ void World::render(Camera* camera)
 							camera->m_view_width, camera->m_view_height);
 }
 
-//-----------------------------------------------------------------------------
-RenderWorld& World::render_world()
-{
-	return m_render_world;
-}
-
 //-----------------------------------------------------------------------------
 CameraId World::create_camera(SceneGraph& sg, int32_t node)
 {
@@ -309,6 +303,12 @@ void World::set_sound_volume(SoundId id, const float vol)
 	sound.volume = vol;
 }
 
+//-----------------------------------------------------------------------------
+RenderWorld& World::render_world()
+{
+	return m_render_world;
+}
+
 //-----------------------------------------------------------------------------
 PhysicsWorld* World::physics_world()
 {

+ 1 - 1
engine/World.h

@@ -98,7 +98,6 @@ public:
 	Sprite*								lookup_sprite(SpriteId sprite);
 	Actor*								lookup_actor(ActorId actor);
 
-	RenderWorld&						render_world();
 	void								update(float dt);
 	void								render(Camera* camera);
 
@@ -122,6 +121,7 @@ public:
 	void								set_sound_range(SoundId sound, const float range);
 	void								set_sound_volume(SoundId sound, const float vol);
 
+	RenderWorld&						render_world();
 	PhysicsWorld*						physics_world();
 
 private: