From 11b2271b918a6a03d2a5e50e1acb133b3522d48a Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 7 May 2013 15:05:31 -0700 Subject: [PATCH] size of agent ID must be included in bytes read per avatar --- eve/src/main.cpp | 2 +- libraries/avatars/src/AvatarData.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/eve/src/main.cpp b/eve/src/main.cpp index b8025d5dd8..cb774d70a7 100644 --- a/eve/src/main.cpp +++ b/eve/src/main.cpp @@ -17,7 +17,7 @@ const int EVE_AGENT_LISTEN_PORT = 55441; -const float RANDOM_POSITION_MAX_DIMENSION = 5.0f; +const float RANDOM_POSITION_MAX_DIMENSION = 10.0f; const float DATA_SEND_INTERVAL_MSECS = 15; const float MIN_AUDIO_SEND_INTERVAL_SECS = 10; diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 3136b3e30a..e1af4da4a2 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -128,11 +128,14 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) { // called on the other agents - assigns it to my views of the others int AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) { - // increment to push past the packet header and agent ID - sourceBuffer += sizeof(PACKET_HEADER_HEAD_DATA) + sizeof(uint16_t); + // increment to push past the packet header + sourceBuffer += sizeof(PACKET_HEADER_HEAD_DATA); unsigned char* startPosition = sourceBuffer; + // push past the agent ID + sourceBuffer += + sizeof(uint16_t); + // Body world position memcpy(&_position, sourceBuffer, sizeof(float) * 3); sourceBuffer += sizeof(float) * 3;