diff --git a/common/src/path.rs b/common/src/path.rs index ec30217a23..77906f8a56 100644 --- a/common/src/path.rs +++ b/common/src/path.rs @@ -74,7 +74,7 @@ impl Route { if vol.get(next).map(|b| b.is_solid()).unwrap_or(false) { None } else { - let next_tgt = next.map(|e| e as f32) + Vec3::new(0.5, 0.5, 0.0); + let next_tgt = next.map(|e| e as f32) + 0.5; if ((pos - next_tgt) * Vec3::new(1.0, 1.0, 0.3)).magnitude_squared() < (traversal_tolerance * 2.0).powf(2.0) { diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index 1f1059a16f..9b3d664b95 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -303,7 +303,7 @@ impl Block { pub fn get_ori(&self) -> Option { match self.kind { - BlockKind::Window1 | BlockKind::Window2 | BlockKind::Window3 | BlockKind::Window4 => { + BlockKind::Window1 | BlockKind::Window2 | BlockKind::Window3 | BlockKind::Window4 | BlockKind::Door => { Some(self.color[0] & 0b111) }, _ => None, diff --git a/voxygen/src/scene/terrain.rs b/voxygen/src/scene/terrain.rs index 9982181167..b9f8391a25 100644 --- a/voxygen/src/scene/terrain.rs +++ b/voxygen/src/scene/terrain.rs @@ -1607,7 +1607,7 @@ impl Terrain { (BlockKind::Door, 0), make_model( "voxygen.voxel.sprite.door.door-0", - Vec3::new(-6.5, -6.5, 0.0), + Vec3::new(-5.5, -5.5, 0.0), ), ), ] diff --git a/world/src/site/settlement/building/archetype/house.rs b/world/src/site/settlement/building/archetype/house.rs index fb86d4f494..1302d667d3 100644 --- a/world/src/site/settlement/building/archetype/house.rs +++ b/world/src/site/settlement/building/archetype/house.rs @@ -309,6 +309,30 @@ impl Archetype for House { // Wall if dist == width && profile.y < roof_level { + // Doors + if center_offset.x > 0 && center_offset.y > 0 + && bound_offset.x > 0 && bound_offset.x < width + && profile.y < ceil_height + && branch.attr.storey_fill.has_lower() + { + return Some(if (bound_offset.x == (width - 1) / 2 || bound_offset.x == (width - 1) / 2 + 1) && profile.y <= foundation_height + 3 { + if profile.y == foundation_height + 1 { + BlockMask::new( + Block::new(BlockKind::Door, if bound_offset.x == (width - 1) / 2 { + make_meta(ori.flip()) + } else { + make_meta(ori.flip()) + Rgb::new(4, 0, 0) + }), + structural_layer, + ) + } else { + empty.with_priority(structural_layer) + } + } else { + wall + }); + } + if bound_offset.x == bound_offset.y || profile.y == ceil_height { // Support beams return Some(log);