From ecede9f91aca9f134c7415eff6d1f6eb3aebbfb2 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Tue, 24 May 2022 00:10:51 +0200 Subject: [PATCH] Fix negative block game speed values (#8389) --- Content.Server/Arcade/Components/BlockGameArcadeComponent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/Arcade/Components/BlockGameArcadeComponent.cs b/Content.Server/Arcade/Components/BlockGameArcadeComponent.cs index a36884493a..85c45ae2f5 100644 --- a/Content.Server/Arcade/Components/BlockGameArcadeComponent.cs +++ b/Content.Server/Arcade/Components/BlockGameArcadeComponent.cs @@ -355,7 +355,8 @@ namespace Content.Server.Arcade.Components { _accumulatedFieldFrameTime += frameTime; - var checkTime = Speed; + // Speed goes negative sometimes. uhhhh max() it I guess!!! + var checkTime = Math.Max(0.03f, Speed); while (_accumulatedFieldFrameTime >= checkTime) {