mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
crash fix
This commit is contained in:
parent
ca95df2dd4
commit
7e69adf978
|
|
@ -1 +1 @@
|
|||
Subproject commit fb9413d0362457867e0c46c339ab3756c2b0a399
|
||||
Subproject commit 8360aeea93df67272069f2a2f9e100272c18560e
|
||||
|
|
@ -49,7 +49,7 @@ public class SkeletalModel : UModel
|
|||
{
|
||||
foreach (var skeletalBodySetup in physicsAsset.SkeletalBodySetups)
|
||||
{
|
||||
if (!skeletalBodySetup.TryLoad(out USkeletalBodySetup bodySetup)) continue;
|
||||
if (!skeletalBodySetup.TryLoad(out USkeletalBodySetup bodySetup) || bodySetup.AggGeom == null) continue;
|
||||
foreach (var convexElem in bodySetup.AggGeom.ConvexElems)
|
||||
{
|
||||
Collisions.Add(new Collision(convexElem));
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class StaticModel : UModel
|
|||
public StaticModel(UStaticMesh export, CStaticMesh staticMesh, Transform transform = null)
|
||||
: base(export, staticMesh.LODs[LodLevel], export.Materials, staticMesh.LODs[LodLevel].Verts, staticMesh.LODs.Count, transform)
|
||||
{
|
||||
if (export.BodySetup.TryLoad(out UBodySetup bodySetup))
|
||||
if (export.BodySetup.TryLoad(out UBodySetup bodySetup) && bodySetup.AggGeom != null)
|
||||
{
|
||||
foreach (var convexElem in bodySetup.AggGeom.ConvexElems)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user