fix: remove entities from list before full destroy

This commit is contained in:
cha0s 2019-04-19 14:42:08 -05:00
parent a5e83f7325
commit 4118adf674

View File

@ -35,7 +35,7 @@ export class EntityList extends decorate(class {}) {
this.state = this.state.set(uuid, entity.state);
entity.addTrait('listed');
entity.list = this;
entity.once('destroyed', () => {
entity.once('destroy', () => {
this.removeEntity(entity);
});
this.emit('entityAdded', entity);