summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-09 20:04:46 +0000
committersmatz <smatz@openttd.org>2009-06-09 20:04:46 +0000
commit1c5ca9822dee9192ea3681779dd267db007cc2fa (patch)
tree3799fcc26183fd708a09a6d5da49d844360614db
parent249b6e679843ff2ba2c11878f8fcf64024489820 (diff)
downloadopenttd-1c5ca9822dee9192ea3681779dd267db007cc2fa.tar.xz
(svn r16545) -Cleanup: tunnels have been returning correct SlopeZ since r1
-rw-r--r--src/train_cmd.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 505e2b3cf..a1a4e7c3f 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3405,9 +3405,7 @@ static byte AfterSetTrainPos(Train *v, bool new_tile)
byte middle_z = GetSlopeZ((v->x_pos & INV_TILE_SIZE_MASK) | HALF_TILE_SIZE, (v->y_pos & INV_TILE_SIZE_MASK) | HALF_TILE_SIZE);
- /* For some reason tunnel tiles are always given as sloped :(
- * But they are not sloped... */
- if (middle_z != v->z_pos && !IsTunnelTile(TileVirtXY(v->x_pos, v->y_pos))) {
+ if (middle_z != v->z_pos) {
SetBit(v->flags, (middle_z > old_z) ? VRF_GOINGUP : VRF_GOINGDOWN);
}
}