dont send message if not in multiplayer

This commit is contained in:
JohnCorby 2022-11-07 12:30:17 -08:00
parent d394ee3f46
commit a4f66782db

View File

@ -244,15 +244,17 @@ public class QSBCore : ModBehaviour
{ {
DefaultServerIP = config.GetSettingsValue<string>("defaultServerIP"); DefaultServerIP = config.GetSettingsValue<string>("defaultServerIP");
IncompatibleModsAllowed = config.GetSettingsValue<bool>("incompatibleModsAllowed"); IncompatibleModsAllowed = config.GetSettingsValue<bool>("incompatibleModsAllowed");
if (!IsInMultiplayer || IsHost) if (!IsInMultiplayer)
{
ServerSettingsManager.ShowPlayerNames = config.GetSettingsValue<bool>("showPlayerNames");
}
else if (IsHost)
{ {
var _showPlayerNames = config.GetSettingsValue<bool>("showPlayerNames"); var _showPlayerNames = config.GetSettingsValue<bool>("showPlayerNames");
if (_showPlayerNames != ServerSettingsManager.ShowPlayerNames) if (_showPlayerNames != ServerSettingsManager.ShowPlayerNames)
{ {
new ServerSettingsMessage().Send(); new ServerSettingsMessage().Send();
} }
ServerSettingsManager.ShowPlayerNames = _showPlayerNames; ServerSettingsManager.ShowPlayerNames = _showPlayerNames;
} }
else else