News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[cleanup patch] Speed variables to sint32.

Started by inkelyad, September 23, 2010, 07:29:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

inkelyad

Patch will change type of speed related variables to sint32.

Dwachs

#1
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!
Parsley, sage, rosemary, and maggikraut.

inkelyad

Debugging time.

#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)?

Dwachs

Why not. but how does this surprise affect the game?
Parsley, sage, rosemary, and maggikraut.

inkelyad

#4

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.


Dwachs

If the bug is in the standard code, please report back / post your patch.
Parsley, sage, rosemary, and maggikraut.