51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef ROLLBACK_HEADER
-#define ROLLBACK_HEADER
+#pragma once
#include <string>
#include "irr_v3d.h"
class IGameDef;
-class ActionRow;
-class Entity;
+struct ActionRow;
+struct Entity;
class RollbackManager: public IRollbackManager
{
void flush();
void addAction(const RollbackAction & action);
- std::list<RollbackAction> getEntriesSince(time_t first_time);
std::list<RollbackAction> getNodeActors(v3s16 pos, int range,
time_t seconds, int limit);
std::list<RollbackAction> getRevertActions(
const char * getActorName(const int id);
const char * getNodeName(const int id);
bool createTables();
- void initDatabase();
+ bool initDatabase();
bool registerRow(const ActionRow & row);
const std::list<ActionRow> actionRowsFromSelect(sqlite3_stmt * stmt);
ActionRow actionRowFromRollbackAction(const RollbackAction & action);
time_t suspect_t, v3s16 action_p, time_t action_t);
- IGameDef * gamedef;
+ IGameDef *gamedef = nullptr;
std::string current_actor;
- bool current_actor_is_guess;
+ bool current_actor_is_guess = false;
std::list<RollbackAction> action_todisk_buffer;
std::list<RollbackAction> action_latest_buffer;
std::vector<Entity> knownActors;
std::vector<Entity> knownNodes;
};
-
-#endif