1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Improve performance by only updating belt ejectors on the end of paths

This commit is contained in:
tobspr
2020-06-27 09:52:26 +02:00
parent c74843424a
commit c844dd4798
3 changed files with 60 additions and 50 deletions

View File

@@ -186,6 +186,10 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
for (let i = 0; i < this.allEntities.length; ++i) {
const sourceEntity = this.allEntities[i];
const sourceEjectorComp = sourceEntity.components.ItemEjector;
if (!sourceEjectorComp.enabled) {
continue;
}
if (!sourceEjectorComp.cachedConnectedSlots) {
continue;
}