mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-04 03:39:55 +00:00
move shape null check to GetAttachedShapes
This commit is contained in:
parent
20b3b73e55
commit
18dd499890
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user