mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
[ECS] WorldEnumerator now skips deleted entities
This commit is contained in:
@@ -42,6 +42,11 @@ namespace GlitchyEngine.World
|
||||
while(_currentEntry < _endEntry)
|
||||
{
|
||||
EcsWorld.BitmaskEntry* entry = _currentEntry++;
|
||||
|
||||
// Skip deleted entities
|
||||
if(entry.ID.Index == Entity.InvalidEntity.Index)
|
||||
continue;
|
||||
|
||||
// Check whether or not mask matches
|
||||
if(entry.ComponentMask.MaskMatch(_bitMask))
|
||||
return entry.ID;
|
||||
|
||||
Reference in New Issue
Block a user