This commit is contained in:
Mikhail 2024-11-08 15:32:51 +08:00
parent 9f8861dff4
commit a8e550d6f5

View File

@ -1010,10 +1010,10 @@ namespace DCFApixels.DragonECS
{ {
if ((chunk & bit) != 0) if ((chunk & bit) != 0)
{ {
componentIDs[arrayIndex] = poolIndex; componentIDs[arrayIndex++] = poolIndex;
itemsCount--; itemsCount--;
if (itemsCount <= 0) { return itemsCount; } if (itemsCount <= 0) { return arrayIndex; }
} }
poolIndex++; poolIndex++;
bit <<= 1; bit <<= 1;
@ -1030,10 +1030,10 @@ namespace DCFApixels.DragonECS
{ {
if ((chunk & bit) != 0) if ((chunk & bit) != 0)
{ {
componentIDs[arrayIndex] = poolIndex; componentIDs[arrayIndex++] = poolIndex;
itemsCount--; itemsCount--;
if (itemsCount <= 0) { return itemsCount; } if (itemsCount <= 0) { return arrayIndex; }
} }
poolIndex++; poolIndex++;
bit <<= 1; bit <<= 1;