MCPcopy Create free account
hub / github.com/crownengine/crown / destroy

Method destroy

src/world/unit_manager.cpp:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void UnitManager::destroy(UnitId unit)
50{
51 CE_ASSERT(alive(unit), "Unit (%u.%u) has been destroyed already", unit.id(), unit.index());
52
53 const u32 idx = unit.index();
54 ++_generation[idx];
55 queue::push_back(_free_indices, idx);
56
57 trigger_destroy_callbacks(unit);
58}
59
60void UnitManager::register_destroy_callback(UnitDestroyCallback *udc)
61{

Callers 1

Calls 2

idMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected