Procházet zdrojové kódy

Re-enable scene graphs update

Daniele Bartolini před 12 roky
rodič
revize
89c6971266
2 změnil soubory, kde provedl 11 přidání a 11 odebrání
  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();
 		(*uu)->update();
 	}
 	}
 
 
-	// Update scene graphs
-	//m_scenegraph_manager.update();
-
 	// Update physics world
 	// 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);
 							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)
 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;
 	sound.volume = vol;
 }
 }
 
 
+//-----------------------------------------------------------------------------
+RenderWorld& World::render_world()
+{
+	return m_render_world;
+}
+
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 PhysicsWorld* World::physics_world()
 PhysicsWorld* World::physics_world()
 {
 {

+ 1 - 1
engine/World.h

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