highfidelity/hifi — pull request #3155 by AndrewMeadows (2014-07-10 18:56:44+00:00)
Title: fix bad FPS for crowds of avatars

I found two simple problems that were contributing to bad FPS for crowds of avatars:

(1) We were calling Avatar::_skeletonModel.simulate() twice inside Avatar::simulate(). One of the calls was incorrectly contributing its time to the "head" performance stat which is why I saw the time spent in "/idle/update/otherAvatars/simulate/head" to be larger than time spent in "/idle/update/otherAvatars/simulate/skeleton".

(2) Whenever we received a AgentData update packet we would set AgentData::_hasNewJointRotations to be true, even in the case where none of the joints had actually changed. We now only set it true when a valid joint rotation is packed, which greatly reduces the CPU cost of the per-frame Model::simulate() call.