Birarda's CR changes

This commit is contained in:
Zach Fox 2017-04-10 16:18:48 -07:00
parent 1984d5bc0c
commit 16be0ca70c
3 changed files with 3 additions and 7 deletions

View file

@ -30,11 +30,6 @@ QVector<QUuid> AvatarHashMap::getAvatarIdentifiers() {
return _avatarHash.keys().toVector();
}
AvatarSharedPointer AvatarHashMap::getAvatar(QUuid avatarID) {
// Null/Default-constructed QUuids will return MyAvatar
return AvatarSharedPointer(getAvatarBySessionID(avatarID));
}
bool AvatarHashMap::isAvatarInRange(const glm::vec3& position, const float range) {
auto hashCopy = getHashCopy();
foreach(const AvatarSharedPointer& sharedAvatar, hashCopy) {

View file

@ -37,7 +37,8 @@ public:
// Currently, your own avatar will be included as the null avatar id.
Q_INVOKABLE QVector<QUuid> getAvatarIdentifiers();
Q_INVOKABLE AvatarSharedPointer getAvatar(QUuid avatarID);
// Null/Default-constructed QUuids will return MyAvatar
Q_INVOKABLE AvatarSharedPointer getAvatar(QUuid avatarID) { return getAvatarBySessionID(avatarID); }
virtual AvatarSharedPointer getAvatarBySessionID(const QUuid& sessionID) const { return findAvatar(sessionID); }
int numberOfAvatarsInRange(const glm::vec3& position, float rangeMeters);

View file

@ -17,7 +17,7 @@ QScriptValue avatarDataToScriptValue(QScriptEngine* engine, const AvatarSharedPo
}
void avatarDataFromScriptValue(const QScriptValue& object, AvatarSharedPointer& out) {
// Not implemented - this should never happen (yet)
// This is not implemented because there are no slots/properties that take expect an AvatarSharedPointer from a script
assert(false);
out = AvatarSharedPointer(nullptr);
}