mirror of
https://github.com/4sval/FModel.git
synced 2026-09-19 06:54:28 -05:00
fix
This commit is contained in:
@@ -136,9 +136,9 @@ public class StaticModel : UModel<MeshVertex>
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,9 +160,10 @@ public class Renderer : IDisposable
|
||||
model.Skeleton.Animate(animSet);
|
||||
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"))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user