mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +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…
Reference in New Issue
Block a user