Don't erase modified_blocks
authorIlya Zhuravlev <zhuravlevilya@ya.ru>
Sun, 17 Mar 2013 17:09:05 +0000 (21:09 +0400)
committerIlya Zhuravlev <zhuravlevilya@ya.ru>
Sun, 17 Mar 2013 17:17:13 +0000 (21:17 +0400)
src/map.cpp

index 3d36675a8820c17a57271726e88877860d4216f5..8d8ce0d288ac62f7e802246713d6c209e3c5a47c 100644 (file)
@@ -1324,7 +1324,7 @@ bool Map::addNodeWithEvent(v3s16 p, MapNode n)
                                i = modified_blocks.begin();
                                i != modified_blocks.end(); ++i)
                {
-                       event.modified_blocks.erase(i->first);
+                       event.modified_blocks.insert(i->first);
                }
        }
        catch(InvalidPositionException &e){
@@ -1352,7 +1352,7 @@ bool Map::removeNodeWithEvent(v3s16 p)
                                i = modified_blocks.begin();
                                i != modified_blocks.end(); ++i)
                {
-                       event.modified_blocks.erase(i->first);
+                       event.modified_blocks.insert(i->first);
                }
        }
        catch(InvalidPositionException &e){
@@ -3058,7 +3058,7 @@ MapBlock * ServerMap::emergeBlock(v3s16 p, bool create_blank)
                                        i = modified_blocks.begin();
                                        i != modified_blocks.end(); ++i)
                        {
-                               event.modified_blocks.erase(i->first);
+                               event.modified_blocks.insert(i->first);
                        }
 
                        // Queue event