Be slightly more harsh with dropped batches count to prevent abuse.
This commit is contained in:
@@ -118,7 +118,6 @@ namespace Content.Server.GameObjects.Components.Instruments
|
|||||||
break;
|
break;
|
||||||
case InstrumentStartMidiMessage startMidi:
|
case InstrumentStartMidiMessage startMidi:
|
||||||
Playing = true;
|
Playing = true;
|
||||||
_batchesDropped = 0;
|
|
||||||
break;
|
break;
|
||||||
case InstrumentStopMidiMessage stopMidi:
|
case InstrumentStopMidiMessage stopMidi:
|
||||||
Playing = false;
|
Playing = false;
|
||||||
@@ -202,6 +201,7 @@ namespace Content.Server.GameObjects.Components.Instruments
|
|||||||
|
|
||||||
if (_batchesDropped > MaxMidiBatchDropped && _instrumentPlayer != null)
|
if (_batchesDropped > MaxMidiBatchDropped && _instrumentPlayer != null)
|
||||||
{
|
{
|
||||||
|
_batchesDropped = 0;
|
||||||
var mob = _instrumentPlayer.AttachedEntity;
|
var mob = _instrumentPlayer.AttachedEntity;
|
||||||
if (mob.TryGetComponent(out StunnableComponent stun))
|
if (mob.TryGetComponent(out StunnableComponent stun))
|
||||||
stun.Stun(1);
|
stun.Stun(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user