Jelajahi Sumber

world: fix build

Daniele Bartolini 5 tahun lalu
induk
melakukan
67a152278a
2 mengubah file dengan 5 tambahan dan 3 penghapusan
  1. 5 1
      src/world/world.cpp
  2. 0 2
      src/world/world.h

+ 5 - 1
src/world/world.cpp

@@ -577,11 +577,15 @@ void World::post_level_loaded_event()
 	event_stream::write(_events, EventType::LEVEL_LOADED, ev);
 	event_stream::write(_events, EventType::LEVEL_LOADED, ev);
 }
 }
 
 
-#if CROWN_DEVELOPMENT
+#if CROWN_DEBUG
 void World::disable_unit_callbacks()
 void World::disable_unit_callbacks()
 {
 {
 	_script_world->_disable_callbacks = true;
 	_script_world->_disable_callbacks = true;
 }
 }
+#else
+void World::disable_unit_callbacks()
+{
+}
 #endif
 #endif
 
 
 void spawn_units(World& w, const UnitResource* ur, const Vector3& pos, const Quaternion& rot, const Vector3& scl, const UnitId* unit_lookup)
 void spawn_units(World& w, const UnitResource* ur, const Vector3& pos, const Quaternion& rot, const Vector3& scl, const UnitId* unit_lookup)

+ 0 - 2
src/world/world.h

@@ -215,12 +215,10 @@ struct World
 	///
 	///
 	void post_level_loaded_event();
 	void post_level_loaded_event();
 
 
-#if CROWN_DEVELOPMENT
 	/// After this call, units will no longer receive spawned(), unspawned() or any
 	/// After this call, units will no longer receive spawned(), unspawned() or any
 	/// other callback. This is used only by the editor to prevent user logic to
 	/// other callback. This is used only by the editor to prevent user logic to
 	/// interfere with editor's assumptions.
 	/// interfere with editor's assumptions.
 	void disable_unit_callbacks();
 	void disable_unit_callbacks();
-#endif
 };
 };
 
 
 void spawn_units(World& w, const UnitResource* ur, const Vector3& pos, const Quaternion& rot, const Vector3& scl, const UnitId* unit_lookup);
 void spawn_units(World& w, const UnitResource* ur, const Vector3& pos, const Quaternion& rot, const Vector3& scl, const UnitId* unit_lookup);