From: Perttu Ahola Date: Tue, 29 Nov 2011 22:39:36 +0000 (+0200) Subject: Fix player getting reset to 0,0 at connect if being far from 0,0 X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=49e4f55b09808e5fbc7fbd5fc0b02937df82671d;p=zefram%2Fminetest%2Fminetest_engine.git Fix player getting reset to 0,0 at connect if being far from 0,0 --- diff --git a/src/environment.cpp b/src/environment.cpp index 41ba52a6..9748f6b7 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -472,6 +472,8 @@ void ServerEnvironment::deSerializePlayers(const std::string &savedir) newplayer = true; } + ServerRemotePlayer *srp = static_cast(player); + // Load player { infostream<<"Reading player "<deSerialize(is); + srp->deSerialize(is); + srp->m_last_good_position = srp->getBasePosition(); + srp->m_last_good_position_age = 0; } if(newplayer)