Remove direct access to MapPreview.Rules.

This commit is contained in:
Paul Chote
2021-04-04 16:40:46 +01:00
committed by teinarss
parent 53e6d974f0
commit abee274f88
22 changed files with 57 additions and 54 deletions

View File

@@ -1209,7 +1209,7 @@ namespace OpenRA.Server
// The null padding is needed to keep the player indexes in sync with world.Players on the clients
// This will need to change if future code wants to use worldPlayers for other purposes
var playerRandom = new MersenneTwister(LobbyInfo.GlobalSettings.RandomSeed);
foreach (var cmpi in Map.Rules.Actors[SystemActors.World].TraitInfos<ICreatePlayersInfo>())
foreach (var cmpi in Map.WorldActorInfo.TraitInfos<ICreatePlayersInfo>())
cmpi.CreateServerPlayers(Map, LobbyInfo, worldPlayers, playerRandom);
if (recorder != null)