Skip to content

Instantly share code, notes, and snippets.

Created June 26, 2013 18:26
Show Gist options
  • Save anonymous/5623a49f1d5893ef48ff to your computer and use it in GitHub Desktop.
Save anonymous/5623a49f1d5893ef48ff to your computer and use it in GitHub Desktop.
diff --git a/src/map.cpp b/src/map.cpp
index 6261289..487cff4 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -3688,6 +3688,12 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
if(g_settings->getBool("ignore_world_load_errors")){
errorstream<<"Ignoring block load error. Duck and cover! "
<<"(ignore_world_load_errors)"<<std::endl;
+ MapBlock *block;
+ block = sector->createBlankBlockNoInsert(p3d.Y);
+ sector->insertBlock(block);
+ if(save_after_load)
+ saveBlock(block);
+ block->resetModified();
} else {
throw SerializationError("Invalid block data in database");
//assert(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment