Player will always be on the side of the Allies.
This commit is contained in:
parent
c3d07ea5a2
commit
596069cebf
|
@ -57,7 +57,7 @@ void doAI(void)
|
|||
|
||||
if (self->target == NULL)
|
||||
{
|
||||
if (player != NULL && self->side == player->side)
|
||||
if (player != NULL && self->side == SIDE_ALLIES)
|
||||
{
|
||||
moveToPlayer();
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ void doAI(void)
|
|||
{
|
||||
self->action = flee;
|
||||
self->aiActionTime = FPS * 3;
|
||||
if (!(self->flags & EF_FLEEING) && (self->flags & EF_MISSION_TARGET) && self->side != player->side)
|
||||
if (!(self->flags & EF_FLEEING) && (self->flags & EF_MISSION_TARGET) && self->side != SIDE_ALLIES)
|
||||
{
|
||||
addHudMessage(colors.cyan, "Mission target is escaping!");
|
||||
self->flags |= EF_FLEEING;
|
||||
|
|
|
@ -81,9 +81,7 @@ void doEntities(void)
|
|||
case ET_FIGHTER:
|
||||
doFighter();
|
||||
|
||||
if (player != NULL)
|
||||
{
|
||||
if (self->side == player->side)
|
||||
if (self->side == SIDE_ALLIES)
|
||||
{
|
||||
numAllies++;
|
||||
}
|
||||
|
@ -91,7 +89,6 @@ void doEntities(void)
|
|||
{
|
||||
numEnemies++;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
@ -144,11 +141,8 @@ void drawEntities(void)
|
|||
|
||||
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
||||
{
|
||||
if (!e->active)
|
||||
if (e->active)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (e->type)
|
||||
{
|
||||
case ET_FIGHTER:
|
||||
|
@ -160,6 +154,7 @@ void drawEntities(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void drawEntity(Entity *e)
|
||||
|
|
|
@ -231,7 +231,7 @@ void doFighter(void)
|
|||
{
|
||||
if (player->alive == ALIVE_ALIVE)
|
||||
{
|
||||
if (self->side != player->side)
|
||||
if (self->side != SIDE_ALLIES)
|
||||
{
|
||||
battle.stats[STAT_ENEMIES_KILLED]++;
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ static void checkHasFled(void)
|
|||
|
||||
if (distance > 5000)
|
||||
{
|
||||
if (self->side != player->side)
|
||||
if (self->side != SIDE_ALLIES)
|
||||
{
|
||||
addHudMessage(colors.red, "Mission target has escaped.");
|
||||
battle.stats[STAT_ENEMIES_ESCAPED]++;
|
||||
|
|
|
@ -74,7 +74,7 @@ static int teamMatesClose(void)
|
|||
|
||||
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
||||
{
|
||||
if (e->active && e->type == ET_FIGHTER && e->side == player->side)
|
||||
if (e->active && e->type == ET_FIGHTER && e->side == SIDE_ALLIES)
|
||||
{
|
||||
if (getDistance(player->x, player->y, e->x, e->y) > 350)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue