fix avatar count, HandData crash (closes #1754)

This commit is contained in:
Stephen Birarda 2014-01-30 09:45:09 -08:00
parent c58f44f54a
commit 84ef757af4
2 changed files with 7 additions and 2 deletions

View file

@ -3225,7 +3225,8 @@ void Application::displayStats() {
glPointSize(1.0f);
int totalAvatars = _avatarManager.size();
// we need to take one avatar out so we don't include ourselves
int totalAvatars = _avatarManager.size() - 1;
int totalServers = NodeList::getInstance()->size();
if (mirrorEnabled) {

View file

@ -234,7 +234,11 @@ void AvatarManager::processAvatarMixerDatagram(const QByteArray& datagram, const
// copy the rest of the packet to the avatarData holder so we can read the next Avatar from there
dummyAvatarByteArray.resize(numDummyByteArrayHeaderBytes);
dummyAvatarByteArray += datagram.mid(bytesRead);
// make this Avatar's UUID the UUID in the packet and tack the remaining data onto the end
dummyAvatarByteArray.replace(numDummyByteArrayHeaderBytes - NUM_BYTES_RFC4122_UUID,
NUM_BYTES_RFC4122_UUID + datagram.size() - bytesRead,
datagram.mid(bytesRead));
// have the matching (or new) avatar parse the data from the packet
bytesRead += matchingAvatar->parseData(dummyAvatarByteArray);