This commit is contained in:
Asval
2026-08-11 18:21:35 +02:00
parent ab933d7c20
commit cf4c4e6bba
2 changed files with 5 additions and 4 deletions

View File

@@ -136,9 +136,9 @@ public class StaticModel : UModel<MeshVertex>
} }
Box = staticMesh.Bounds * Constants.SCALE_DOWN_RATIO; Box = staticMesh.Bounds * Constants.SCALE_DOWN_RATIO;
for (int i = 0; i < export.Sockets.Length; i++) foreach (var s in export.Sockets ?? [])
{ {
if (export.Sockets[i].Load<UStaticMeshSocket>() is not { } socket) continue; if (s.Load<UStaticMeshSocket>() is not { } socket) continue;
Sockets.Add(new Socket(socket)); Sockets.Add(new Socket(socket));
} }
} }

View File

@@ -160,9 +160,10 @@ public class Renderer : IDisposable
model.Skeleton.Animate(animSet); model.Skeleton.Animate(animSet);
Options.AddAnimation(animation); Options.AddAnimation(animation);
foreach (var notifyEvent in animBase.Notifies) foreach (var notifyEvent in animBase.Notifies ?? [])
{ {
if (!notifyEvent.NotifyStateClass.TryLoad(out UObject notifyClass) || if (notifyEvent.NotifyStateClass is null ||
!notifyEvent.NotifyStateClass.TryLoad(out UObject notifyClass) ||
!notifyClass.TryGetValue(out UObject export, "SkeletalMeshProp", "StaticMeshProp", "Mesh", "SkeletalMeshTemplate")) !notifyClass.TryGetValue(out UObject export, "SkeletalMeshProp", "StaticMeshProp", "Mesh", "SkeletalMeshTemplate"))
continue; continue;