From c37e109ffc63a3cf5696f7bf0cc6157d5a66343e Mon Sep 17 00:00:00 2001 From: Allanis Date: Wed, 12 Mar 2014 19:23:32 +0000 Subject: [PATCH] [Change] Always mark paths as red when out of fuel. --- src/map.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/map.c b/src/map.c index 6f9eafe..7e69723 100644 --- a/src/map.c +++ b/src/map.c @@ -372,15 +372,20 @@ static void map_render(double bx, double by, double w, double h) { if((hyperspace_target != -1) && (((cur_system == sys) && (j == hyperspace_target)) || ((cur_system == &systems_stack[sys->jumps[j]]) && - (sys == &systems_stack[cur_system->jumps[hyperspace_target]])))) - col = &cGreen; + (sys==&systems_stack[cur_system->jumps[hyperspace_target]])))) { + if(player->fuel < HYPERSPACE_FUEL) + col = &cRed; + else + col = &cGreen; + } else if((n > 0) && (m > 0)) { if((n == 2) || (m == 2)) /* Out of fuel. */ col = &cRed; else col = &cYellow; } - else col = &cDarkBlue; + else + col = &cDarkBlue; glBegin(GL_LINE_STRIP); ACOLOUR(*col, 0.); tx = x + sys->pos.x * map_zoom;