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

wrong build price calculation at tunnels (maybe bridges) #253

Closed
DorpsGek opened this issue Jul 24, 2006 · 1 comment
Closed

wrong build price calculation at tunnels (maybe bridges) #253

DorpsGek opened this issue Jul 24, 2006 · 1 comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

gigajum opened the ticket and wrote:

If i build a bridge or a tunnel when i have a demolished starting tile, while the end tile is not demolished, the whole tunnel price is less then i have a non demolished tile and a demolished endtile. See pictures

I have not looked at the bridge code, or tested if it happens there too, but Shorty reported that it affects bridges too, but not always. For more infos see http://www.tt-forums.net/viewtopic.php?t=24759&start=20

Caused by adding the price for demolishing the starting tile to the cost variable and then do bitshifting with it.
[code]
ret = DoCommand(start_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (CmdFailed(ret)) return ret;
cost = _price.build_tunnel + ret

///some lines underneath
cost += _price.build_tunnel;
cost += cost >> 3
[/code]

Attachments

Reported version: trunk
Operating system: All


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

Darkvater closed the ticket.

Reason for closing: Implemented


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

@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