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

@ -297,7 +297,7 @@ void RemotePlayer::save(std::string savedir)
savedir += DIR_DELIM;
std::string path = savedir + m_name;
for (u32 i = 0; i < 1000; i++) {
for (u32 i = 0; i < PLAYER_FILE_ALTERNATE_TRIES; i++) {
if (!fs::PathExists(path)) {
// Open file and serialize
std::ostringstream ss(std::ios_base::binary);