The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: The Hood on January 22, 2010, 10:34:19 pm

Title: 4-rotation town halls - odd placement
Post by: The Hood on January 22, 2010, 10:34:19 pm
This is a split off the pak128.Britain discussion about rotations...

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...
Title: Re: 4-rotation town halls - odd placement
Post by: Dwachs on January 23, 2010, 09:35:56 am
can you post  4-rotation pak for testing? or is there one in the pak128.Britain-package already?
Title: Re: 4-rotation town halls - odd placement
Post by: z9999+ on January 23, 2010, 10:29:40 am
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
Title: Re: 4-rotation town halls - odd placement
Post by: The Hood on January 23, 2010, 12:51:18 pm
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
Title: [patch] 4-rotation town halls - odd placement
Post by: Dwachs on January 23, 2010, 03:34:50 pm
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.
Title: Re: 4-rotation town halls - odd placement
Post by: Dwachs on January 24, 2010, 07:55:10 pm
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).
Title: Re: 4-rotation town halls - odd placement
Post by: The Hood on January 24, 2010, 10:10:47 pm
Looking forward to testing this if/when it makes it into trunk!
Title: Re: 4-rotation town halls - odd placement
Post by: Dwachs on January 25, 2010, 07:23:53 pm
Incorporated in 3051 :) Happy testing!
Title: Re: 4-rotation town halls - odd placement
Post by: The Hood on January 27, 2010, 10:21:34 pm
Just tried it out - perfect!
Title: Re: 4-rotation town halls - odd placement
Post by: z9999+ on February 02, 2010, 06:32:40 pm
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);
   }

 ???
Title: Re: 4-rotation town halls - odd placement
Post by: Dwachs on February 02, 2010, 07:26:09 pm
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+.