diff options
author | tron <tron@openttd.org> | 2006-01-30 16:48:24 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-01-30 16:48:24 +0000 |
commit | 2f668b8669dfe9a74f060bee22e93b8f5b8088ce (patch) | |
tree | 072657cd3a6faa22ab080307be648bc0fd9af37f | |
parent | 876813cd9d07b1e1d2525cb697444fedcde3cc0f (diff) | |
download | openttd-2f668b8669dfe9a74f060bee22e93b8f5b8088ce.tar.xz |
(svn r3487) -Fix: Price for demolishing a bridge was dependent on orientation and map size
-rw-r--r-- | tunnelbridge_cmd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 6d40c28f9..02829af96 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -830,7 +830,11 @@ clear_it:; } - 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) |