Performance fixes

This commit is contained in:
Robert MacGregor 2015-10-06 21:43:52 -04:00
parent 5e53dd91ef
commit 53aece4615
5 changed files with 301 additions and 178 deletions

View file

@ -34,6 +34,7 @@ function AICommander::setup(%this)
for (%iteration = 0; %iteration < ClientGroup.getCount(); %iteration++)
{
%currentClient = ClientGroup.getObject(%iteration);
%currentClient.updateVisualAcuity();
if (%currentClient.isAIControlled() && %currentClient.team == %this.team)
{
@ -138,10 +139,14 @@ function AICommander::assignTasks(%this)
%bot = %this.botList.getObject(%iteration);
%bot.addTask(AIEnhancedEngageTarget);
%bot.addTask(AIEnhancedRearmTask);
%bot.addTask(AIEnhancedPathCorrectionTask);
// We only need this task if we're actually playing CTF.
if ($CurrentMissionType $= "CTF")
{
%bot.addTask(AIEnhancedReturnFlagTask);
%bot.addTask(AIEnhancedFlagCaptureTask);
}
%bot.targetLoadout = 0;
%bot.shouldRearm = true;