mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-14 19:29:53 +01:00
Fix InstrumentSystem.Update exception when deleting band lead (#42331)
This commit is contained in:
@@ -438,20 +438,22 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
|
||||
if (Deleted(master))
|
||||
{
|
||||
Clean(uid, instrument);
|
||||
continue;
|
||||
}
|
||||
|
||||
var masterActive = activeQuery.CompOrNull(master);
|
||||
if (masterActive == null)
|
||||
{
|
||||
Clean(uid, instrument);
|
||||
continue;
|
||||
}
|
||||
|
||||
var trans = transformQuery.GetComponent(uid);
|
||||
var masterTrans = transformQuery.GetComponent(master);
|
||||
if (!_transform.InRange(masterTrans.Coordinates, trans.Coordinates, 10f)
|
||||
)
|
||||
if (!_transform.InRange(masterTrans.Coordinates, trans.Coordinates, 10f))
|
||||
{
|
||||
Clean(uid, instrument);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user