diff --git a/world/src/site2/plot/tavern.rs b/world/src/site2/plot/tavern.rs index e9dede1c51..e647626dab 100644 --- a/world/src/site2/plot/tavern.rs +++ b/world/src/site2/plot/tavern.rs @@ -1390,7 +1390,7 @@ impl Structure for Tavern { }, (true, true) => { painter.sprite( - dir.vec2(edge, rot_edge).with_z(room.bounds.min.z), + dir.abs().vec2(edge, rot_edge).with_z(room.bounds.min.z), SpriteKind::CookingPot, ); }, diff --git a/world/src/site2/util/mod.rs b/world/src/site2/util/mod.rs index 83491664cf..a57542c931 100644 --- a/world/src/site2/util/mod.rs +++ b/world/src/site2/util/mod.rs @@ -110,12 +110,14 @@ impl Dir { } } + /// Create a vec2 where x is in the direction of `self`, and y is anti + /// clockwise of `self`. pub fn vec2(self, x: i32, y: i32) -> Vec2 { match self { Dir::X => Vec2::new(x, y), - Dir::NegX => Vec2::new(x, y), + Dir::NegX => Vec2::new(-x, -y), Dir::Y => Vec2::new(y, x), - Dir::NegY => Vec2::new(y, x), + Dir::NegY => Vec2::new(-y, -x), } }