Skip to content

Commit c3eb825

Browse files
committed
Revert "world: avoid callbacks all over"
This reverts commit 75e669d.
1 parent d9ce0d0 commit c3eb825

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/world/world.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ World::~World()
183183
destroy_gui(*gui);
184184
}
185185

186+
// Destroy units
187+
for (u32 i = 0; i < array::size(_units); ++i)
188+
_unit_manager->destroy(_units[i]);
189+
186190
// Destroy subsystems
187191
CE_DELETE(*_allocator, _animation_state_machine);
188192
CE_DELETE(*_allocator, _mesh_animation_player);
@@ -194,12 +198,6 @@ World::~World()
194198
CE_DELETE(*_allocator, _scene_graph);
195199
destroy_debug_line(*_lines);
196200

197-
// Destroy units.
198-
for (u32 i = 0; i < array::size(_units); ++i) {
199-
CE_ENSURE(_unit_manager->alive(_units[i]));
200-
_unit_manager->destroy(_units[i]);
201-
}
202-
203201
_marker = 0;
204202
}
205203

0 commit comments

Comments
 (0)