[Change] Always mark paths as red when out of fuel.

This commit is contained in:
Allanis 2014-03-12 19:23:32 +00:00
parent 9b60974891
commit c37e109ffc

View File

@ -372,15 +372,20 @@ static void map_render(double bx, double by, double w, double h) {
if((hyperspace_target != -1) && if((hyperspace_target != -1) &&
(((cur_system == sys) && (j == hyperspace_target)) || (((cur_system == sys) && (j == hyperspace_target)) ||
((cur_system == &systems_stack[sys->jumps[j]]) && ((cur_system == &systems_stack[sys->jumps[j]]) &&
(sys == &systems_stack[cur_system->jumps[hyperspace_target]])))) (sys==&systems_stack[cur_system->jumps[hyperspace_target]])))) {
col = &cGreen; if(player->fuel < HYPERSPACE_FUEL)
col = &cRed;
else
col = &cGreen;
}
else if((n > 0) && (m > 0)) { else if((n > 0) && (m > 0)) {
if((n == 2) || (m == 2)) /* Out of fuel. */ if((n == 2) || (m == 2)) /* Out of fuel. */
col = &cRed; col = &cRed;
else else
col = &cYellow; col = &cYellow;
} }
else col = &cDarkBlue; else
col = &cDarkBlue;
glBegin(GL_LINE_STRIP); glBegin(GL_LINE_STRIP);
ACOLOUR(*col, 0.); ACOLOUR(*col, 0.);
tx = x + sys->pos.x * map_zoom; tx = x + sys->pos.x * map_zoom;