Demos #10

Merged
Mergul merged 39 commits from Demos into master 2020-05-28 18:48:45 +02:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 3719cdaee0 - Show all commits

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();