1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Save the user missions in the user profile directory

- It fixes issue #11.
This commit is contained in:
Mathieu Schroeter 2017-09-14 19:29:47 +02:00
parent 9b052fa8a2
commit 92d96d6ce2

View File

@ -120,7 +120,10 @@ CDecor::Write (Sint32 rank, bool bUser, Sint32 world, Sint32 time, Sint32 total)
AddUserPath (filename);
}
else
filename = string_format (GetBaseDir () + "data/world%.3d.blp", rank);
{
filename = string_format ("data/world%.3d.blp", rank);
AddUserPath (filename);
}
file = fopen (filename.c_str (), "wb");
if (file == nullptr)
@ -207,6 +210,11 @@ CDecor::Read (
filename = string_format ("data/user%.3d.blp", rank);
AddUserPath (filename);
}
else if (rank >= 200)
{
filename = string_format ("data/world%.3d.blp", rank);
AddUserPath (filename);
}
else
filename = string_format (GetBaseDir () + "data/world%.3d.blp", rank);
@ -343,6 +351,11 @@ CDecor::FileExist (
filename = string_format ("data/user%.3d.blp", rank);
AddUserPath (filename);
}
else if (rank >= 200)
{
filename = string_format ("data/world%.3d.blp", rank);
AddUserPath (filename);
}
else
filename = string_format (GetBaseDir () + "data/world%.3d.blp", rank);