diff --git a/src/world/tiles/tilemap.rs b/src/world/tiles/tilemap.rs index 52f4e52..092ceff 100644 --- a/src/world/tiles/tilemap.rs +++ b/src/world/tiles/tilemap.rs @@ -316,7 +316,11 @@ impl TileMap { let idx = ChunkData::pos_to_index(lx, ly, z); let word = idx / 32; let clear_mask = !(1u32 << (idx % 32)); - chunk.stand_in_floor[word] &= clear_mask; + // Only clear stand_on_floor. Removing a floor tile means the space becomes + // air — stand_in_floor should stay true so entities can pass through. + // Only stand_on_floor needs clearing: the tile above can no longer stand on + // a tile that doesn't exist. Clearing stand_in_floor made dug positions + // impassable, causing entities to fall through multiple levels. chunk.stand_on_floor[word] &= clear_mask; chunk.tile_ids[idx] = 0; }