diff options
author | tron <tron@openttd.org> | 2006-05-06 14:32:16 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-05-06 14:32:16 +0000 |
commit | 79935130eb5ba75e129cd0e4ee501c7ac9ea67ca (patch) | |
tree | 7e53997318898dedaef580780765363a7ae33801 /train_cmd.c | |
parent | e63634d3321a3969b295c8ef02ba8403b4c0a09a (diff) | |
download | openttd-79935130eb5ba75e129cd0e4ee501c7ac9ea67ca.tar.xz |
(svn r4750) -Fix: Trains could enter certain sloped rail tiles under bridges with incompatible rail type
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c index bb0bd813f..a4ae5d61e 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2627,9 +2627,9 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile) Slope tileh = GetTileSlope(tile, &height); // correct Z position of a train going under a bridge on slopes - if (CorrectZ(tileh)) height += TILE_HEIGHT; + if (tileh != SLOPE_FLAT) height += TILE_HEIGHT; - if (v->z_pos != height) return true; // train is going over bridge + if (v->z_pos > height) return true; // train is going over bridge } break; |