Streamline SpawnOccupant management.
This commit is contained in:
@@ -424,7 +424,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var spawns = currentMap.SpawnPoints;
|
||||
var occupants = server.Clients
|
||||
.Where(c => (c.SpawnPoint - 1 >= 0) && (c.SpawnPoint - 1 < spawns.Length))
|
||||
.ToDictionary(c => spawns[c.SpawnPoint - 1], c => new SpawnOccupant(c, server.Mod != modData.Manifest.Id));
|
||||
.ToDictionary(c => c.SpawnPoint, c => new SpawnOccupant(c, server.Mod != modData.Manifest.Id));
|
||||
|
||||
mapPreview.SpawnOccupants = () => occupants;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user