Don't wait endlessly for player or avatar requests to complete if the other side does not have the required data. Send notifications and react accordingly.
This commit is contained in:
@@ -418,7 +418,7 @@ ClientThread::SetPlayerInfo(unsigned id, const PlayerInfo &info, bool retrieveAv
|
||||
m_tempAvatarMap[id] = boost::shared_ptr<AvatarData>();
|
||||
}
|
||||
|
||||
// Remove from request list.
|
||||
// Remove it from the request list.
|
||||
m_playerInfoRequestList.remove(id);
|
||||
|
||||
// Notify GUI
|
||||
@@ -426,6 +426,14 @@ ClientThread::SetPlayerInfo(unsigned id, const PlayerInfo &info, bool retrieveAv
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
ClientThread::SetUnknownPlayer(unsigned id)
|
||||
{
|
||||
// Just remove it from the request list.
|
||||
m_playerInfoRequestList.remove(id);
|
||||
// TODO log error
|
||||
}
|
||||
|
||||
void
|
||||
ClientThread::SetNewGameAdmin(unsigned id)
|
||||
{
|
||||
@@ -484,6 +492,13 @@ ClientThread::CompleteTempAvatarData(unsigned playerId)
|
||||
SetPlayerInfo(playerId, tmpPlayerInfo, false);
|
||||
}
|
||||
|
||||
void
|
||||
ClientThread::SetUnknownAvatar(unsigned playerId)
|
||||
{
|
||||
m_tempAvatarMap.erase(playerId);
|
||||
// TODO log error
|
||||
}
|
||||
|
||||
const ClientContext &
|
||||
ClientThread::GetContext() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user