From e5b8acde9d4282ed01a119bc1c0d9d40c1177709 Mon Sep 17 00:00:00 2001 From: TheR00st3r Date: Thu, 2 Nov 2023 22:52:47 +0100 Subject: [PATCH] Use NextFrame for SetMatchVariable --- PugSharp/PugSharp.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PugSharp/PugSharp.cs b/PugSharp/PugSharp.cs index e6e30cf1..546e29ff 100644 --- a/PugSharp/PugSharp.cs +++ b/PugSharp/PugSharp.cs @@ -429,7 +429,10 @@ public void SwitchMap(string selectedMap) if (_Match != null) { - SetMatchVariable(_Match.Config); + Server.NextFrame(() => + { + SetMatchVariable(_Match.Config); + }); } }