1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Store the maximum player file tries in a constant

This commit is contained in:
ShadowNinja 2014-06-23 15:55:47 -04:00
parent e491f8cd48
commit 089fc010ab
3 changed files with 7 additions and 2 deletions

View file

@ -455,7 +455,7 @@ Player *ServerEnvironment::loadPlayer(const std::string &playername)
RemotePlayer testplayer(m_gamedef);
std::string path = players_path + playername;
for (u32 i = 0; i < 1000; i++) {
for (u32 i = 0; i < PLAYER_FILE_ALTERNATE_TRIES; i++) {
// Open file and deserialize
std::ifstream is(path.c_str(), std::ios_base::binary);
if (!is.good()) {