News:

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

9.3: City hall placed on 2 different levels

Started by Brambo, March 07, 2011, 04:15:24 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Brambo

Hello,

Can't find this reported yet, so here it goes: I have run into a bug in Simutrans Exp 9.3 (with pakBritain.128 standard 1.08). The city hall in Galashiels (in a new game) is placed on both level -1 and 0 (2 tiles each). The graphic is displayed accordingly, leading to a rather broken up city hall. See the save:

http://www.megaupload.com/?d=P0C06H9K

Hope this helps fixing it!

paco_m

This is a problem also existing in Simutrans standard.


jamespetts

On the basis of Paco_M's report, this has been moved to the Standard board.
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.

prissi

#4
It is new for me that this exists in standard. Any field satisfies this conditions:


const grund_t* gr = welt->lookup_kartenboden(pos + d);
if (gr == NULL  ||  gr->get_grund_hang() != hang_t::flach) return false;

if (((1 << welt->get_climate(gr->get_hoehe())) & cl) == 0) {
return false;
}

if (d.x > 0 || d.y > 0) {
if (welt->lookup_kartenboden(pos)->get_hoehe() != gr->get_hoehe()) {
// height wrong!
return false;
}
}

if ( ((dir & ribi_t::sued)!=0  &&  d.y == h - 1) ||
((dir & ribi_t::west)!=0  &&  d.x == 0) ||
((dir & ribi_t::nord)!=0  &&  d.y == 0) ||
((dir & ribi_t::ost)!=0  &&  d.x == b - 1)) {
// we want to build a road here:
return
gr->get_typ() == grund_t::boden &&
(!gr->hat_wege() || (gr->hat_weg(road_wt) && !gr->has_two_ways())) && // build only on roads, no other ways
!gr->is_halt() &&
gr->kann_alle_obj_entfernen(NULL) == NULL;
} else {
// we want to build the townhall here: maybe replace existing buildings
return ((gr->get_typ()==grund_t::boden  &&  gr->ist_natur()) || gr->get_typ()==grund_t::fundament) &&
gr->kann_alle_obj_entfernen(NULL) == NULL;
}

i.e. is either flat or can be flatted. (It was reported once years ago and then some fixes were applied.)

I tried a lot on mountanieous maps but could not generate a broken townhall.

paco_m

#5
we had this with R4277 in the network game,
actually it works fine when the townhall is built but later when upgrading the townhall the error occurs:

1) townhall before upgrade


2) townhall after upgrade

Dwachs

#6
that report helped a lot.

Edit: should be fixed with rev 4345.
Parsley, sage, rosemary, and maggikraut.