More work on rejoin: The server now detects when a rejoin is possible and allows the player to login directly, without waiting for a possible existing connection to be terminated. A session GUID is stored in the cache directory on client side for this purpose.
This commit is contained in:
@@ -60,9 +60,23 @@ ClientPlayer::getMyUniqueID() const
|
||||
return myUniqueID;
|
||||
}
|
||||
|
||||
void
|
||||
ClientPlayer::setMyGuid(const std::string &theValue)
|
||||
{
|
||||
myGuid = theValue;
|
||||
}
|
||||
|
||||
std::string
|
||||
ClientPlayer::getMyGuid() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return myGuid;
|
||||
}
|
||||
|
||||
PlayerType
|
||||
ClientPlayer::getMyType() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return myType;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ public:
|
||||
|
||||
int getMyID() const;
|
||||
unsigned getMyUniqueID() const;
|
||||
void setMyGuid(const std::string &theValue);
|
||||
std::string getMyGuid() const;
|
||||
PlayerType getMyType() const;
|
||||
|
||||
void setMyDude(int theValue);
|
||||
@@ -151,6 +153,7 @@ private:
|
||||
// Konstanten
|
||||
const int myID;
|
||||
const unsigned myUniqueID;
|
||||
std::string myGuid;
|
||||
const PlayerType myType;
|
||||
std::string myName;
|
||||
std::string myAvatar;
|
||||
|
||||
Reference in New Issue
Block a user