Fix reselecting a dropdown option in the lobby causing a server message
This commit is contained in:
@@ -612,6 +612,9 @@ namespace OpenRA.Mods.Common.Server
|
|||||||
{ "difficulty",
|
{ "difficulty",
|
||||||
s =>
|
s =>
|
||||||
{
|
{
|
||||||
|
if (server.LobbyInfo.GlobalSettings.Difficulty == s)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!client.IsAdmin)
|
if (!client.IsAdmin)
|
||||||
{
|
{
|
||||||
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
|
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
|
||||||
@@ -664,6 +667,9 @@ namespace OpenRA.Mods.Common.Server
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (server.LobbyInfo.GlobalSettings.StartingUnitsClass == selectedClass.Class)
|
||||||
|
return true;
|
||||||
|
|
||||||
server.LobbyInfo.GlobalSettings.StartingUnitsClass = selectedClass.Class;
|
server.LobbyInfo.GlobalSettings.StartingUnitsClass = selectedClass.Class;
|
||||||
server.SyncLobbyGlobalSettings();
|
server.SyncLobbyGlobalSettings();
|
||||||
server.SendMessage("{0} changed Starting Units to {1}.".F(client.Name, selectedClass.ClassName));
|
server.SendMessage("{0} changed Starting Units to {1}.".F(client.Name, selectedClass.ClassName));
|
||||||
@@ -696,6 +702,9 @@ namespace OpenRA.Mods.Common.Server
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (server.LobbyInfo.GlobalSettings.StartingCash == requestedCash)
|
||||||
|
return true;
|
||||||
|
|
||||||
server.LobbyInfo.GlobalSettings.StartingCash = requestedCash;
|
server.LobbyInfo.GlobalSettings.StartingCash = requestedCash;
|
||||||
server.SyncLobbyGlobalSettings();
|
server.SyncLobbyGlobalSettings();
|
||||||
server.SendMessage("{0} changed Starting Cash to ${1}.".F(client.Name, requestedCash));
|
server.SendMessage("{0} changed Starting Cash to ${1}.".F(client.Name, requestedCash));
|
||||||
@@ -706,6 +715,9 @@ namespace OpenRA.Mods.Common.Server
|
|||||||
{ "techlevel",
|
{ "techlevel",
|
||||||
s =>
|
s =>
|
||||||
{
|
{
|
||||||
|
if (server.LobbyInfo.GlobalSettings.TechLevel == s)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!client.IsAdmin)
|
if (!client.IsAdmin)
|
||||||
{
|
{
|
||||||
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
|
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
|
||||||
@@ -737,6 +749,9 @@ namespace OpenRA.Mods.Common.Server
|
|||||||
{ "gamespeed",
|
{ "gamespeed",
|
||||||
s =>
|
s =>
|
||||||
{
|
{
|
||||||
|
if (server.LobbyInfo.GlobalSettings.GameSpeedType == s)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!client.IsAdmin)
|
if (!client.IsAdmin)
|
||||||
{
|
{
|
||||||
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
|
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
|
||||||
|
|||||||
Reference in New Issue
Block a user