From 508b7b5e51bd2e193fb182bb9247555154d78087 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 27 Jul 2012 02:46:54 +0300 Subject: [PATCH] Don't track liquids for rollback because of too much log --- builtin/chatcommands.lua | 2 +- src/map.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/chatcommands.lua b/builtin/chatcommands.lua index 49ae8c63..28b5f4b1 100644 --- a/builtin/chatcommands.lua +++ b/builtin/chatcommands.lua @@ -538,7 +538,7 @@ minetest.register_chatcommand("rollback_check", { }) minetest.register_chatcommand("rollback", { - params = " [] | :liquid []", + params = " [] | : []", description = "revert actions of a player; default for is 60", privs = {rollback=true}, func = function(name, param) diff --git a/src/map.cpp b/src/map.cpp index 73412210..85369304 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1623,8 +1623,9 @@ void Map::transformLiquids(core::map & modified_blocks) /* If something goes wrong, liquids are to blame + NOTE: Do not track liquids; it causes huge amounts of rollback log */ - RollbackScopeActor rollback_scope(m_gamedef->rollback(), "liquid"); + //RollbackScopeActor rollback_scope(m_gamedef->rollback(), "liquid"); u32 loopcount = 0; u32 initial_size = m_transforming_liquid.size(); @@ -1831,19 +1832,19 @@ void Map::transformLiquids(core::map & modified_blocks) n0.setContent(new_node_content); // Get old node for rollback - RollbackNode rollback_oldnode(this, p0, m_gamedef); + //RollbackNode rollback_oldnode(this, p0, m_gamedef); // Set node setNode(p0, n0); // Report for rollback - if(m_gamedef->rollback()) + /*if(m_gamedef->rollback()) { RollbackNode rollback_newnode(this, p0, m_gamedef); RollbackAction action; action.setSetNode(p0, rollback_oldnode, rollback_newnode); m_gamedef->rollback()->reportAction(action); - } + }*/ v3s16 blockpos = getNodeBlockPos(p0); MapBlock *block = getBlockNoCreateNoEx(blockpos); -- 2.30.2