mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 20:06:48 +02:00
make findAncestorOfType understand AVATAR_SELF_ID
This commit is contained in:
parent
22f9fc7061
commit
ad83f20199
1 changed files with 8 additions and 0 deletions
|
@ -1055,6 +1055,14 @@ bool SpatiallyNestable::hasAncestorOfType(NestableType nestableType) const {
|
|||
|
||||
const QUuid SpatiallyNestable::findAncestorOfType(NestableType nestableType) const {
|
||||
bool success;
|
||||
|
||||
if (nestableType == NestableType::Avatar) {
|
||||
QUuid parentID = getParentID();
|
||||
if (parentID == AVATAR_SELF_ID) {
|
||||
return AVATAR_SELF_ID; // TODO -- can we put nodeID here?
|
||||
}
|
||||
}
|
||||
|
||||
SpatiallyNestablePointer parent = getParentPointer(success);
|
||||
if (!success || !parent) {
|
||||
return QUuid();
|
||||
|
|
Loading…
Reference in a new issue