Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing Glitch with Trees on Road/Tram Crossing #1807

Closed
DorpsGek opened this issue Feb 26, 2008 · 7 comments
Closed

Drawing Glitch with Trees on Road/Tram Crossing #1807

DorpsGek opened this issue Feb 26, 2008 · 7 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Eddi opened the ticket and wrote:

when you have e.g. a tram in / direction and a road in crossing, then trees or lamps are placed on the tram rails
r12180

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/1807
@DorpsGek
Copy link
Member Author

Eddi wrote:

screenshot

next to Erlangen Nord, there are trees on the rails, and halfway towards Rüsselshorst, there are Lamps

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1807#comment3556

@DorpsGek
Copy link
Member Author

Roujin wrote:

I made a little patch that will look for road and tram bits instead of just road bits when drawing road details.
However, this will add lamps/trees also to tram-only tracks.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1807#comment3557

@DorpsGek
Copy link
Member Author

Roujin wrote:

this second version does the same, except it skips drawing of road details if there are no road bits on the tile.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1807#comment3558

@DorpsGek
Copy link
Member Author

Belugas wrote:

Although i can confirm that your approach does work, i would have been more inclined to accept another one, which is actually to make the road side the one we want.
Alas, i've so far failed to make it so, even if the code seems to be a working one :(

Dunno. Just that it makes more sens to set proper surrounding to me.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1807#comment3561

@DorpsGek
Copy link
Member Author

Roujin wrote:

I am against changing the roadside for two reasons:

  1. what about this situation? (screenshot) With your approach, there would be no trees at all on that tile.
  2. consistency. A four way road crossing also hasn't its roadside changed. The code looks up in _roadside_trees or _roadside_lamps which roaddetails have to be drawn for the given roadbits and that is "none" for a four way crossing. (as for no bits or one of the four bits).

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1807#comment3562

@DorpsGek
Copy link
Member Author

Roujin wrote:

Just now I looked at your approach.. that would kill any lamps/trees on the side of roads with a tramway, even if the tram follows the same path as the road.

Again, for me, roadside shouldn't be changed for something like this. If a road/tram bit is removed from such a tile (so that now trees/lamps should be drawn again), the game shouldn't have to look up again in which zone it is to know it needs roadside_trees or roadside_lamps. I think "roadside" means something like "if the environment is suitable, draw this and that". It's like this for four way road crossings like I posted above (roadside is e.g. trees, but lookup results in "nothing to be drawn"), and it should imo be like this for our problem here aswell.

Added version 3 of my fix, which also draws no roadside details if there are less than two road bits for consistency.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1807#comment3563

@DorpsGek
Copy link
Member Author

Belugas closed the ticket.

Reason for closing: Fixed

in r12290
thanks to you both


This comment was imported from FlySpray: https://bugs.openttd.org/task/1807

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Trams labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant