aboutsummaryrefslogtreecommitdiff
path: root/src/rollback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rollback.cpp')
-rw-r--r--src/rollback.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rollback.cpp b/src/rollback.cpp
index a6b79393a..3d264b880 100644
--- a/src/rollback.cpp
+++ b/src/rollback.cpp
@@ -107,6 +107,8 @@ RollbackManager::RollbackManager(const std::string & world_path,
RollbackManager::~RollbackManager()
{
+ flush();
+
SQLOK(sqlite3_finalize(stmt_insert));
SQLOK(sqlite3_finalize(stmt_replace));
SQLOK(sqlite3_finalize(stmt_select));
@@ -930,6 +932,7 @@ std::list<RollbackAction> RollbackManager::getEntriesSince(time_t first_time)
std::list<RollbackAction> RollbackManager::getNodeActors(v3s16 pos, int range,
time_t seconds, int limit)
{
+ flush();
time_t cur_time = time(0);
time_t first_time = cur_time - seconds;