From 481e5e03d8001b1f830370bdff41820c55b57440 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Thu, 3 Jan 2019 17:38:04 +0100 Subject: [PATCH] Make bots deploy MCV on first tick And use a boolean instead of counting ticks. --- .../Traits/BotModules/McvManagerBotModule.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs index 372c906def..bc843be498 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/McvManagerBotModule.cs @@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits CPos initialBaseCenter; int scanInterval; - int ticks; + bool firstTick = true; // MCVs that the bot already knows about. Any MCV not on this list needs to be given an order. List activeMCVs = new List(); @@ -101,10 +101,11 @@ namespace OpenRA.Mods.Common.Traits void IBotTick.BotTick(IBot bot) { - ticks++; - - if (ticks == 1) + if (firstTick) + { DeployMcvs(bot, false); + firstTick = false; + } if (--scanInterval <= 0) {