Updated EF_DISABLE to EF_DISABLED. Fixed objective logic for disabled craft (fire only once).

This commit is contained in:
Steve 2015-11-14 16:14:48 +00:00
parent 2ad6579a35
commit c9632613ce
4 changed files with 6 additions and 5 deletions

View File

@ -26,7 +26,7 @@ static int aggression[][5] =
{50, 55, 60, 65, 70},
{40, 45, 50, 55, 60},
{30, 35, 40, 45, 50},
{20, 25, 30, 35, 40}
{15, 20, 25, 30, 35}
};
static void faceTarget(Entity *f);
@ -192,7 +192,7 @@ static int canAttack(Entity *f)
{
self->selectedGunType = self->guns[0].type;
if (f->flags & EF_DISABLE)
if (f->flags & EF_DISABLED)
{
if (f->systemPower > 0)
{

View File

@ -215,8 +215,9 @@ void doFighter(void)
self->shield = self->maxShield = 0;
self->action = NULL;
if (self->alive == ALIVE_ALIVE)
if ((self->flags & EF_DISABLED) == 0)
{
self->flags |= EF_DISABLED;
updateObjective(self->name, TT_DISABLE);
battle.stats[STAT_DISABLED]++;
}

View File

@ -64,7 +64,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define EF_NONE 0
#define EF_NO_KILL (2 << 0)
#define EF_DISABLE (2 << 1)
#define EF_DISABLED (2 << 1)
#define EF_IMMORTAL (2 << 2)
#define EF_MISSION_TARGET (2 << 3)
#define EF_FLEES (2 << 4)

View File

@ -34,7 +34,7 @@ void initLookups(void)
addLookup("ET_EXTRACTION_POINT", ET_EXTRACTION_POINT);
addLookup("EF_NO_KILL", EF_NO_KILL);
addLookup("EF_DISABLE", EF_DISABLE);
addLookup("EF_DISABLED", EF_DISABLED);
addLookup("EF_IMMORTAL", EF_IMMORTAL);
addLookup("EF_MISSION_TARGET", EF_MISSION_TARGET);
addLookup("EF_FLEES", EF_FLEES);