Skip to content

Commit

Permalink
Fix droid order lists not getting cleared when giving a build order.
Browse files Browse the repository at this point in the history
(cherry picked from commit 6e3821c)
  • Loading branch information
Cyp committed Nov 7, 2010
1 parent 6752476 commit 5e1a50d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/order.c
Original file line number Diff line number Diff line change
Expand Up @@ -2353,6 +2353,8 @@ void orderDroidStatsLoc(DROID *psDroid, DROID_ORDER order, BASE_STATS *psStats,
ASSERT(psDroid != NULL, "Invalid unit pointer");
ASSERT(order == DORDER_BUILD, "Invalid order for location");

orderClearDroidList(psDroid);

memset(&sOrder,0,sizeof(DROID_ORDER_DATA));
sOrder.order = order;
sOrder.x = (UWORD)x;
Expand Down Expand Up @@ -2392,6 +2394,8 @@ void orderDroidStatsTwoLoc(DROID *psDroid, DROID_ORDER order, BASE_STATS *psStat
ASSERT(order == DORDER_LINEBUILD, "Invalid order for location");
ASSERT(x1 == x2 || y1 == y2, "Invalid locations for LINEBUILD");

orderClearDroidList(psDroid);

memset(&sOrder,0,sizeof(DROID_ORDER_DATA));
sOrder.order = order;
sOrder.x = (UWORD)x1;
Expand Down

0 comments on commit 5e1a50d

Please sign in to comment.