We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9ce0d0 commit c3eb825Copy full SHA for c3eb825
src/world/world.cpp
@@ -183,6 +183,10 @@ World::~World()
183
destroy_gui(*gui);
184
}
185
186
+ // Destroy units
187
+ for (u32 i = 0; i < array::size(_units); ++i)
188
+ _unit_manager->destroy(_units[i]);
189
+
190
// Destroy subsystems
191
CE_DELETE(*_allocator, _animation_state_machine);
192
CE_DELETE(*_allocator, _mesh_animation_player);
@@ -194,12 +198,6 @@ World::~World()
194
198
CE_DELETE(*_allocator, _scene_graph);
195
199
destroy_debug_line(*_lines);
196
200
197
- // Destroy units.
- for (u32 i = 0; i < array::size(_units); ++i) {
- CE_ENSURE(_unit_manager->alive(_units[i]));
- _unit_manager->destroy(_units[i]);
201
- }
202
-
203
_marker = 0;
204
205
0 commit comments