fix int64->int32 conversion bug for morph indices

This commit is contained in:
Nick Fisher
2023-08-23 15:38:12 +08:00
parent 568f2af55b
commit 03dd2cf6ac
4 changed files with 27 additions and 9 deletions

View File

@@ -390,9 +390,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
);