Skip to content

Commit daae418

Browse files
author
Nathan Bolton
committed
Fix to tilemap not being ready
1 parent 6dbc594 commit daae418

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

js/rpg_sprites/Spriteset_Map.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ Spriteset_Map.prototype.updateParallax = function() {
153153
Spriteset_Map.prototype.updateTilemap = function() {
154154
this._tilemap.origin.x = $gameMap.displayX() * $gameMap.tileWidth();
155155
this._tilemap.origin.y = $gameMap.displayY() * $gameMap.tileHeight();
156+
157+
// Fix tilemap not being ready, by LTN Gaming
158+
if (this._tilemap.bitmaps) {
159+
if (!this.isTilesetReady && this._tilemap.bitmaps.every(bitmap => bitmap.isRequestReady())) {
160+
this._tilemap.refresh();
161+
this._tilemap.refreshTileset()
162+
this.isTilesetReady = true
163+
}
164+
}
156165
};
157166

158167
Spriteset_Map.prototype.updateShadow = function() {

0 commit comments

Comments
 (0)