Skip to content

Commit

Permalink
fix UI when only top view data exist
Browse files Browse the repository at this point in the history
  • Loading branch information
cff29546 committed Sep 16, 2023
1 parent 4813110 commit 75bfff4
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions html/pzmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,18 @@ const Map = class {
this.tiles = Array(this.layers).fill(0);
this.info = {};
this.loadMapInfo('base');
this.w = this.info.base.w * this.info.base.scale;
this.h = this.info.base.h * this.info.base.scale;
this.scale = this.info.base.scale;
this.x0 = this.info.base.x0;
this.y0 = this.info.base.y0;
this.sqr = this.info.base.sqr;
this.cell_rects = this.info.base.cell_rects;
for (let type of ['zombie', 'foraging', 'room', 'objects']) {
this.loadMapInfo(type);
this.overlays[type] = 0;
if (this.info.base) {
this.w = this.info.base.w * this.info.base.scale;
this.h = this.info.base.h * this.info.base.scale;
this.scale = this.info.base.scale;
this.x0 = this.info.base.x0;
this.y0 = this.info.base.y0;
this.sqr = this.info.base.sqr;
this.cell_rects = this.info.base.cell_rects;
for (let type of ['zombie', 'foraging', 'room', 'objects']) {
this.loadMapInfo(type);
this.overlays[type] = 0;
}
}
}

Expand Down

0 comments on commit 75bfff4

Please sign in to comment.