The International Simutrans Forum

 

Author Topic: 4-rotation town halls - odd placement  (Read 3495 times)

0 Members and 1 Guest are viewing this topic.

Offline The Hood

  • Devotees (Inactive)
  • *
  • Posts: 2889
  • pak128.Britain developer
4-rotation town halls - odd placement
« 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...

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
Re: 4-rotation town halls - odd placement
« Reply #1 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?

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: 4-rotation town halls - odd placement
« Reply #2 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

Offline The Hood

  • Devotees (Inactive)
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: 4-rotation town halls - odd placement
« Reply #3 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

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
[patch] 4-rotation town halls - odd placement
« Reply #4 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
Re: 4-rotation town halls - odd placement
« Reply #5 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).

Offline The Hood

  • Devotees (Inactive)
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: 4-rotation town halls - odd placement
« Reply #6 on: January 24, 2010, 10:10:47 PM »
Looking forward to testing this if/when it makes it into trunk!

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
Re: 4-rotation town halls - odd placement
« Reply #7 on: January 25, 2010, 07:23:53 PM »
Incorporated in 3051 :) Happy testing!

Offline The Hood

  • Devotees (Inactive)
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: 4-rotation town halls - odd placement
« Reply #8 on: January 27, 2010, 10:21:34 PM »
Just tried it out - perfect!

Offline z9999+

  • Coder/patcher
  • *
  • Posts: 377
Re: 4-rotation town halls - odd placement
« Reply #9 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);
   }

 ???

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
Re: 4-rotation town halls - odd placement
« Reply #10 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+.