This is a split off the pak128.Britain discussion about rotations...
Quote from: Dwachs on January 22, 2010, 02:11:02 PM
You mean for rotated townhalls the newly created road were not in front of them? But always lower right of the building no matter how it was rotated?
This is what I mean. Both were taken from the same new map. Town halls always form in this position relative to a road, but with seemingly random rotation. Ideally, the front should always face a road...
can you post 4-rotation pak for testing? or is there one in the pak128.Britain-package already?
If you have a plan to rewrite code to allow 2 or 4 rotations for cityhall, please consider none-square cityhall which is causing problem in pak96.comic, too.
http://forum.simutrans.com/index.php?topic=3700.0
Current pak128.Britain package is 1 rotation only because of this issue. Here are the sources of the 4R townhall.
http://files.[ simutrans [dot] us (site down, do not visit) ]/files/get/yWnilwxffg/4r-townhall.zip
Here is a patch. It also fixes some issues with the pak96.comic desert town hall. Ie Renovation does not leave any traces anymore.
Known issue: the intercity road generation needs to be adapted. It starts its roads independent of the town hall roads.
Update: also intercity road connection respects townhall orientation. The patch now saves the position of one piece of road of the townhall in the savegame (if its version is stepped).
Looking forward to testing this if/when it makes it into trunk!
Incorporated in 3051 :) Happy testing!
Just tried it out - perfect!
Quote
Release Candidate 102.2.2
ADD: support for townhalls with four rotations
Does this fully incorporated in 102.2.2 ?
Quote
// save townhall road position
if(file->get_version()>102002) {
townhall_road.rdwr(file);
}
???
Not fully, in the sense that this coordinate is not saved.
However, this coordinate is only used in connection with map enlargement, if a road from a new to an old city is built. If the position is not in the file, it is guessed, see simworld.cc, karte_t::distribute_groundobjs_cities, lines 900+.