perf: avoid iterator

This commit is contained in:
cha0s 2019-05-02 20:56:32 -05:00
parent 987ae715d5
commit a01b03b622

View File

@ -191,7 +191,9 @@ export class Informed extends decorate(Trait) {
const areaToInform = this.entity.areaToInform;
const room = this.entity.room;
// Write over entity list for every layer.
for (const {index, layer} of room.layers) {
const layers = room.layers.layers;
for (const index in layers) {
const layer = layers[index];
const visibleEntities = layer.visibleEntities(areaToInform);
const reduceEntityListRaw = {};
for (let i = 0; i < visibleEntities.length; ++i) {