mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:58:59 +02:00
check for faux joints before heading into code that needs to lock
This commit is contained in:
parent
a543b957ef
commit
ab8d9f4885
1 changed files with 6 additions and 4 deletions
|
@ -1021,11 +1021,13 @@ void Avatar::cacheJoints() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
int Avatar::getJointIndex(const QString& name) const {
|
int Avatar::getJointIndex(const QString& name) const {
|
||||||
|
int result = getFauxJointIndex(name);
|
||||||
|
if (result != -1) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
auto getJointIndexWorker = [&]() {
|
auto getJointIndexWorker = [&]() {
|
||||||
int result = getFauxJointIndex(name);
|
if (_jointIndicesCache.contains(name)) {
|
||||||
if (result != -1) {
|
|
||||||
return result;
|
|
||||||
} else if (_jointIndicesCache.contains(name)) {
|
|
||||||
return _jointIndicesCache[name];
|
return _jointIndicesCache[name];
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue