Skip to content

Commit eb7564b

Browse files
authored
Merge pull request #75 from tobspr-games/tceprepk/map-view-optimization
Added gameInitialized check to onEntityChanged in map_view.js
2 parents e041369 + c12bc13 commit eb7564b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/js/game/map_view.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export class MapView extends BaseMap {
5151
* @param {Entity} entity
5252
*/
5353
onEntityChanged(entity) {
54+
if (!this.root.gameInitialized) {
55+
return;
56+
}
57+
5458
const staticComp = entity.components.StaticMapEntity;
5559
if (staticComp) {
5660
const rect = staticComp.getTileSpaceBounds();

0 commit comments

Comments
 (0)