highfidelity/hifi — pull request #2200 by ZappoMan (2014-03-04 23:11:38+00:00)
Title: fix failed lock causing particle collisions to not work

Usually we want the Octree "find" helpers like findRayIntersection(), findSpherePenetration(), etc to attempt a tryReadLock() and bail if they can't get it. This is because the typical calling case assumes that the caller is ok with a sometimes wrong answer.

Sometimes we want the tree to absolutely be locked and wait till the lock is obtained... we really want the correct answer.

But, sometimes we call these helpers in a case where the caller has already locked the tree, and so we don't want it to lock at all.

Particle collisions were failing because it was doing a writeLock then the lower code was doing a tryReadLock() which will fail, because the tree was already locked. To fix that, we call this findSpherePenetration() with NoLock... since we know we already locked it.