History

Fix issue with avatar data being sent too often

Ryan Huffman committed 11 years ago

Commit 00487fb1 parent 89967fb2 files · +12 −1Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+6−1
@@ -2135,12 +2135,17 @@ void Application::updateMyAvatar(float deltaTime) { · 2134 unmodified lines
2135 2135
2136 _myAvatar->update(deltaTime);2136 _myAvatar->update(deltaTime);
2137 2137
2138 {2138 quint64 now = usecTimestampNow();
2139 quint64 dt = now - _lastSendAvatarDataTime;
2140
2141 if (dt > MIN_TIME_BETWEEN_MY_AVATAR_DATA_SENDS) {
2139 // send head/hand data to the avatar mixer and voxel server2142 // send head/hand data to the avatar mixer and voxel server
2140 PerformanceTimer perfTimer("send");2143 PerformanceTimer perfTimer("send");
2141 QByteArray packet = byteArrayWithPopulatedHeader(PacketTypeAvatarData);2144 QByteArray packet = byteArrayWithPopulatedHeader(PacketTypeAvatarData);
2142 packet.append(_myAvatar->toByteArray());2145 packet.append(_myAvatar->toByteArray());
2143 controlledBroadcastToNodes(packet, NodeSet() << NodeType::AvatarMixer);2146 controlledBroadcastToNodes(packet, NodeSet() << NodeType::AvatarMixer);
2147
2148 _lastSendAvatarDataTime = now;
2144 }2149 }
2145}2150}
2146 2151

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t