1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-09 16:21:51 +00:00

Merge pull request #75 from tobspr-games/tceprepk/map-view-optimization

Added gameInitialized check to onEntityChanged in map_view.js
This commit is contained in:
TcePrepK 2025-06-12 17:03:08 +03:00 committed by GitHub
commit eb7564b1a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,6 +51,10 @@ export class MapView extends BaseMap {
* @param {Entity} entity
*/
onEntityChanged(entity) {
if (!this.root.gameInitialized) {
return;
}
const staticComp = entity.components.StaticMapEntity;
if (staticComp) {
const rect = staticComp.getTileSpaceBounds();