Skip to content

Commit

Permalink
redraw buffers when loading maps
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Aug 7, 2023
1 parent ee4195c commit 877dfbf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion flixel/tile/FlxTilemap.hx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,15 @@ class FlxTypedTilemap<Tile:FlxTile> extends FlxBaseTilemap<Tile>
{
_checkBufferChanges = true;
}


override function loadMapHelper(tileGraphic, tileWidth = 0, tileHeight = 0, ?autoTile, startingIndex = 0, drawIndex = 1, collideIndex = 1)
{
// redraw buffers, fixes https://github.com/HaxeFlixel/flixel/issues/2882
_checkBufferChanges = true;

super.loadMapHelper(tileGraphic, tileWidth, tileHeight, autoTile, startingIndex, drawIndex, collideIndex);
}

override function cacheGraphics(tileWidth:Int, tileHeight:Int, tileGraphic:FlxTilemapGraphicAsset):Void
{
if ((tileGraphic is FlxFramesCollection))
Expand Down

0 comments on commit 877dfbf

Please sign in to comment.