summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/StatSerializer.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-05-13 13:53:15 +0200
committerandrew <xdotftw@gmail.com>2014-05-13 13:53:15 +0200
commit466ff2204f18fda5f4f0f0b3e19f671d57747c24 (patch)
tree164ce181d4c1bde9801f51296e497a4a603796dc /src/WorldStorage/StatSerializer.cpp
parentMovement Statistics (diff)
downloadcuberite-466ff2204f18fda5f4f0f0b3e19f671d57747c24.tar
cuberite-466ff2204f18fda5f4f0f0b3e19f671d57747c24.tar.gz
cuberite-466ff2204f18fda5f4f0f0b3e19f671d57747c24.tar.bz2
cuberite-466ff2204f18fda5f4f0f0b3e19f671d57747c24.tar.lz
cuberite-466ff2204f18fda5f4f0f0b3e19f671d57747c24.tar.xz
cuberite-466ff2204f18fda5f4f0f0b3e19f671d57747c24.tar.zst
cuberite-466ff2204f18fda5f4f0f0b3e19f671d57747c24.zip
Diffstat (limited to 'src/WorldStorage/StatSerializer.cpp')
-rw-r--r--src/WorldStorage/StatSerializer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/WorldStorage/StatSerializer.cpp b/src/WorldStorage/StatSerializer.cpp
index 66e5e1e9e..74113941c 100644
--- a/src/WorldStorage/StatSerializer.cpp
+++ b/src/WorldStorage/StatSerializer.cpp
@@ -11,15 +11,18 @@
-cStatSerializer::cStatSerializer(const AString& a_WorldName, const AString& a_PlayerName, cStatManager* a_Manager)
+cStatSerializer::cStatSerializer(const AString & a_WorldName, const AString & a_PlayerName, cStatManager * a_Manager)
: m_Manager(a_Manager)
{
+ // Even though stats are shared between worlds, they are (usually) saved
+ // inside the folder of the default world.
+
AString StatsPath;
Printf(StatsPath, "%s/stats", a_WorldName.c_str());
m_Path = StatsPath + "/" + a_PlayerName + ".json";
- /* Ensure that the directory exists. */
+ // Ensure that the directory exists.
cFile::CreateFolder(FILE_IO_PREFIX + StatsPath);
}