The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: Philip on September 13, 2013, 10:04:26 PM

Title: [11.x] "Reversing: 0:00 left"
Post by: Philip on September 13, 2013, 10:04:26 PM
The attached patch fixes a situation where "Reversing: 0:00 left" is displayed in a convoy's tooltip whose wait_lock is actually larger; this happens for convoys that are reversed by manual intervention, not due to their schedule.


--git a/simconvoi.cc b/simconvoi.cc
index 147c3d1..b694fdc 100644
--- a/simconvoi.cc
+++ b/simconvoi.cc
@@ -6170,13 +6170,7 @@ void convoi_t::snprintf_remaining_loading_time(char *p, size_t size) const
  */
void convoi_t::snprintf_remaining_reversing_time(char *p, size_t size) const
{
- const sint32 remaining_ticks = (sint32)(departures->get(last_stop_id).departure_time - welt->get_zeit_ms());
- uint32 ticks_left = 0;
- if(remaining_ticks >= 0)
- {
- ticks_left = remaining_ticks;
- }
- welt->sprintf_ticks(p, size, ticks_left);
+ welt->sprintf_ticks(p, size, wait_lock);
}

uint32 convoi_t::calc_highest_axle_load()

Title: Re: [11.x] "Reversing: 0:00 left"
Post by: jamespetts on September 13, 2013, 11:32:22 PM
Thank you very much for that - that had been an annoying issue for some time. I shall apply this when I next look at the 11.x branch, which will hopefully be when I have finished work on the specific part of the passenger-generation branch on which I am concentrating at present (http://forum.simutrans.com/index.php?topic=12551.new#new).
Title: Re: [11.x] "Reversing: 0:00 left"
Post by: jamespetts on September 26, 2013, 10:33:57 PM
Thank you - now in 11.x.