merge
This commit is contained in:
@@ -303,6 +303,9 @@ void AssetManager::updateAnimations() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(anim.mLoop && elapsed >= anim.mDuration) {
|
||||
anim.mStart = now;
|
||||
}
|
||||
// animation has completed
|
||||
} else {
|
||||
completed.push_back(anim);
|
||||
@@ -390,9 +393,16 @@ void AssetManager::setMorphTargetWeights(EntityId entityId, const char* const en
|
||||
}
|
||||
|
||||
RenderableManager &rm = _engine->getRenderableManager();
|
||||
|
||||
auto renderableInstance = rm.getInstance(entity);
|
||||
|
||||
if(!renderableInstance.isValid()) {
|
||||
Log("Warning: failed to find renderable instance for entity %s", entityName);
|
||||
return;
|
||||
}
|
||||
|
||||
rm.setMorphWeights(
|
||||
rm.getInstance(entity),
|
||||
renderableInstance,
|
||||
weights,
|
||||
count
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user