Skip to content

Commit f2297bc

Browse files
authored
Merge pull request aburch#6 from jamespetts/master
Way constraints fix
2 parents 1a0409a + 60bf218 commit f2297bc

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

boden/wege/weg.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ void weg_t::info(cbuffer_t & buf, bool is_bridge) const
950950
}
951951
any_permissive = true;
952952
char tmpbuf[30];
953-
sprintf(tmpbuf, " Permissive %i-%i", desc->get_waytype(), i);
953+
sprintf(tmpbuf, "Permissive %i-%i", desc->get_waytype(), i);
954954
buf.append(translator::translate(tmpbuf));
955955
buf.append("\n");
956956
}

vehicle/simvehicle.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6555,10 +6555,20 @@ sint32 rail_vehicle_t::block_reserver(route_t *route, uint16 start_index, uint16
65556555

65566556
bool last_signal_was_track_circuit_block = false;
65576557

6558+
if (no_junctions_to_next_signal && reached_end_of_loop && success && last_stop_signal_index < INVALID_INDEX)
6559+
{
6560+
const grund_t* gr_signal = welt->lookup(route->at(last_stop_signal_index));
6561+
signal_t* signal = gr_signal->find<signal_t>();
6562+
if (signal)
6563+
{
6564+
signal->set_no_junctions_to_next_signal(true);
6565+
}
6566+
}
6567+
65586568
FOR(slist_tpl<grund_t*>, const g, signs)
65596569
{
65606570
if(signal_t* const signal = g->find<signal_t>())
6561-
{
6571+
{
65626572
if(((counter -- > 0 || (pre_signals.empty() && (!starting_at_signal || signs.get_count() == 1)) || (reached_end_of_loop && (early_platform_index == INVALID_INDEX || last_stop_signal_index < early_platform_index))) && (signal->get_desc()->get_working_method() != token_block || starting_at_signal || ((start_index == first_stop_signal_index) && (first_stop_signal_index == last_stop_signal_index))) && ((route->at(route->get_count() - 1) != signal->get_pos()) || signal->get_desc()->get_working_method() == token_block)))
65636573
{
65646574
const bool use_no_choose_aspect = choose_route_identical_to_main_route || (signal->get_desc()->is_choose_sign() && !is_choosing && choose_return == 0);

0 commit comments

Comments
 (0)