Remove order latency checks from BaseBuilderQueueManager.
This commit is contained in:
@@ -78,8 +78,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly int StructureProductionInactiveDelay = 125;
|
||||
|
||||
[Desc("Additional delay (in ticks) added between structure production checks when actively building things.",
|
||||
"Note: The total delay is gamespeed OrderLatency x 4 + this + StructureProductionRandomBonusDelay.")]
|
||||
public readonly int StructureProductionActiveDelay = 0;
|
||||
"Note: this should be at least as large as the typical order latency to avoid duplicated build choices.")]
|
||||
public readonly int StructureProductionActiveDelay = 25;
|
||||
|
||||
[Desc("A random delay (in ticks) of up to this is added to active/inactive production delays.")]
|
||||
public readonly int StructureProductionRandomBonusDelay = 10;
|
||||
|
||||
@@ -111,8 +111,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// Minimum should not be negative as delays in HackyAI could be zero.
|
||||
var randomFactor = world.LocalRandom.Next(0, baseBuilder.Info.StructureProductionRandomBonusDelay);
|
||||
|
||||
// Needs to be at least 4 * OrderLatency because otherwise the AI frequently duplicates build orders (i.e. makes the same build decision twice)
|
||||
waitTicks = active ? 4 * world.OrderLatency + baseBuilder.Info.StructureProductionActiveDelay + randomFactor
|
||||
waitTicks = active ? baseBuilder.Info.StructureProductionActiveDelay + randomFactor
|
||||
: baseBuilder.Info.StructureProductionInactiveDelay + randomFactor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user