Skip to content

Commit 5600178

Browse files
committedSep 19, 2012
Fix failure to repair commanders on Alt+click.
Selecting a repair droid or cyborg and hovering with Alt over a commander would show the repair icon, but do nothing on click. This was because repair droids would be ordered to do a structure repair on the commander, and repair cyborgs would be ordered to attack the commander. The repair cyborgs were smarter. Fixes ticket:1997.
1 parent 9f7f7c6 commit 5600178

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎src/order.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2600,19 +2600,19 @@ DroidOrder chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj, bool altOrder)
26002600

26012601
if (altOrder && (psObj->type == OBJ_DROID || psObj->type == OBJ_STRUCTURE) && psDroid->player == psObj->player)
26022602
{
2603-
if ((psDroid->droidType == DROID_WEAPON) || cyborgDroid(psDroid) ||
2604-
(psDroid->droidType == DROID_COMMAND))
2605-
{
2606-
return DroidOrder(DORDER_ATTACK, psObj);
2607-
}
2608-
else if (psDroid->droidType == DROID_SENSOR)
2603+
if (psDroid->droidType == DROID_SENSOR)
26092604
{
26102605
return DroidOrder(DORDER_OBSERVE, psObj);
26112606
}
26122607
else if ((psDroid->droidType == DROID_REPAIR ||
26132608
psDroid->droidType == DROID_CYBORG_REPAIR) && psObj->type == OBJ_DROID)
26142609
{
2615-
return DroidOrder(DORDER_REPAIR, psObj);
2610+
return DroidOrder(DORDER_DROIDREPAIR, psObj);
2611+
}
2612+
else if ((psDroid->droidType == DROID_WEAPON) || cyborgDroid(psDroid) ||
2613+
(psDroid->droidType == DROID_COMMAND))
2614+
{
2615+
return DroidOrder(DORDER_ATTACK, psObj);
26162616
}
26172617
}
26182618
//check for transporters first

0 commit comments

Comments
 (0)
Please sign in to comment.