Fix errors

This commit is contained in:
DrSmugleaf
2021-12-05 21:02:04 +01:00
parent 2a3b7d809d
commit ab9d0cc6d8
94 changed files with 568 additions and 591 deletions

View File

@@ -150,13 +150,11 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
|| instrument.LaggedBatches >= MaxMidiLaggedBatches)
&& instrument.InstrumentPlayer != null && instrument.RespectMidiLimits)
{
var mob = instrument.InstrumentPlayer.AttachedEntity;
// Just in case
Clean(((IComponent) instrument).Owner);
instrument.UserInterface?.CloseAll();
if (mob != null)
if (instrument.InstrumentPlayer.AttachedEntity is {Valid: true} mob)
{
_stunSystem.TryParalyze(mob, TimeSpan.FromSeconds(1));