mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-19 02:24:37 +08:00
Update EcsPool.cs
This commit is contained in:
parent
f809fd8c71
commit
e95a6225a7
@ -396,14 +396,15 @@ namespace DCFApixels.DragonECS
|
||||
#endif
|
||||
_isDenseEntitiesDelayedValid = true;
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private int GetFreeItemIndex(int entityID)
|
||||
{
|
||||
if (_denseEntitiesDelayedCount >= _capacity - 1)
|
||||
if (_denseEntitiesDelayedCount >= _capacity)
|
||||
{
|
||||
UpdateDenseEntities();
|
||||
}
|
||||
|
||||
if (_itemsCount >= _capacity - 1)
|
||||
if (_itemsCount + 1 >= _capacity)
|
||||
{
|
||||
Resize(_items.Length << 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user