X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fio%2FWorldSave.cpp;h=529d0d91a5784da2f1cf2cea55ae62a1fc87b75c;hb=HEAD;hp=d483c915939407426fbab0d4a7c70387a9a11bce;hpb=ed3bdc028edc0ecb5835d1c0bf18dbc59b342daf;p=blank.git diff --git a/src/io/WorldSave.cpp b/src/io/WorldSave.cpp index d483c91..529d0d9 100644 --- a/src/io/WorldSave.cpp +++ b/src/io/WorldSave.cpp @@ -2,6 +2,7 @@ #include "filesystem.hpp" #include "TokenStreamReader.hpp" +#include "../app/error.hpp" #include #include @@ -144,6 +145,7 @@ void WorldSave::Read(Player &player) const { } } player.GetEntity().SetState(state); + player.Update(0); } void WorldSave::Write(const Player &player) const { @@ -195,7 +197,7 @@ void WorldSave::Write(Chunk &chunk) const { // check if it's because of a missing path component if (errno != ENOENT) { // nope, fatal - throw runtime_error(strerror(errno)); + throw SysError(); } string dir_path(path); dir_path.erase(dir_path.find_last_of("\\/"));