diff --git a/src/display.c b/src/display.c index 200afe1a3..6719b4d06 100644 --- a/src/display.c +++ b/src/display.c @@ -393,7 +393,7 @@ void ProcessRadarInput(void) // MARKER // Send all droids to that location orderSelectedLoc(selectedPlayer, (PosX*TILE_UNITS)+TILE_UNITS/2, - (PosY*TILE_UNITS)+TILE_UNITS/2); + (PosY*TILE_UNITS)+TILE_UNITS/2, ctrlShiftDown()); // ctrlShiftDown() = ctrl clicked a destination, add an order } @@ -2266,31 +2266,24 @@ void dealWithLMB( void ) if (psLocation == NULL || driveModeActive() || selNumSelected(selectedPlayer)) { // now changed to use the multiple order stuff - if (ctrlShiftDown()) // ctrl clicked a destination, add an order + // clicked on a destination. + orderSelectedLoc(selectedPlayer, mouseTileX*TILE_UNITS+TILE_UNITS/2, + mouseTileY*TILE_UNITS+TILE_UNITS/2, ctrlShiftDown()); // ctrlShiftDown() = ctrl clicked a destination, add an order + /* Otherwise send them all */ + if(getNumDroidsSelected()) { - orderSelectedLocAdd(selectedPlayer, - mouseTileX*TILE_UNITS+TILE_UNITS/2, - mouseTileY*TILE_UNITS+TILE_UNITS/2, true); + assignDestTarget(); + audio_PlayTrack(ID_SOUND_SELECT); } - else // clicked on a destination. + + if (getDebugMappingStatus() && tileOnMap(mouseTileX, mouseTileY)) { - /* Otherwise send them all */ - orderSelectedLoc(selectedPlayer, mouseTileX*TILE_UNITS+TILE_UNITS/2,mouseTileY*TILE_UNITS+TILE_UNITS/2); - if(getNumDroidsSelected()) - { - assignDestTarget(); - audio_PlayTrack( ID_SOUND_SELECT ); - } + MAPTILE *psTile = mapTile(mouseTileX, mouseTileY); - if (getDebugMappingStatus() && tileOnMap(mouseTileX, mouseTileY)) - { - MAPTILE *psTile = mapTile(mouseTileX, mouseTileY); - - CONPRINTF(ConsoleString, (ConsoleString, "%s tile %d, %d [%d, %d] continent(l%d, h%d) level %g illum %d", - tileIsExplored(psTile) ? "Explored" : "Unexplored", - mouseTileX, mouseTileY, world_coord(mouseTileX), world_coord(mouseTileY), - (int)psTile->limitedContinent, (int)psTile->hoverContinent, psTile->level, (int)psTile->illumination)); - } + CONPRINTF(ConsoleString, (ConsoleString, "%s tile %d, %d [%d, %d] continent(l%d, h%d) level %g illum %d", + tileIsExplored(psTile) ? "Explored" : "Unexplored", + mouseTileX, mouseTileY, world_coord(mouseTileX), world_coord(mouseTileY), + (int)psTile->limitedContinent, (int)psTile->hoverContinent, psTile->level, (int)psTile->illumination)); } driveDisableTactical(); diff --git a/src/drive.c b/src/drive.c index 93a5a2a36..cc5c496ab 100644 --- a/src/drive.c +++ b/src/drive.c @@ -738,7 +738,7 @@ void driveProcessRadarInput(int x,int y) // when drive mode is active, clicking on the radar orders all selected droids // to move to this position. CalcRadarPosition(x, y, &PosX, &PosY); - orderSelectedLoc(selectedPlayer, PosX*TILE_UNITS,PosY*TILE_UNITS); + orderSelectedLoc(selectedPlayer, PosX*TILE_UNITS, PosY*TILE_UNITS, ctrlShiftDown()); // ctrlShiftDown() = ctrl clicked a destination, add an order } /* void driveMarkTarget(void) diff --git a/src/order.c b/src/order.c index 5f4c400ee..f4d324c29 100644 --- a/src/order.c +++ b/src/order.c @@ -2752,7 +2752,7 @@ DROID_ORDER chooseOrderLoc(DROID *psDroid, UDWORD x,UDWORD y) If add is true then the order is queued in the droid */ -void orderSelectedLocAdd(UDWORD player, UDWORD x, UDWORD y, BOOL add) +void orderSelectedLoc(uint32_t player, uint32_t x, uint32_t y, bool add) { DROID *psCurr; DROID_ORDER order; @@ -2806,12 +2806,6 @@ void orderSelectedLocAdd(UDWORD player, UDWORD x, UDWORD y, BOOL add) } -void orderSelectedLoc(UDWORD player, UDWORD x, UDWORD y) -{ - orderSelectedLocAdd(player, x,y, false); -} - - /* Choose an order for a droid from an object */ DROID_ORDER chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj) { diff --git a/src/order.h b/src/order.h index 444166be1..46c716ace 100644 --- a/src/order.h +++ b/src/order.h @@ -191,8 +191,8 @@ extern void orderDroidStatsTwoLoc(DROID *psDroid, DROID_ORDER order, extern void orderDroidStatsTwoLocAdd(DROID *psDroid, DROID_ORDER order, BASE_STATS *psStats, UDWORD x1, UDWORD y1, UDWORD x2, UDWORD y2); /* Give selected droids an order with a location target */ -extern void orderSelectedLoc(UDWORD player, UDWORD x, UDWORD y); -extern void orderSelectedLocAdd(UDWORD player, UDWORD x, UDWORD y, BOOL add); +// Only called from UI. +extern void orderSelectedLoc(uint32_t player, uint32_t x, uint32_t y, bool add); /* Give selected droids an order with an object target */ extern void orderSelectedObj(UDWORD player, BASE_OBJECT *psObj);