Use isFlying instead of isVtolDroid for checking AA targets. AA can now also shoot down transports.

master
Cyp 2010-03-16 17:57:37 +01:00
parent 9de2f5c0c7
commit fcaf753f0d
2 changed files with 3 additions and 3 deletions

View File

@ -312,9 +312,9 @@ extern BOOL droidUpdateClearing( DROID *psDroid );
a defined range*/
extern BASE_OBJECT * checkForRepairRange(DROID *psDroid,DROID *psTarget);
//access function
/// Returns true iff the droid has VTOL propulsion, and is not a transport.
extern BOOL isVtolDroid(const DROID* psDroid);
/* returns true if the droid has lift propulsion and is moving */
/// Returns true iff the droid has VTOL propulsion and is moving.
extern BOOL isFlying(const DROID* psDroid);
/*returns true if a VTOL weapon droid which has completed all runs*/
extern BOOL vtolEmpty(DROID *psDroid);

View File

@ -850,7 +850,7 @@ static void proj_InFlightFunc(PROJECTILE *psProj, bool bIndirect)
if (psStats->surfaceToAir == SHOOT_IN_AIR &&
(psTempObj->type == OBJ_STRUCTURE ||
psTempObj->type == OBJ_FEATURE ||
(psTempObj->type == OBJ_DROID && !isVtolDroid((DROID *)psTempObj))
(psTempObj->type == OBJ_DROID && !isFlying((DROID *)psTempObj))
))
{
// AA weapons should not hit buildings and non-vtol droids