mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Simplify player modification checks
This commit is contained in:
parent
b37bff72f1
commit
cd0df0d5e7
7 changed files with 30 additions and 48 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue