mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 09:54: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;
|
int newChunk = chunk | maskBit.mask;
|
||||||
if (chunk != newChunk)
|
if (chunk != newChunk)
|
||||||
{
|
{
|
||||||
|
UpVersion();
|
||||||
chunk = newChunk;
|
chunk = newChunk;
|
||||||
_poolComponentCounts[componentTypeID]++;
|
_poolComponentCounts[componentTypeID]++;
|
||||||
_entities[entityID].componentsCount++;
|
_entities[entityID].componentsCount++;
|
||||||
@ -259,6 +260,7 @@ namespace DCFApixels.DragonECS
|
|||||||
int newChunk = chunk & ~maskBit.mask;
|
int newChunk = chunk & ~maskBit.mask;
|
||||||
if (chunk != newChunk)
|
if (chunk != newChunk)
|
||||||
{
|
{
|
||||||
|
UpVersion();
|
||||||
_poolComponentCounts[componentTypeID]--;
|
_poolComponentCounts[componentTypeID]--;
|
||||||
var count = --_entities[entityID].componentsCount;
|
var count = --_entities[entityID].componentsCount;
|
||||||
chunk = newChunk;
|
chunk = newChunk;
|
||||||
|
Loading…
Reference in New Issue
Block a user