diff options
Diffstat (limited to 'src/client/mesh_generator_thread.h')
-rw-r--r-- | src/client/mesh_generator_thread.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/mesh_generator_thread.h b/src/client/mesh_generator_thread.h index 1b734bc06..552b2a9f0 100644 --- a/src/client/mesh_generator_thread.h +++ b/src/client/mesh_generator_thread.h @@ -21,6 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <ctime> #include <mutex> +#include <unordered_map> +#include <unordered_set> #include "mapblock_mesh.h" #include "threading/mutex_auto_lock.h" #include "util/thread.h" @@ -81,8 +83,9 @@ public: private: Client *m_client; std::vector<QueuedMeshUpdate *> m_queue; - std::set<v3s16> m_urgents; - std::map<v3s16, CachedMapBlockData *> m_cache; + std::unordered_set<v3s16> m_urgents; + std::unordered_map<v3s16, CachedMapBlockData *> m_cache; + u64 m_next_cache_cleanup; // milliseconds std::mutex m_mutex; // TODO: Add callback to update these when g_settings changes |