Make bots deploy MCV on first tick
And use a boolean instead of counting ticks.
This commit is contained in:
@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
CPos initialBaseCenter;
|
CPos initialBaseCenter;
|
||||||
int scanInterval;
|
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.
|
// MCVs that the bot already knows about. Any MCV not on this list needs to be given an order.
|
||||||
List<Actor> activeMCVs = new List<Actor>();
|
List<Actor> activeMCVs = new List<Actor>();
|
||||||
@@ -101,10 +101,11 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
void IBotTick.BotTick(IBot bot)
|
void IBotTick.BotTick(IBot bot)
|
||||||
{
|
{
|
||||||
ticks++;
|
if (firstTick)
|
||||||
|
{
|
||||||
if (ticks == 1)
|
|
||||||
DeployMcvs(bot, false);
|
DeployMcvs(bot, false);
|
||||||
|
firstTick = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (--scanInterval <= 0)
|
if (--scanInterval <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user