Browse Source

Off-by-one error in tiled map reading

Getty Ritter 4 years ago
parent
commit
39528ccf23
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/res.rs

+ 1 - 1
src/res.rs

@@ -65,7 +65,7 @@ pub fn world_from_file<P: AsRef<Path>>(w: &mut specs::World, path: P) {
                         DrawLayer::Decoration => e.with(Decoration),
                     };
 
-                    let e = if tilesets[0].tiles[n as usize].properties["pass"]
+                    let e = if tilesets[0].tiles[(n-1) as usize].properties["pass"]
                         == tiled::PropertyValue::BoolValue(false)
                     {
                         e.with(Blocking::new())