void CKAIK::UnitDestroyed(int unit, int attacker) { attacker = attacker; ai->econTracker->UnitDestroyed(unit); if (GUG(unit) != -1) { ai->ah->UnitDestroyed(unit); } ai->uh->UnitDestroyed(unit); }
void CGlobalAI::UnitDestroyed(int unit,int attacker) { attacker = attacker; ai -> bu -> MexUpgraders.remove(unit); ai -> math -> StartTimer(totalSumTime); ai -> math -> StartTimer(globalAILogTime); L("GlobalAI::UnitDestroyed is called on unit:" << unit << ". its groupid:" << ai -> MyUnits[unit] -> groupID << " name:" << ai -> MyUnits[unit] -> def() -> humanName); ai -> math -> StopTimer(globalAILogTime); ai -> math -> StartTimer(unitDestroyedTime); ai -> econTracker -> UnitDestroyed(unit); if (GUG(unit) != -1) { ai -> ah -> UnitDestroyed(unit); } ai -> uh -> UnitDestroyed(unit); ai -> math -> StopTimer(unitDestroyedTime); ai -> math -> StopTimer(totalSumTime); }