From 235078bae4ada8b7aed3c1cdf95d8288aaf81df4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 3 Mar 2023 15:24:33 +0100 Subject: flush scenery popup work --- src/local-coords.hpp | 1 + src/scenery.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/local-coords.hpp b/src/local-coords.hpp index a26d8c80..eef511d6 100644 --- a/src/local-coords.hpp +++ b/src/local-coords.hpp @@ -15,6 +15,7 @@ struct local_coords final { constexpr local_coords(T x, T y) noexcept; constexpr local_coords(std::uint8_t x, std::uint8_t y) noexcept : x{x}, y{y} {} constexpr std::uint8_t to_index() const noexcept { return y*TILE_MAX_DIM + x; } + constexpr bool operator==(const local_coords&) const noexcept = default; template explicit constexpr operator Math::Vector2() const noexcept { return Math::Vector2(T(x), T(y)); } template explicit constexpr operator Math::Vector3() const noexcept { return Math::Vector3(T(x), T(y), T(0)); } diff --git a/src/scenery.cpp b/src/scenery.cpp index 17f2066c..fca45411 100644 --- a/src/scenery.cpp +++ b/src/scenery.cpp @@ -77,7 +77,7 @@ void scenery_ref::rotate(rotation new_r) bool scenery_ref::can_activate() const noexcept { - return frame.interactive; + return atlas && frame.interactive; } bool scenery_ref::update(float dt) -- cgit v1.2.3