Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 authored September 19, 2012

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. 14  src/order.cpp
14  src/order.cpp
@@ -2600,19 +2600,19 @@ DroidOrder chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj, bool altOrder)
2600 2600
 
2601 2601
 	if (altOrder && (psObj->type == OBJ_DROID || psObj->type == OBJ_STRUCTURE) && psDroid->player == psObj->player)
2602 2602
 	{
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)
2609 2604
 		{
2610 2605
 			return DroidOrder(DORDER_OBSERVE, psObj);
2611 2606
 		}
2612 2607
 		else if ((psDroid->droidType == DROID_REPAIR ||
2613 2608
 		         psDroid->droidType == DROID_CYBORG_REPAIR) && psObj->type == OBJ_DROID)
2614 2609
 		{
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);
2616 2616
 		}
2617 2617
 	}
2618 2618
 	//check for transporters first

0 notes on commit 5600178

Please sign in to comment.
Something went wrong with that request. Please try again.