Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 56001781bcfcbecbd93831499a539d66b50d27d9 1 parent 9f7f7c6
@Cyp Cyp authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/order.cpp
View
14 src/order.cpp
@@ -2600,19 +2600,19 @@ DroidOrder chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj, bool altOrder)
if (altOrder && (psObj->type == OBJ_DROID || psObj->type == OBJ_STRUCTURE) && psDroid->player == psObj->player)
{
- if ((psDroid->droidType == DROID_WEAPON) || cyborgDroid(psDroid) ||
- (psDroid->droidType == DROID_COMMAND))
- {
- return DroidOrder(DORDER_ATTACK, psObj);
- }
- else if (psDroid->droidType == DROID_SENSOR)
+ if (psDroid->droidType == DROID_SENSOR)
{
return DroidOrder(DORDER_OBSERVE, psObj);
}
else if ((psDroid->droidType == DROID_REPAIR ||
psDroid->droidType == DROID_CYBORG_REPAIR) && psObj->type == OBJ_DROID)
{
- return DroidOrder(DORDER_REPAIR, psObj);
+ return DroidOrder(DORDER_DROIDREPAIR, psObj);
+ }
+ else if ((psDroid->droidType == DROID_WEAPON) || cyborgDroid(psDroid) ||
+ (psDroid->droidType == DROID_COMMAND))
+ {
+ return DroidOrder(DORDER_ATTACK, psObj);
}
}
//check for transporters first
Please sign in to comment.
Something went wrong with that request. Please try again.