Some small fixes

This commit is contained in:
Mergul 2020-05-28 09:39:17 +02:00
parent f964d7bf85
commit 3719cdaee0
2 changed files with 3 additions and 1 deletions

View file

@ -56,6 +56,7 @@ struct IDManager
*/
void releaseID(EntityID id) nothrow @nogc
{
optimize();
Data* data = &m_ids_array[id.id];
if (data.counter != id.counter)
return;

View file

@ -2923,6 +2923,7 @@ export struct EntityManager
private void updateBlock(EntitiesBlock* block) @nogc nothrow
{
if(block.added_count == 0)return;
EntityInfo* info = block.type_info;
ushort entities_count = block.entities_count;
block.entities_count += block.added_count;
@ -3056,7 +3057,7 @@ export struct EntityManager
has_work = false;
has_work |= updateEvents();
id_manager.optimize();
//id_manager.optimize();
has_work |= updateBlocks();
has_work |= changeEntities();
has_work |= removeEntities();