Added new AI flags.
This commit is contained in:
parent
109e1c1788
commit
e5906d5f5f
|
@ -78,6 +78,11 @@ Entity *spawnFighter(char *name, int x, int y, int side)
|
|||
f->texture = getTexture("gfx/craft/civilian02.png");
|
||||
}
|
||||
|
||||
if (f->aiFlags & AIF_AGGRESSIVE)
|
||||
{
|
||||
f->aiAggression = 4;
|
||||
}
|
||||
|
||||
f->action = doAI;
|
||||
f->die = die;
|
||||
|
||||
|
@ -459,6 +464,10 @@ static void die(void)
|
|||
{
|
||||
n = rand() % 2;
|
||||
}
|
||||
else if (self->aiFlags & AIF_INSTANT_DIE)
|
||||
{
|
||||
n = 2;
|
||||
}
|
||||
|
||||
switch (n)
|
||||
{
|
||||
|
|
|
@ -88,6 +88,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define AIF_AVOIDS_COMBAT (2 << 7)
|
||||
#define AIF_DEFENSIVE (2 << 8)
|
||||
#define AIF_MISSILE_BOAT (2 << 9)
|
||||
#define AIF_AGGRESSIVE (2 << 10)
|
||||
#define AIF_INSTANT_DIE (2 << 11)
|
||||
|
||||
/* player abilities */
|
||||
#define BOOST_RECHARGE_TIME (FPS * 7)
|
||||
|
|
|
@ -42,6 +42,7 @@ void initLookups(void)
|
|||
addLookup("EF_HAS_ROPE", EF_HAS_ROPE);
|
||||
addLookup("EF_COLLECTS_ITEMS", EF_COLLECTS_ITEMS);
|
||||
addLookup("EF_NO_EPIC", EF_NO_EPIC);
|
||||
addLookup("EF_STATIC", EF_STATIC);
|
||||
|
||||
addLookup("AIF_NONE", AIF_NONE);
|
||||
addLookup("AIF_MOVES_TO_PLAYER", AIF_MOVES_TO_PLAYER);
|
||||
|
@ -54,6 +55,8 @@ void initLookups(void)
|
|||
addLookup("AIF_AVOIDS_COMBAT", AIF_AVOIDS_COMBAT);
|
||||
addLookup("AIF_DEFENSIVE", AIF_DEFENSIVE);
|
||||
addLookup("AIF_MISSILE_BOAT", AIF_MISSILE_BOAT);
|
||||
addLookup("AIF_AGGRESSIVE", AIF_AGGRESSIVE);
|
||||
addLookup("AIF_INSTANT_DIE", AIF_INSTANT_DIE);
|
||||
|
||||
addLookup("TT_DESTROY", TT_DESTROY);
|
||||
addLookup("TT_DISABLE", TT_DISABLE);
|
||||
|
|
Loading…
Reference in New Issue