fix #1320 bogus use of Game.CosmeticRandom from server thread
This commit is contained in:
@@ -40,6 +40,7 @@ namespace OpenRA.Server
|
|||||||
public readonly IPAddress Ip;
|
public readonly IPAddress Ip;
|
||||||
public readonly int Port;
|
public readonly int Port;
|
||||||
int randomSeed;
|
int randomSeed;
|
||||||
|
public readonly Thirdparty.Random Random = new Thirdparty.Random();
|
||||||
|
|
||||||
public ServerSettings Settings;
|
public ServerSettings Settings;
|
||||||
public ModData ModData;
|
public ModData ModData;
|
||||||
|
|||||||
@@ -210,9 +210,9 @@ namespace OpenRA.Mods.RA.Server
|
|||||||
};
|
};
|
||||||
|
|
||||||
// pick a random color for the bot
|
// pick a random color for the bot
|
||||||
var hue = (byte)Game.CosmeticRandom.Next(255);
|
var hue = (byte)server.Random.Next(255);
|
||||||
var sat = (byte)Game.CosmeticRandom.Next(255);
|
var sat = (byte)server.Random.Next(255);
|
||||||
var lum = (byte)Game.CosmeticRandom.Next(51,255);
|
var lum = (byte)server.Random.Next(51,255);
|
||||||
bot.ColorRamp = new ColorRamp(hue, sat, lum, 10);
|
bot.ColorRamp = new ColorRamp(hue, sat, lum, 10);
|
||||||
|
|
||||||
server.lobbyInfo.Clients.Add(bot);
|
server.lobbyInfo.Clients.Add(bot);
|
||||||
|
|||||||
Reference in New Issue
Block a user