optional motion.filepath

This commit is contained in:
tresabhi committed 2026-11-28 16:56:17 -06:00
1 parent dc18e0e1d3
commit 63117b8369
3 files changed
+9 -2

No files matched your search

+2 -1
View File
@@ -273,7 +273,8 @@ export type Component =
}
| {
"comp.typename": "MotionComponent";
"motion.filepath": string;
// absent on some skins (Oth99_Relic_hull_skin) that only carry playback settings
"motion.filepath"?: string;
"motion.playbackRate": number;
"simpleMotion.repeatsCount": number;
}
@@ -127,7 +127,12 @@ export async function loadHierarchyMotions(
parseHierarchies(sc2["#hierarchy"], null, (hierarchy, components) => {
for (const component of components) {
if (component["comp.typename"] !== "MotionComponent") continue;
if (
component["comp.typename"] !== "MotionComponent" ||
component["motion.filepath"] === undefined
) {
continue;
}
loading.push(
loadMotion(vfs, path, component).then((motion) => {