From 8e9edae64e62bc94328048e4e3a3a40a1c694da4 Mon Sep 17 00:00:00 2001 From: Wunax Date: Tue, 19 Jan 2021 17:10:27 +0100 Subject: [PATCH] Fix missing message, if the host tries to change the settings while the game is in progress --- AnonymousImpostorsMod/PlayerControlPatch.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AnonymousImpostorsMod/PlayerControlPatch.cs b/AnonymousImpostorsMod/PlayerControlPatch.cs index ea3fb76..6b5a2d6 100644 --- a/AnonymousImpostorsMod/PlayerControlPatch.cs +++ b/AnonymousImpostorsMod/PlayerControlPatch.cs @@ -96,7 +96,9 @@ public static bool Prefix(PlayerControl __instance, string PGIBDIEPGIC) } if (GameData.currentGame.GameState == GameStates.Started) { - + HudManager.IAINKLDJAGC.Chat.AddChat(localPlayer.PlayerControl, "You cannot change this setting while the game is in progress."); + HudManager.IAINKLDJAGC.Chat.TextArea.SetText(string.Empty); + return false; } string[] args = msg.Split(' '); if (msg.StartsWith("/anonymous", StringComparison.InvariantCultureIgnoreCase))