1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Player data to Database (#5475)

* Player data to Database

Add player data into databases (SQLite3 & PG only)

PostgreSQL & SQLite: better POO Design for databases

Add --migrate-players argument to server + deprecation warning

* Remove players directory if empty
This commit is contained in:
Loïc Blot 2017-04-23 14:35:08 +02:00 committed by GitHub
parent dda171d292
commit 29ab20c272
31 changed files with 1555 additions and 378 deletions

View file

@ -764,9 +764,10 @@ bool LuaEntitySAO::collideWithObjects() const
// No prototype, PlayerSAO does not need to be deserialized
PlayerSAO::PlayerSAO(ServerEnvironment *env_, u16 peer_id_, bool is_singleplayer):
PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id_,
bool is_singleplayer):
UnitSAO(env_, v3f(0,0,0)),
m_player(NULL),
m_player(player_),
m_peer_id(peer_id_),
m_inventory(NULL),
m_damage(0),
@ -819,7 +820,7 @@ PlayerSAO::~PlayerSAO()
delete m_inventory;
}
void PlayerSAO::initialize(RemotePlayer *player, const std::set<std::string> &privs)
void PlayerSAO::finalize(RemotePlayer *player, const std::set<std::string> &privs)
{
assert(player);
m_player = player;