News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Cursor unable to go beyond altitude 14?

Started by pwhk, September 30, 2013, 01:25:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pwhk

Just happen to have a map number (No. 3242 which I mentioned in the random map thread) that generates really high mountains.

This is not a problem. However, apparently, the cursor cannot go up further when the land altitude is beyond 14.

Markohs

I think this comes from standard code, simworld.cc, line 6483:


const sint8 hmax = grund_t::underground_mode == grund_t::ugm_all ? get_maximumheight() : min( grund_t::underground_level, get_maximumheight() );


Before I got my dirty hands on that line, it was a literal constant inlined in code, now it's a constant too, but a bit different:

simworld.h line 1225:


sint8 get_maximumheight() const { return 32; }


32 is not 14, what was the water level in that map?


Markohs

#3
On simutrans experimental that value is 14, I don't know why, james might know more about it. On standard is 32 as I already said. :)

Line 1497:
https://github.com/jamespetts/simutrans-experimental/blob/master/simworld.h

EDIT: In standard that value was 14 too, until update 6530, kierongreen's patch to implement double heights, I guess experimental has not imported that patch yet.

Modifying that value in current code won't cause trouble, only that cursor movement will check more tiles, not critical for performance.

kierongreen

Just a note here - if you generate really rough maps in a single height pak then import these into double height at a later stage unpredictable things might happen...

jamespetts

Thank you for the information/suggestions here. I have now increased the level to 32 on the 11.x branch.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.