From 45eea0c7c50d4d4da4edfabb20dcd47573ed7263 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 14 Jan 2024 01:13:09 +0100 Subject: [PATCH] Do nothing when action is nothing --- OpenCS2hock/Shocker.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenCS2hock/Shocker.cs b/OpenCS2hock/Shocker.cs index 0406901..a9ade06 100644 --- a/OpenCS2hock/Shocker.cs +++ b/OpenCS2hock/Shocker.cs @@ -14,6 +14,8 @@ public abstract class Shocker int intensity = _intensity.GetValue(); int duration = _duration.GetValue(); Console.WriteLine($"{action} {intensity} {duration}"); + if (action is ControlAction.Nothing) + return; if(shockerId is null) foreach (string shocker in _shockerIds) ControlInternal(action, shocker, intensity, duration);