From e5092291d3e7b641347dc75a5fea450fa635f11d Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 20 May 2016 09:52:23 +0100 Subject: [PATCH] Don't check for team mates if the player is on the side of the Pandorans. --- src/battle/waypoints.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/battle/waypoints.c b/src/battle/waypoints.c index 11e086c..5f5f346 100644 --- a/src/battle/waypoints.c +++ b/src/battle/waypoints.c @@ -110,15 +110,18 @@ static int teamMatesClose(void) { Entity *e; - for (e = battle.entityHead.next ; e != NULL ; e = e->next) + if (player->side != SIDE_PANDORAN) { - if (e->active && e->type == ET_FIGHTER && e->side == SIDE_ALLIES) + for (e = battle.entityHead.next ; e != NULL ; e = e->next) { - if (getDistance(player->x, player->y, e->x, e->y) > 350) + if (e->active && e->type == ET_FIGHTER && e->side == SIDE_ALLIES) { - addHudMessage(colors.cyan, _("Cannot activate waypoint - team mates too far away")); - self->aiActionTime = FPS; - return 0; + if (getDistance(player->x, player->y, e->x, e->y) > 350) + { + addHudMessage(colors.cyan, _("Cannot activate waypoint - team mates too far away")); + self->aiActionTime = FPS; + return 0; + } } } }