Skip to content

Only half of Entities holding Relation to a Target Entity have their Component Removed on Despawn(target) #11

@thygrrr

Description

@thygrrr

I came across a somewhat serious bug in Archetypes.cs while working on my fork.

image

This issue comes from the forward-iteration of the table while it has elements being removed from it. This skips every other Entity.

foreach (var tableWithType in tablesWithType)
{
    for (var i = 0; i < tableWithType.Count; i++)
    {
        RemoveComponent(type, tableWithType.Identities[i]);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions