fix: destruction dependency

This commit is contained in:
cha0s 2024-11-05 18:09:14 -06:00
parent 11457a3c75
commit ceaa7c1287

View File

@ -9,7 +9,9 @@ export default class Harmful extends Component {
const script = this.harmScript.clone();
script.locals.other = other;
script.locals.entity = entity;
entity.Ticking.add(script.ticker());
const promise = entity.Ticking.add(script.ticker());
ecs.addDestructionDependency(entity.id, promise);
ecs.addDestructionDependency(other.id, promise);
}
}
}