1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-04 17:00:23 +02:00

Simplify player modification checks

This commit is contained in:
ShadowNinja
2014-08-03 16:19:07 -04:00
parent b37bff72f1
commit cd0df0d5e7
7 changed files with 30 additions and 48 deletions

View File

@ -449,11 +449,11 @@ Player *ServerEnvironment::loadPlayer(const std::string &playername)
bool newplayer = false;
bool found = false;
if (!player) {
player = new RemotePlayer(m_gamedef);
player = new RemotePlayer(m_gamedef, playername.c_str());
newplayer = true;
}
RemotePlayer testplayer(m_gamedef);
RemotePlayer testplayer(m_gamedef, "");
std::string path = players_path + playername;
for (u32 i = 0; i < PLAYER_FILE_ALTERNATE_TRIES; i++) {
// Open file and deserialize