move shape null check to GetAttachedShapes

This commit is contained in:
JohnCorby 2022-01-06 15:02:10 -08:00
parent 20b3b73e55
commit 18dd499890

View File

@ -54,11 +54,6 @@ namespace QSB.QuantumSync.WorldObjects
foreach (var shape in GetAttachedShapes())
{
if (shape == null)
{
continue;
}
if (shape is BoxShape boxShape)
{
var newCube = Object.Instantiate(cube);
@ -151,7 +146,7 @@ namespace QSB.QuantumSync.WorldObjects
}
var shapes = tracker._shapes;
totalShapes.AddRange(shapes);
totalShapes.AddRange(shapes.Where(x => x != null));
}
return totalShapes;