News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[6532] Wrong bridges

Started by Václav, June 06, 2013, 07:39:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Václav

In 6532, already built bridges are OK - but new bridges are built with wrong ends - and with wrong pillars.

Ends (end tiles) - if road (or railway or anything else) has to be sloped, end tiles have been switched with each other. In the front of bridge is used back end tile - and in the back of bridge is used front tile.

Wrong pillars - pillars are not built in full height - top level (touching tile with road or railway ...) is not built.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

kierongreen

Confirmed - it should all just be graphical errors. I'll work on getting these fixed it was part of expanding bridge images to make graphics fit better but didn't get entirely finished before the double height patch was incorporated.

Václav

#2
Quote from: kierongreen on June 06, 2013, 06:57:57 PM
Confirmed - it should all just be graphical errors. I'll work on getting these fixed it was part of expanding bridge images to make graphics fit better but didn't get entirely finished before the double height patch was incorporated.
As I looked, it may be very interesting - mostly for trains and ships.

Rivers may take more real face. And trains going on those half slopes may be a little better than going on full slopes.



And of course, I beg your pardon for missing screenshots.



But until this will be corrected (at least wrong sloped end tiles), I cannot go on in great changes of transportation web - that are allowed by ships I created for pak96.comic I play.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

kierongreen

Attached patch fixes ramp slope images during dragging and enables correct selecting of start images. I've created a new function which chooses between ramp and start images as this check was duplicated several times and I thought it best to move the checks to just one place (I'm not sure whether this should be inlined? probably doesn't matter). I've not encountered problems with pillars myself could you supply a screenshot?

Images for bridges have been extended:
BackStart/FrontStart - used when starting slope is single height
BackStart2/FrontStart2 - used when starting slope is double height

Additionally the following are planned but not implemented (yet):
BackImage/FrontImage - to be used when only one tile high
BackImage2/FrontImage2 - to be used when two or more tiles high
BackRamp/FrontRamp - to be used when way rises by 1 tile
BackRamp2/FrontRamp2 - to be used when way rises by 2 tiles

All of the 2 variants are/will be optional and existing pak files continue to work correctly.

Václav

#4
I am sorry but I have not any experience with compiling of game code - and also I have no any compiling software.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

kierongreen

Hopefully this will be in a nightly build soon anyway.

Yona-MV

I guess this is the graph error

on purpose, enlarge the map size and the bridges were not generated ???


kierongreen

Cannot reproduce this screenshot with patch applied.

kierongreen


Václav

I have downloaded today's nightly, 6548:

Bridge ends are right again - but pillars are still not built in full height. Or is this what you did not patched?

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

kierongreen

Please provide a screenshot which shows the pillar problem.

Václav

Here it is.

Here it is on road bridge - but situation with other bridges is the same.

Rail bridge behind was built long time ago. For it that bridge is built right.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

kierongreen

Thanks will look into this later

kierongreen

Simple fix - I hadn't noticed this issue because all bridges I'd tested with had graphics below bridge deck level.


Index: bauer/brueckenbauer.cc
===================================================================
--- bauer/brueckenbauer.cc    (revision 6548)
+++ bauer/brueckenbauer.cc    (working copy)
@@ -529,7 +529,7 @@
             if(besch->get_pillar()==1  ||  (pos.x*zv.x+pos.y*zv.y)%besch->get_pillar()==0) {
                 grund_t *gr = welt->lookup_kartenboden(pos.get_2d());
//DBG_MESSAGE("bool brueckenbauer_t::baue_bruecke()","h1=%i, h2=%i",pos.z,gr->get_pos().z);
-                sint16 height = pos.z - gr->get_pos().z - 1;
+                sint16 height = pos.z - gr->get_pos().z;
                 while(height-->0) {
                     if( TILE_HEIGHT_STEP*height <= 127) {
                         // eventual more than one part needed, if it is too high ...


Dwachs

Thank you! In r6549 now.

Btw, the bridge in the screenshot needs parameter 'pillar_asymmetric' set!
Parsley, sage, rosemary, and maggikraut.

Václav

Quote from: Dwachs on June 15, 2013, 11:54:14 AM
Btw, the bridge in the screenshot needs parameter 'pillar_asymmetric' set!
This is for sojo, he is maintainer of pak96.comic.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní