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:
lotodore
2007-10-11 20:42:44 +00:00
parent 488e909838
commit 5218e038d4
5 changed files with 69 additions and 3 deletions
+16 -1
View File
@@ -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
{