mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
make findAncestorOfType understand AVATAR_SELF_ID
This commit is contained in:
parent
933aed4719
commit
f13fdf2a4c
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 {
|
const QUuid SpatiallyNestable::findAncestorOfType(NestableType nestableType) const {
|
||||||
bool success;
|
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);
|
SpatiallyNestablePointer parent = getParentPointer(success);
|
||||||
if (!success || !parent) {
|
if (!success || !parent) {
|
||||||
return QUuid();
|
return QUuid();
|
||||||
|
|
Loading…
Reference in a new issue