mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-11 09:11:50 +00:00
Added gameInitialized check to onEntityChanged in map_view.js
This commit is contained in:
parent
e041369a7d
commit
c12bc13df6
@ -51,6 +51,10 @@ export class MapView extends BaseMap {
|
|||||||
* @param {Entity} entity
|
* @param {Entity} entity
|
||||||
*/
|
*/
|
||||||
onEntityChanged(entity) {
|
onEntityChanged(entity) {
|
||||||
|
if (!this.root.gameInitialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const staticComp = entity.components.StaticMapEntity;
|
const staticComp = entity.components.StaticMapEntity;
|
||||||
if (staticComp) {
|
if (staticComp) {
|
||||||
const rect = staticComp.getTileSpaceBounds();
|
const rect = staticComp.getTileSpaceBounds();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user