The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: inkelyad on September 23, 2010, 07:29:18 pm

Title: [cleanup patch] Speed variables to sint32.
Post by: inkelyad on September 23, 2010, 07:29:18 pm
Patch will change type of speed related variables to sint32.
Title: Re: [cleanup patch] Speed variables to sint32.
Post by: Dwachs on September 24, 2010, 05:37:04 am
Why did you change the type of ware_besch_t::get_speed_bonus() ? Imho, this variable is not a speed but rather a positive multiplicator of goods prices.

Edit: Incorporated in 3823 (without the change in ware_besch_t::get_speed_bonus).

Thank you!
Title: Re: [cleanup patch] Speed variables to sint32.
Post by: inkelyad on September 24, 2010, 09:11:33 pm
Debugging time.
Code: [Select]
#define SPEED_UNLIMITED ((std::numeric_limits<sint32>::max)())
Will give us big surprise in speed_to_kmh(SPEED_UNLIMITED).

Can we change it to something more sane? 1280000 (== 100000kmh)?
Title: Re: [cleanup patch] Speed variables to sint32.
Post by: Dwachs on September 25, 2010, 08:35:46 am
Why not. but how does this surprise affect the game?
Title: Re: [cleanup patch] Speed variables to sint32.
Post by: inkelyad on September 25, 2010, 08:48:17 am

It is not problem in Standard. But it is in Experimental.
But it can be logic error somewhere. Leave it as is  then. I will find logic error.

Title: Re: [cleanup patch] Speed variables to sint32.
Post by: Dwachs on September 25, 2010, 09:45:54 am
If the bug is in the standard code, please report back / post your patch.