More work on sending/receiving avatars. Introduces low priority send queue, so that the server send thread is not stalled when sending loads of avatars. Not functional yet.

This commit is contained in:
lotodore
2007-10-06 12:50:19 +00:00
parent 7dd1013396
commit 3bb28de5ae
7 changed files with 147 additions and 25 deletions
+11 -1
View File
@@ -32,6 +32,8 @@
#include <game.h>
#include <playerinterface.h>
#include <boost/bind.hpp>
#include <sstream>
using namespace std;
@@ -529,10 +531,18 @@ ClientStateWaitSession::InternalProcess(ClientThread &client, boost::shared_ptr<
}
else if (packet->ToNetPacketRetrieveAvatar())
{
// Before letting us join the lobby, the server requests our avatar.
NetPacketRetrieveAvatar::Data retrieveAvatarData;
packet->ToNetPacketRetrieveAvatar()->GetData(retrieveAvatarData);
// Before letting us join the lobby, the server requests our avatar.
NetPacketList tmpList;
if (client.GetAvatarManager().AvatarFileToNetPackets(
client.GetContext().GetAvatarFile(),
retrieveAvatarData.requestId,
tmpList))
{
client.GetSender().SendLowPrio(client.GetContext().GetSocket(), tmpList);
}
}
return retVal;