Streamline SpawnOccupant management.

This commit is contained in:
Paul Chote
2020-10-01 23:37:16 +01:00
committed by reaperrr
parent 6f32196f89
commit 60df247416
7 changed files with 38 additions and 46 deletions

View File

@@ -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;
}