Skip to content

Commit

Permalink
fix attrs value not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
InnocentusLime authored and not-fl3 committed Sep 10, 2024
1 parent 43cd774 commit 931b46c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tiled/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,16 +399,16 @@ pub fn load_map(
.iter()
.map(|tile| {
find_tileset(*tile).map(|tileset| {
let flip_flags = (*tile & TILE_FLIP_FLAGS) >> 28;
let tile = *tile & !TILE_FLIP_FLAGS;

let attrs = tileset
.tiles
.iter()
.find(|t| t.id as u32 == *tile - tileset.firstgid)
.find(|t| t.id as u32 == tile - tileset.firstgid)
.and_then(|tile| tile.ty.clone())
.unwrap_or("".to_owned());

let flip_flags = (*tile & TILE_FLIP_FLAGS) >> 28;
let tile = *tile & !TILE_FLIP_FLAGS;

Tile {
id: tile - tileset.firstgid,
tileset: tileset.name.clone(),
Expand Down

0 comments on commit 931b46c

Please sign in to comment.