Don't track liquids for rollback because of too much log

master
Perttu Ahola 2012-07-27 02:46:54 +03:00
parent f7dc72f8aa
commit 508b7b5e51
2 changed files with 6 additions and 5 deletions

View File

@ -538,7 +538,7 @@ minetest.register_chatcommand("rollback_check", {
}) })
minetest.register_chatcommand("rollback", { minetest.register_chatcommand("rollback", {
params = "<player name> [<seconds>] | :liquid [<seconds>]", params = "<player name> [<seconds>] | :<actor> [<seconds>]",
description = "revert actions of a player; default for <seconds> is 60", description = "revert actions of a player; default for <seconds> is 60",
privs = {rollback=true}, privs = {rollback=true},
func = function(name, param) func = function(name, param)

View File

@ -1623,8 +1623,9 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
/* /*
If something goes wrong, liquids are to blame 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 loopcount = 0;
u32 initial_size = m_transforming_liquid.size(); u32 initial_size = m_transforming_liquid.size();
@ -1831,19 +1832,19 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
n0.setContent(new_node_content); n0.setContent(new_node_content);
// Get old node for rollback // Get old node for rollback
RollbackNode rollback_oldnode(this, p0, m_gamedef); //RollbackNode rollback_oldnode(this, p0, m_gamedef);
// Set node // Set node
setNode(p0, n0); setNode(p0, n0);
// Report for rollback // Report for rollback
if(m_gamedef->rollback()) /*if(m_gamedef->rollback())
{ {
RollbackNode rollback_newnode(this, p0, m_gamedef); RollbackNode rollback_newnode(this, p0, m_gamedef);
RollbackAction action; RollbackAction action;
action.setSetNode(p0, rollback_oldnode, rollback_newnode); action.setSetNode(p0, rollback_oldnode, rollback_newnode);
m_gamedef->rollback()->reportAction(action); m_gamedef->rollback()->reportAction(action);
} }*/
v3s16 blockpos = getNodeBlockPos(p0); v3s16 blockpos = getNodeBlockPos(p0);
MapBlock *block = getBlockNoCreateNoEx(blockpos); MapBlock *block = getBlockNoCreateNoEx(blockpos);