Skip to content

Commit

Permalink
Fix bug #3343: prevent support artillery from needlessly rushing forward
Browse files Browse the repository at this point in the history
  • Loading branch information
lthls authored and perim committed Aug 10, 2015
1 parent 3c12b7a commit ab26ab2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/action.cpp
Expand Up @@ -1957,7 +1957,6 @@ static void actionDroidBase(DROID *psDroid, DROID_ACTION_DATA *psAction)
SDWORD pbx, pby;
WEAPON_STATS *psWeapStats = getWeaponStats(psDroid, 0);
Vector2i pos;
BASE_OBJECT *psTarget;
//added MinRangeResult;
UBYTE i;

Expand Down Expand Up @@ -2036,7 +2035,7 @@ static void actionDroidBase(DROID *psDroid, DROID_ACTION_DATA *psAction)
psDroid->actionPos = psDroid->pos;
setDroidActionTarget(psDroid, psAction->psObj, 0);

if (!isVtolDroid(psDroid) && (psTarget = orderStateObj(psDroid, DORDER_FIRESUPPORT)) && psTarget->type == OBJ_STRUCTURE)
if (!isVtolDroid(psDroid) && (orderStateObj(psDroid, DORDER_FIRESUPPORT) != NULL))
{
psDroid->action = DACTION_ATTACK; // holding, try attack straightaway
}
Expand Down

0 comments on commit ab26ab2

Please sign in to comment.