From 26e49bdf49689f64453a398a3a76f7e44946e20c Mon Sep 17 00:00:00 2001 From: NoCatt <86153630+NoCatt@users.noreply.github.com> Date: Sun, 8 Jan 2023 02:40:10 +0100 Subject: Fix server chat messages being send twice when watching a replay (#555) * fixes chat messages being send twice * OCD is a real issue --- .../mod/scripts/vscripts/_custom_codecallbacks_client.gnut | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Northstar.Client') diff --git a/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut b/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut index 811874c5d..277ed030c 100644 --- a/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut +++ b/Northstar.Client/mod/scripts/vscripts/_custom_codecallbacks_client.gnut @@ -22,6 +22,10 @@ struct { } NsCustomCallbacksClient void function OnReceivedMessage(ClClient_MessageStruct localMessage) { + + if ( IsWatchingReplay() ) + return + if (localMessage.player != null) { foreach (callbackFunc in NsCustomCallbacksClient.OnReceivedSayTextMessageCallbacks) -- cgit v1.2.3