mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 00:06:58 +02:00
remove a couple of read lockers for AvatarHashMap
This commit is contained in:
parent
40397add43
commit
430cb7876d
2 changed files with 2 additions and 3 deletions
|
@ -256,7 +256,6 @@ QVector<AvatarManager::LocalLight> AvatarManager::getLocalLights() const {
|
|||
}
|
||||
|
||||
QVector<QUuid> AvatarManager::getAvatarIdentifiers() {
|
||||
QReadLocker locker(&_hashLock);
|
||||
return _avatarHash.keys().toVector();
|
||||
}
|
||||
AvatarData* AvatarManager::getAvatar(QUuid avatarID) {
|
||||
|
|
|
@ -23,8 +23,8 @@ AvatarHashMap::AvatarHashMap() {
|
|||
}
|
||||
|
||||
bool AvatarHashMap::isAvatarInRange(const glm::vec3& position, const float range) {
|
||||
QReadLocker locker(&_hashLock);
|
||||
foreach(const AvatarSharedPointer& sharedAvatar, _avatarHash) {
|
||||
auto hashCopy = _avatarHash;
|
||||
foreach(const AvatarSharedPointer& sharedAvatar, hashCopy) {
|
||||
glm::vec3 avatarPosition = sharedAvatar->getPosition();
|
||||
float distance = glm::distance(avatarPosition, position);
|
||||
if (distance < range) {
|
||||
|
|
Loading…
Reference in a new issue