]> git.lizzy.rs Git - minetest.git/blobdiff - src/clientmap.h
Don't erase modified_blocks
[minetest.git] / src / clientmap.h
index 786f35b77f0a7ecd73dfac6b73e59d6438a27ded..7f63704d3cb9f30188d0ebb18e562df2c7be2143 100644 (file)
@@ -22,6 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes_extrabloated.h"
 #include "map.h"
+#include <set>
+#include <map>
 
 struct MapDrawControl
 {
@@ -128,7 +130,7 @@ class ClientMap : public Map, public scene::ISceneNode
        // Check if sector was drawn on last render()
        bool sectorWasDrawn(v2s16 p)
        {
-               return (m_last_drawn_sectors.find(p) != NULL);
+               return (m_last_drawn_sectors.find(p) != m_last_drawn_sectors.end());
        }
        
 private:
@@ -143,9 +145,9 @@ class ClientMap : public Map, public scene::ISceneNode
        f32 m_camera_fov;
        JMutex m_camera_mutex;
 
-       core::map<v3s16, MapBlock*> m_drawlist;
+       std::map<v3s16, MapBlock*> m_drawlist;
        
-       core::map<v2s16, bool> m_last_drawn_sectors;
+       std::set<v2s16> m_last_drawn_sectors;
 };
 
 #endif