mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
fix world versioning
This commit is contained in:
parent
10b873ac30
commit
30080e51e7
@ -245,6 +245,7 @@ namespace DCFApixels.DragonECS
|
||||
int newChunk = chunk | maskBit.mask;
|
||||
if (chunk != newChunk)
|
||||
{
|
||||
UpVersion();
|
||||
chunk = newChunk;
|
||||
_poolComponentCounts[componentTypeID]++;
|
||||
_entities[entityID].componentsCount++;
|
||||
@ -259,6 +260,7 @@ namespace DCFApixels.DragonECS
|
||||
int newChunk = chunk & ~maskBit.mask;
|
||||
if (chunk != newChunk)
|
||||
{
|
||||
UpVersion();
|
||||
_poolComponentCounts[componentTypeID]--;
|
||||
var count = --_entities[entityID].componentsCount;
|
||||
chunk = newChunk;
|
||||
|
Loading…
Reference in New Issue
Block a user