Skip to content

Bug in ECS::removeEntity #7

Description

@ScottAlexanderCameron

Line 49 of ecs.cpp moves the last entity pointer of the array to the index where the entity being removed currently is. The first element of the pair representing the entity is supposed to be the index in the array where that entity lives. The entity moved on this line now lives at index destIndex, while the first element of the pair is still srcIndex. Perhaps after the move, there should also be the following assignment:

entities[destIndex]->first = destIndex;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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