]> git.lizzy.rs Git - minetest.git/blobdiff - src/rollback_interface.cpp
Set proper GLSL pixel shader version
[minetest.git] / src / rollback_interface.cpp
index c35ad57811b0687b914098104010b385ad493ee4..bffe0a82c9b7caa6764424a90bfdfa0f7fd43e6c 100644 (file)
@@ -155,7 +155,7 @@ bool RollbackAction::applyRevert(Map *map, InventoryManager *imgr, IGameDef *gam
                                } else {
                                        NodeMetadata *meta = map->getNodeMetadata(p);
                                        if (!meta) {
-                                               meta = new NodeMetadata(gamedef);
+                                               meta = new NodeMetadata(gamedef->idef());
                                                if (!map->setNodeMetadata(p, meta)) {
                                                        delete meta;
                                                        infostream << "RollbackAction::applyRevert(): "
@@ -178,7 +178,7 @@ bool RollbackAction::applyRevert(Map *map, InventoryManager *imgr, IGameDef *gam
                                MapBlock *block = map->getBlockNoCreateNoEx(blockpos);
                                if (block) {
                                        block->raiseModified(MOD_STATE_WRITE_NEEDED,
-                                               "NodeMetaRef::reportMetadataChange");
+                                               MOD_REASON_REPORT_META_CHANGE);
                                }
                        } catch (InvalidPositionException &e) {
                                infostream << "RollbackAction::applyRevert(): "
@@ -210,6 +210,7 @@ bool RollbackAction::applyRevert(Map *map, InventoryManager *imgr, IGameDef *gam
                                        << inventory_index << " too large in "
                                        << "inventory list \"" << inventory_list << "\" in "
                                        << inventory_location << std::endl;
+                               return false;
                        }
                        // If item was added, take away item, otherwise add removed item
                        if (inventory_add) {