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

Incorrect el-rail catenary pole/wire offsets #944

Closed
DorpsGek opened this issue Jun 26, 2007 · 5 comments
Closed

Incorrect el-rail catenary pole/wire offsets #944

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

Comments

@DorpsGek
Copy link
Member

peter1138 opened the ticket and wrote:

Catenary pole and wire offsets are 'wrong' compared to TTDPatch. This effectively breaks NewGRF compatibility.

Reported version: trunk
Operating system: All


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

TrueBrain wrote:

Any suggestions how to fix it, or what can be done about it? What exactly is 'wrong' about it?


This comment was imported from FlySpray: https://bugs.openttd.org/task/944#comment1856

@DorpsGek
Copy link
Member Author

frosch wrote:

The attached picture shows the differences of elrail-drawing in the different versions.

Current OTTD trunk has the following problems:
* Wires are not connected in corners.
* Wires are not connected with the pylons. Especially visible in corners and vertical track.

The attached patch changes the sprite positions to those of TTDP.
(see svn://svn.ttdpatch.net/trunk/patches/electrif.asm)
TTDP's pylon.x and pylon.y match OTTD's (?_pcp_offsets + ?_ppp_offsets).
TTDP's flatwires and slopewires (columns 2-5) match OTTD's CatenarySpriteData.?_offset and CatenarySpriteData.?_size.

OTTD trunk contains the line "/** Corrects an off-by-one error in some places (tileh 12 and 9) (TODO -- find source of error) */".
This is fixed now. It was caused by determining the Z-height of SW/SE tileedges with tilecoords (15, 8) and (8, 15) instead of (16, 8) and (8, 16). (see changed in ?_pcp_offsets)

The tilecoord 16 makes Z-height determination a bit more complicated. (see comment in attached patch)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/944#comment1961

@DorpsGek
Copy link
Member Author

Rubidium wrote:

You seem to have removed the (optional) transparancy from the catenary.


This comment was imported from FlySpray: https://bugs.openttd.org/task/944#comment1996

@DorpsGek
Copy link
Member Author

frosch wrote:

Hmm, I broke even more (catenary on bridge ramps).

To recompense I fixed another issue (see attached screenshot).

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/944#comment2007

@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 7, 2007

Rubidium closed the ticket.

Reason for closing: Fixed

In r11054. Thanks frosch.


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

@DorpsGek DorpsGek closed this as completed Sep 7, 2007
@DorpsGek DorpsGek added Electrified rails flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) 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