mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
size of agent ID must be included in bytes read per avatar
This commit is contained in:
parent
e8fbfcab05
commit
11b2271b91
2 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue