Fix the AI acting the same at game restart.

This commit is contained in:
Zimmermann Gyula
2017-05-10 23:05:57 +02:00
committed by Paul Chote
parent db85fff7c0
commit 0d2d17d2fb

View File

@@ -342,7 +342,7 @@ namespace OpenRA.Mods.Common.AI
foreach (var defense in Info.DefenseQueues) foreach (var defense in Info.DefenseQueues)
builders.Add(new BaseBuilder(this, defense, p, playerPower, playerResource)); builders.Add(new BaseBuilder(this, defense, p, playerPower, playerResource));
Random = new MersenneTwister((int)p.PlayerActor.ActorID); Random = new MersenneTwister(Game.CosmeticRandom.Next());
// Avoid all AIs trying to rush in the same tick, randomize their initial rush a little. // Avoid all AIs trying to rush in the same tick, randomize their initial rush a little.
var smallFractionOfRushInterval = Info.RushInterval / 20; var smallFractionOfRushInterval = Info.RushInterval / 20;