mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-22 08:29:13 +02:00
CR feedback
This commit is contained in:
parent
c8bde7146e
commit
212fddbd34
1 changed files with 4 additions and 5 deletions
|
@ -58,13 +58,12 @@ void attachAvatarDataToNode(Node* newNode) {
|
||||||
// 3) if we need to rate limit the amount of data we send, we can use a distance weighted "semi-random" function to
|
// 3) if we need to rate limit the amount of data we send, we can use a distance weighted "semi-random" function to
|
||||||
// determine which avatars are included in the packet stream
|
// determine which avatars are included in the packet stream
|
||||||
// 4) we should optimize the avatar data format to be more compact (100 bytes is pretty wasteful).
|
// 4) we should optimize the avatar data format to be more compact (100 bytes is pretty wasteful).
|
||||||
unsigned char broadcastPacketBuffer[MAX_PACKET_SIZE];
|
|
||||||
unsigned char avatarDataBuffer[MAX_PACKET_SIZE];
|
|
||||||
void broadcastAvatarData(NodeList* nodeList, sockaddr* nodeAddress) {
|
void broadcastAvatarData(NodeList* nodeList, sockaddr* nodeAddress) {
|
||||||
unsigned char* broadcastPacket = (unsigned char*)&::broadcastPacketBuffer[0];
|
static unsigned char broadcastPacketBuffer[MAX_PACKET_SIZE];
|
||||||
|
static unsigned char avatarDataBuffer[MAX_PACKET_SIZE];
|
||||||
|
unsigned char* broadcastPacket = (unsigned char*)&broadcastPacketBuffer[0];
|
||||||
int numHeaderBytes = populateTypeAndVersion(broadcastPacket, PACKET_TYPE_BULK_AVATAR_DATA);
|
int numHeaderBytes = populateTypeAndVersion(broadcastPacket, PACKET_TYPE_BULK_AVATAR_DATA);
|
||||||
unsigned char* currentBufferPosition = NULL;
|
unsigned char* currentBufferPosition = broadcastPacket + numHeaderBytes;
|
||||||
currentBufferPosition = broadcastPacket + numHeaderBytes;
|
|
||||||
int packetLength = currentBufferPosition - broadcastPacket;
|
int packetLength = currentBufferPosition - broadcastPacket;
|
||||||
int packetsSent = 0;
|
int packetsSent = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue