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

Destroying bridge with vehicles on top #154

Closed
DorpsGek opened this issue May 6, 2006 · 2 comments
Closed

Destroying bridge with vehicles on top #154

DorpsGek opened this issue May 6, 2006 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented May 6, 2006

Darkvater opened the ticket and wrote:

With a level-bridge (eg the ramp goes horizontally and not up) it is possible to demolish it with a vehicle on top.
Steps to reproduce:

  1. Make a flat-ramped bridge (totally horizontal, ramp NOT going up)
  2. Send a vehicle over it, any vehicle
  3. Wait until the vehicle is on non-ramp tiles completely on the bridge
  4. Demolish the bridge.
  5. Voila, you got yourself your own hover-train.

See also link: http://www.tt-forums.net/viewtopic.php?t=24929

According to peter1138:
This code is wrong:
/* Bridges on slopes might have their Z-value offset..correct this */
v = FindVehicleBetween(
tile + delta,
endtile - delta,
TilePixelHeight(tile) + TILE_HEIGHT + GetCorrectTileHeight(tile)
);

revision at fault is r3900

Reported version: trunk
Operating system: All


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

DorpsGek commented May 6, 2006

Darkvater wrote:

Faulty revision r3900.
tile and endtile are only added an offset for FindVehicleBetween, but the calculation of the height 'TilePixelHeight(tile) + 8 + GetCorrectTileHeight(tile)' is done with the "old" tile, not the delta-offset one.


This comment was imported from FlySpray: https://bugs.openttd.org/task/154#comment260

@DorpsGek
Copy link
Member Author

DorpsGek commented May 8, 2006

Darkvater closed the ticket.

Reason for closing: Fixed

r4771


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

@DorpsGek DorpsGek closed this as completed May 8, 2006
@DorpsGek DorpsGek added Core 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