{"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/44862534","id":44862534,"diff_hunk":"@@ -291,53 +334,11 @@ void AvatarMixer::broadcastAvatarData() {\n \n                     numAvatarDataBytes += avatarPacketList->write(otherNode->getUUID().toRfc4122());\n                     numAvatarDataBytes +=\n-                        avatarPacketList->write(otherAvatar.toByteArray(false, randFloat() < AVATAR_SEND_FULL_UPDATE_RATIO));\n+                        avatarPacketList->write(otherAvatar.toByteArray(false, distribution(generator) < AVATAR_SEND_FULL_UPDATE_RATIO));","path":"assignment-client/src/avatars/AvatarMixer.cpp","position":78,"original_position":78,"commit_id":"245150333b949200a11bb40e8b1d840fe8e66353","original_commit_id":"245150333b949200a11bb40e8b1d840fe8e66353","user":{"login":"hyperlogic","id":20499,"avatar_url":"https://avatars.githubusercontent.com/u/20499?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperlogic","html_url":"https://github.com/hyperlogic","followers_url":"https://api.github.com/users/hyperlogic/followers","following_url":"https://api.github.com/users/hyperlogic/following{/other_user}","gists_url":"https://api.github.com/users/hyperlogic/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperlogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperlogic/subscriptions","organizations_url":"https://api.github.com/users/hyperlogic/orgs","repos_url":"https://api.github.com/users/hyperlogic/repos","events_url":"https://api.github.com/users/hyperlogic/events{/privacy}","received_events_url":"https://api.github.com/users/hyperlogic/received_events","type":"User","site_admin":false},"body":"I don't think we should retrofit all code to use this generator.  Only code that needs the additional accuracy.  In my tests, the randFloat() was slightly less likely to send identity packets at the desired rate, by about 5%, if I remember correctly.  So, I decided to change it the new generator to be sure we can properly predict the expected send rates.","created_at":"2015-11-14T19:34:10Z","updated_at":"2015-11-14T19:34:10Z","html_url":"https://github.com/highfidelity/hifi/pull/6393#discussion_r44862534","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/6393","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/44862534"},"html":{"href":"https://github.com/highfidelity/hifi/pull/6393#discussion_r44862534"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6393"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/6393","id":50713500,"html_url":"https://github.com/highfidelity/hifi/pull/6393","diff_url":"https://github.com/highfidelity/hifi/pull/6393.diff","patch_url":"https://github.com/highfidelity/hifi/pull/6393.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/6393","number":6393,"state":"open","locked":false,"title":"Fix for missing avatars on entry","user":{"login":"hyperlogic","id":20499,"avatar_url":"https://avatars.githubusercontent.com/u/20499?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperlogic","html_url":"https://github.com/hyperlogic","followers_url":"https://api.github.com/users/hyperlogic/followers","following_url":"https://api.github.com/users/hyperlogic/following{/other_user}","gists_url":"https://api.github.com/users/hyperlogic/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperlogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperlogic/subscriptions","organizations_url":"https://api.github.com/users/hyperlogic/orgs","repos_url":"https://api.github.com/users/hyperlogic/repos","events_url":"https://api.github.com/users/hyperlogic/events{/privacy}","received_events_url":"https://api.github.com/users/hyperlogic/received_events","type":"User","site_admin":false},"body":"This should fix the issue where a persons avatar was occasionally not visible to others for a long period of time.  This was due to several factors:\r\n\r\n1. When a new avatar was added to the simulation that identity packet was not broadcast to other avatars on the server. This would rely on random logic to send the identity eventually.  This is fixed in this PR, by sending identity packets to all other clients when a new clients arrive.\r\n\r\n2. The random identity logic was not being executed if the sequence number check caused an update to be skipped.  This means the probability of sending a random packet was reduced significantly, especially for clients that were loading geometry on entry.  This was fixed by doing the random check before sequence number check.\r\n\r\n3. The 1/300 probably used in the check was too low, this was only a 63% chance of sending a identity packet within 5 seconds.  This was fixed by changing the probability to 1/187, which is a 80% chance to send an identity packet within 5 seconds.\r\n\r\n4. The randFloat() implementation slightly reduced the identity packet probability due to quantization errors.  This has been replaced by a C++ std random number generator.","created_at":"2015-11-14T02:11:39Z","updated_at":"2015-11-14T19:34:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c475ff8b31d79294c1204c0b63fb8ff8a9eb7d60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/6393/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/6393/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/6393/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/245150333b949200a11bb40e8b1d840fe8e66353","head":{"label":"hyperlogic:tony/avatar-mixer-identity-fixes","ref":"tony/avatar-mixer-identity-fixes","sha":"245150333b949200a11bb40e8b1d840fe8e66353","user":{"login":"hyperlogic","id":20499,"avatar_url":"https://avatars.githubusercontent.com/u/20499?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperlogic","html_url":"https://github.com/hyperlogic","followers_url":"https://api.github.com/users/hyperlogic/followers","following_url":"https://api.github.com/users/hyperlogic/following{/other_user}","gists_url":"https://api.github.com/users/hyperlogic/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperlogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperlogic/subscriptions","organizations_url":"https://api.github.com/users/hyperlogic/orgs","repos_url":"https://api.github.com/users/hyperlogic/repos","events_url":"https://api.github.com/users/hyperlogic/events{/privacy}","received_events_url":"https://api.github.com/users/hyperlogic/received_events","type":"User","site_admin":false},"repo":{"id":34955357,"name":"hifi","full_name":"hyperlogic/hifi","owner":{"login":"hyperlogic","id":20499,"avatar_url":"https://avatars.githubusercontent.com/u/20499?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperlogic","html_url":"https://github.com/hyperlogic","followers_url":"https://api.github.com/users/hyperlogic/followers","following_url":"https://api.github.com/users/hyperlogic/following{/other_user}","gists_url":"https://api.github.com/users/hyperlogic/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperlogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperlogic/subscriptions","organizations_url":"https://api.github.com/users/hyperlogic/orgs","repos_url":"https://api.github.com/users/hyperlogic/repos","events_url":"https://api.github.com/users/hyperlogic/events{/privacy}","received_events_url":"https://api.github.com/users/hyperlogic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hyperlogic/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":true,"url":"https://api.github.com/repos/hyperlogic/hifi","forks_url":"https://api.github.com/repos/hyperlogic/hifi/forks","keys_url":"https://api.github.com/repos/hyperlogic/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperlogic/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperlogic/hifi/teams","hooks_url":"https://api.github.com/repos/hyperlogic/hifi/hooks","issue_events_url":"https://api.github.com/repos/hyperlogic/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/hyperlogic/hifi/events","assignees_url":"https://api.github.com/repos/hyperlogic/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/hyperlogic/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/hyperlogic/hifi/tags","blobs_url":"https://api.github.com/repos/hyperlogic/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperlogic/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperlogic/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperlogic/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperlogic/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperlogic/hifi/languages","stargazers_url":"https://api.github.com/repos/hyperlogic/hifi/stargazers","contributors_url":"https://api.github.com/repos/hyperlogic/hifi/contributors","subscribers_url":"https://api.github.com/repos/hyperlogic/hifi/subscribers","subscription_url":"https://api.github.com/repos/hyperlogic/hifi/subscription","commits_url":"https://api.github.com/repos/hyperlogic/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperlogic/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperlogic/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperlogic/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperlogic/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/hyperlogic/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperlogic/hifi/merges","archive_url":"https://api.github.com/repos/hyperlogic/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperlogic/hifi/downloads","issues_url":"https://api.github.com/repos/hyperlogic/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/hyperlogic/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperlogic/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperlogic/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperlogic/hifi/labels{/name}","releases_url":"https://api.github.com/repos/hyperlogic/hifi/releases{/id}","created_at":"2015-05-02T16:40:40Z","updated_at":"2015-05-02T16:47:44Z","pushed_at":"2015-11-14T02:09:59Z","git_url":"git://github.com/hyperlogic/hifi.git","ssh_url":"git@github.com:hyperlogic/hifi.git","clone_url":"https://github.com/hyperlogic/hifi.git","svn_url":"https://github.com/hyperlogic/hifi","homepage":"","size":183585,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"highfidelity:master","ref":"master","sha":"7a34d4f56757b6f36360c80710693efaf80d5d67","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","created_at":"2012-08-10T18:26:22Z","updated_at":"2015-11-10T22:10:10Z","pushed_at":"2015-11-14T19:17:09Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":253548,"stargazers_count":324,"watchers_count":324,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":190,"mirror_url":null,"open_issues_count":68,"forks":190,"open_issues":68,"watchers":324,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6393"},"html":{"href":"https://github.com/highfidelity/hifi/pull/6393"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/6393"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/6393/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6393/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6393/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/245150333b949200a11bb40e8b1d840fe8e66353"}}}}