From 49e4f55b09808e5fbc7fbd5fc0b02937df82671d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 30 Nov 2011 00:39:36 +0200 Subject: [PATCH] Fix player getting reset to 0,0 at connect if being far from 0,0 --- src/environment.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.30.2