Skip to content

Commit

Permalink
Critical bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
evolutionleo committed May 10, 2021
1 parent ecc267b commit bb54851
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Binary file added LDtkParser.yymps
Binary file not shown.
Binary file added LDtkParserMin.yymps
Binary file not shown.
18 changes: 16 additions & 2 deletions scripts/LDtkParser/LDtkParser.gml
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,23 @@ function LDtkLoad(level_name) {
//var empty_tile = 0
//tilemap_clear(tilemap, empty_tile)

// this is layer's cell size
//var cwid = this_layer.__cWid
//var chei = this_layer.__cHei

// this is tileset's cell size
var cwid = -1
var chei = -1

for(var ts = 0; ts < array_length(data.defs.tilesets); ++ts) {
var tileset_def = data.defs.tilesets[ts]

if tileset_def.uid == this_layer.__tilesetDefUid {
cwid = tileset_def.__cWid
chei = tileset_def.__cHei
}
}

var cwid = this_layer.__cWid
var chei = this_layer.__cHei

var tile_size = this_layer.__gridSize

Expand Down

0 comments on commit bb54851

Please sign in to comment.