From 9b0bc818c65b66c93d3722a8e4c65bac6d30a736 Mon Sep 17 00:00:00 2001 From: zumorica Date: Thu, 21 May 2020 20:11:09 +0200 Subject: [PATCH] Be slightly more harsh with dropped batches count to prevent abuse. --- .../GameObjects/Components/Instruments/InstrumentComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs index a23ae7e2b8..376ce82945 100644 --- a/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs +++ b/Content.Server/GameObjects/Components/Instruments/InstrumentComponent.cs @@ -118,7 +118,6 @@ namespace Content.Server.GameObjects.Components.Instruments break; case InstrumentStartMidiMessage startMidi: Playing = true; - _batchesDropped = 0; break; case InstrumentStopMidiMessage stopMidi: Playing = false; @@ -202,6 +201,7 @@ namespace Content.Server.GameObjects.Components.Instruments if (_batchesDropped > MaxMidiBatchDropped && _instrumentPlayer != null) { + _batchesDropped = 0; var mob = _instrumentPlayer.AttachedEntity; if (mob.TryGetComponent(out StunnableComponent stun)) stun.Stun(1);