History

Merge pull request #4107 from huffman/fix-update-my-avatar

Fix issue with avatar data being sent too often

Philip Rosedale committed 11 years ago

Commit 67c3f9a2 parents e811479 00487fb2 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
@@ -2137,12 +2137,17 @@ void Application::updateMyAvatar(float deltaTime) { · 2136 unmodified lines
2137 2137
2138 _myAvatar->update(deltaTime);2138 _myAvatar->update(deltaTime);
2139 2139
2140 {2140 quint64 now = usecTimestampNow();
2141 quint64 dt = now - _lastSendAvatarDataTime;
2142
2143 if (dt > MIN_TIME_BETWEEN_MY_AVATAR_DATA_SENDS) {
2141 // send head/hand data to the avatar mixer and voxel server2144 // send head/hand data to the avatar mixer and voxel server
2142 PerformanceTimer perfTimer("send");2145 PerformanceTimer perfTimer("send");
2143 QByteArray packet = byteArrayWithPopulatedHeader(PacketTypeAvatarData);2146 QByteArray packet = byteArrayWithPopulatedHeader(PacketTypeAvatarData);
2144 packet.append(_myAvatar->toByteArray());2147 packet.append(_myAvatar->toByteArray());
2145 controlledBroadcastToNodes(packet, NodeSet() << NodeType::AvatarMixer);2148 controlledBroadcastToNodes(packet, NodeSet() << NodeType::AvatarMixer);
2149
2150 _lastSendAvatarDataTime = now;
2146 }2151 }
2147}2152}
2148 2153

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