Allow AIF_ASSASSIN flag to be set, to always attack a target.
This commit is contained in:
parent
add135d62e
commit
c395ee25e5
|
@ -365,6 +365,9 @@ static int selectWeaponForTarget(Entity *e)
|
|||
{
|
||||
self->selectedGunType = self->guns[0].type;
|
||||
|
||||
/* if you're an assassin, just kill the target */
|
||||
if (!(e->aiFlags & AIF_ASSASSIN))
|
||||
{
|
||||
if (e->flags & EF_MUST_DISABLE)
|
||||
{
|
||||
if (e->systemPower > 0)
|
||||
|
@ -379,6 +382,7 @@ static int selectWeaponForTarget(Entity *e)
|
|||
{
|
||||
return selectWeapon(BT_LASER) || selectWeapon(BT_MAG);
|
||||
}
|
||||
}
|
||||
|
||||
if (e->shield > 0)
|
||||
{
|
||||
|
|
|
@ -123,6 +123,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define AIF_COVERS_RETREAT (2 << 15)
|
||||
#define AIF_TARGET_FOCUS (2 << 16)
|
||||
#define AIF_DROPS_MINES (2 << 17)
|
||||
#define AIF_ASSASSIN (2 << 18)
|
||||
|
||||
/* player abilities */
|
||||
#define BOOST_RECHARGE_TIME (FPS * 7)
|
||||
|
@ -188,6 +189,7 @@ enum
|
|||
SIDE_REBEL,
|
||||
SIDE_PANDORAN,
|
||||
SIDE_PIRATE,
|
||||
SIDE_MERC,
|
||||
SIDE_CSN,
|
||||
SIDE_UNF,
|
||||
SIDE_MAX
|
||||
|
|
|
@ -83,6 +83,7 @@ void initLookups(void)
|
|||
addLookup("AIF_COVERS_RETREAT", AIF_COVERS_RETREAT);
|
||||
addLookup("AIF_TARGET_FOCUS", AIF_TARGET_FOCUS);
|
||||
addLookup("AIF_DROPS_MINES", AIF_DROPS_MINES);
|
||||
addLookup("AIF_ASSASSIN", AIF_ASSASSIN);
|
||||
|
||||
addLookup("DT_ANY", DT_ANY);
|
||||
addLookup("DT_NO_SPIN", DT_NO_SPIN);
|
||||
|
@ -106,6 +107,7 @@ void initLookups(void)
|
|||
addLookup("SIDE_ALLIES", SIDE_ALLIES);
|
||||
addLookup("SIDE_PIRATE", SIDE_PIRATE);
|
||||
addLookup("SIDE_REBEL", SIDE_REBEL);
|
||||
addLookup("SIDE_MERC", SIDE_MERC);
|
||||
addLookup("SIDE_PANDORAN", SIDE_PANDORAN);
|
||||
addLookup("SIDE_CSN", SIDE_CSN);
|
||||
addLookup("SIDE_UNF", SIDE_UNF);
|
||||
|
|
Loading…
Reference in New Issue