Right click lobby spawns to disable or remove players.
This commit is contained in:
committed by
abcdefg30
parent
13581c030d
commit
d66e0bb22e
@@ -26,6 +26,8 @@ namespace OpenRA.Network
|
||||
// Keyed by the PlayerReference id that the slot corresponds to
|
||||
public Dictionary<string, Slot> Slots = new Dictionary<string, Slot>();
|
||||
|
||||
public List<int> DisabledSpawnPoints = new List<int>();
|
||||
|
||||
public Global GlobalSettings = new Global();
|
||||
|
||||
public static string AnonymizeIP(IPAddress ip)
|
||||
@@ -69,6 +71,9 @@ namespace OpenRA.Network
|
||||
var s = Slot.Deserialize(node.Value);
|
||||
session.Slots.Add(s.PlayerReference, s);
|
||||
break;
|
||||
case "DisabledSpawnPoints":
|
||||
session.DisabledSpawnPoints = FieldLoader.GetValue<List<int>>("DisabledSpawnPoints", node.Value.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +272,10 @@ namespace OpenRA.Network
|
||||
|
||||
public string Serialize()
|
||||
{
|
||||
var sessionData = new List<MiniYamlNode>();
|
||||
var sessionData = new List<MiniYamlNode>()
|
||||
{
|
||||
new MiniYamlNode("DisabledSpawnPoints", FieldSaver.FormatValue(DisabledSpawnPoints))
|
||||
};
|
||||
|
||||
foreach (var client in Clients)
|
||||
sessionData.Add(client.Serialize());
|
||||
|
||||
Reference in New Issue
Block a user