Mercurial > hg > openttd
changeset 2931:9d5731650265 draft
(svn r3487) -Fix: Price for demolishing a bridge was dependent on orientation and map size
author | tron <tron@openttd.org> |
---|---|
date | Mon, 30 Jan 2006 16:48:24 +0000 |
parents | a85949ba267e |
children | 1e154deb5e2e |
files | tunnelbridge_cmd.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -830,7 +830,11 @@ } - return ((((endtile - tile) >> (direction?8:0))&0xFF)+1) * _price.clear_bridge; + if (direction) { + return (TileY(endtile) - TileY(tile) + 1) * _price.clear_bridge; + } else { + return (TileX(endtile) - TileX(tile) + 1) * _price.clear_bridge; + } } static int32 ClearTile_TunnelBridge(TileIndex tile, byte flags)