MegaGlest Forum

MegaGlest => Bug reports => Closed bug reports => Topic started by: silnarm on 28 May 2010, 11:40:02

Title: [fixed] AI worker bug
Post by: silnarm on 28 May 2010, 11:40:02
fix for long known AI worker bug, a simple oversight in the end, jda's recent revelations made it rather easy to track down.

unit_type.cpp : 550
Code: [Select]
case ucWorker:
  return hasSkillClass(scBuild) || hasSkillClass(scRepair);

change to,
Code: [Select]
case ucWorker:
  return hasSkillClass(scBuild) || hasSkillClass(scRepair) || hasSkillClass(scHarvest);
Title: Re: AI worker bug
Post by: titi on 28 May 2010, 23:12:40
Thanks for the hint!
What was the exact problem?  I somehow missed the discussion. Workers were not handled by the AI when they had no build or repair skill?
So they were no workers and no warriors and by this completly ignored by the AI ?
Title: Re: AI worker bug
Post by: silnarm on 29 May 2010, 00:16:01
...Workers were not handled by the AI when they had no build or repair skill?
So they were no workers and no warriors and by this completly ignored by the AI ?

Exactly :). If they could only harvest the AI didn't consider them workers, so they never get selected when it wants a new worker.  If they also don't have an attack skill, they would never be built at all.