Fix crash when replacing wire-layer buildings

This commit is contained in:
tobspr 2022-02-25 15:56:33 +01:00
parent 7e436f2f2e
commit 679e7f168c
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ export class WiredPinsSystem extends GameSystemWithFilter {
const worldPos = entity.components.StaticMapEntity.localTileToWorld(slot.pos);
const collidingEntity = this.root.map.getLayerContentXY(worldPos.x, worldPos.y, "wires");
if (collidingEntity) {
const staticComp = entity.components.StaticMapEntity;
const staticComp = collidingEntity.components.StaticMapEntity;
assertAlways(
staticComp
.getMetaBuilding()