diff options
author | tron <tron@openttd.org> | 2006-06-09 15:24:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-09 15:24:04 +0000 |
commit | e6b5a07962a48aafe5fa0ab227ca9411574d06e9 (patch) | |
tree | c6c1e706d7daa2fb69f347e40d9ce20dd912a069 | |
parent | 825eb1cccb2680bbb943c01ddbe22e7f3641263d (diff) | |
download | openttd-e6b5a07962a48aafe5fa0ab227ca9411574d06e9.tar.xz |
(svn r5198) Fix some strange control flow: the case for MP_RAILWAY fell through the case for MP_TUNNELBRIDGE
-rw-r--r-- | elrail.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -352,14 +352,16 @@ void DrawCatenary(const TileInfo *ti) sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x, ti->y) + sss->z_offset); return; } - /* Fall through */ - case MP_TUNNELBRIDGE: - if (IsBridgeTile(ti->tile) && IsBridgeMiddle(ti->tile) && GetRailTypeOnBridge(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenaryOnBridge(ti); - /* Fall further */ - case MP_STREET: case MP_STATION: - DrawCatenaryRailway(ti); break; - default: + + case MP_TUNNELBRIDGE: + if (IsBridge(ti->tile) && IsBridgeMiddle(ti->tile) && GetRailTypeOnBridge(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenaryOnBridge(ti); break; + + case MP_STREET: break; + case MP_STATION: break; + + default: return; } + DrawCatenaryRailway(ti); } |