From 77fad1c341787f11ee3b8aeaa5c58fe6ebbdebb6 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 6 Jul 2021 10:13:33 -0400 Subject: Added the ability to pan camera to a warp point --- src/map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 4019428..956e370 100644 --- a/src/map.h +++ b/src/map.h @@ -79,7 +79,7 @@ public: const std::vector& getPrototypes() const { return prototypes_; } - const vec2i& getWarpPoint(const std::string& name) const { return warpPoints_.at(name); } + const vec2i& getWarpPoint(std::string_view name) const { return warpPoints_.find(name)->second; } const std::vector& getTriggers() const { return triggers_; } @@ -103,7 +103,7 @@ private: std::string tilesetFilename_; int tilesetColumns_; std::vector prototypes_; - std::map warpPoints_; + std::map> warpPoints_; std::vector triggers_; std::map zones_; std::string music_; -- cgit 1.4.1