Skip to content

Commit

Permalink
Merge pull request aburch#8 from jamespetts/master
Browse files Browse the repository at this point in the history
keeping up to date
  • Loading branch information
vladki77 authored Apr 25, 2018
2 parents 968992a + ce658ff commit c317b97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion simtool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,7 @@ const char* tool_build_way_t::get_tooltip(const player_t *) const
}
any_prohibitive = true;
char tmpbuf[30];
sprintf(tmpbuf, "Prohibitive %i", i);
sprintf(tmpbuf, "Prohibitive %i-%i", desc->get_wtyp(), i);
n += sprintf(toolstr + n, " ");
n += sprintf(toolstr + n, translator::translate(tmpbuf));
}
Expand Down
6 changes: 4 additions & 2 deletions vehicle/simvehicle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5181,6 +5181,7 @@ sint32 rail_vehicle_t::block_reserver(route_t *route, uint16 start_index, uint16
sint32 choose_return = 0;
bool reached_end_of_loop = false;
bool no_junctions_to_next_signal = true;
bool no_junctions_to_last_signal = true;
signal_t* previous_signal = NULL;
bool end_of_block = false;
bool not_entirely_free = false;
Expand Down Expand Up @@ -5908,6 +5909,7 @@ sint32 rail_vehicle_t::block_reserver(route_t *route, uint16 start_index, uint16
last_longblock_signal_index = i;
}
// Any junctions previously found no longer apply to the next signal, unless this is a pre-signal
no_junctions_to_last_signal = no_junctions_to_next_signal;
no_junctions_to_next_signal = true;
}
else if(!directional_only) // Distant signal or repeater
Expand Down Expand Up @@ -6555,11 +6557,11 @@ sint32 rail_vehicle_t::block_reserver(route_t *route, uint16 start_index, uint16

bool last_signal_was_track_circuit_block = false;

if (no_junctions_to_next_signal && reached_end_of_loop && success && last_stop_signal_index < INVALID_INDEX)
if (no_junctions_to_last_signal && reached_end_of_loop && success && last_stop_signal_index < INVALID_INDEX)
{
const grund_t* gr_signal = welt->lookup(route->at(last_stop_signal_index));
signal_t* signal = gr_signal->find<signal_t>();
if (signal)
if (signal && !signal->get_desc()->is_choose_sign())
{
signal->set_no_junctions_to_next_signal(true);
}
Expand Down

0 comments on commit c317b97

Please sign in to comment.