Merge pull request #235 from birarda/master

fix bytes read per avatar due to inclusion of agent ID
This commit is contained in:
birarda 2013-05-07 15:06:06 -07:00
commit a1d9ee5bfe
2 changed files with 6 additions and 3 deletions

View file

@ -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;

View file

@ -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;