Fixed Bug #912982: [Bos] repair

This commit is contained in:
mr-russ 2004-03-13 03:25:09 +00:00
parent b98022d536
commit b1bff0a379
2 changed files with 12 additions and 5 deletions

View file

@ -34,10 +34,11 @@
<ul>
<li>Future 2.1 Release<p>
<ul>Fixed Bug #909785: "-DEV" in Magnant-dev is transparent on victory screen (from Russell Smith).
<ul>Applied Patch #899067: missile in spells (from joris dauphin).
<ul>Applied Patch #897011: AutoCast by Default (from joris dauphin).
<ul>Implemented Pixel Scrolling (from Russell Smith).
<ul>Fixed Bug #912982: [Bos] repair (from Russell Smith).
<li>Fixed Bug #909785: "-DEV" in Magnant-dev is transparent on victory screen (from Russell Smith).
<li>Applied Patch #899067: missile in spells (from joris dauphin).
<li>Applied Patch #897011: AutoCast by Default (from joris dauphin).
<li>Implemented Pixel Scrolling (from Russell Smith).
<li><b>2.0 Released</b><p>
<ul>
<li>Fixed Bug #907125: missiles launched from units in transporters (from Russell Smith).

View file

@ -276,11 +276,17 @@ global void HandleActionRepair(Unit* unit)
NewResetPath(unit);
}
}
if (goal) {
if (goal && MapDistanceBetweenUnits(unit, goal) <= unit->Type->RepairRange) {
RepairUnit(unit, goal);
goal = unit->Orders[0].Goal;
} else if (goal && MapDistanceBetweenUnits(unit, goal) > unit->Type->RepairRange) {
// If goal has move, chase after it
unit->State = 0;
unit->SubAction = 0;
unit->Reset = 1;
}
//
// Target is fine, choose new one.
//