diff options
author | glx <glx@openttd.org> | 2007-06-01 16:06:23 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-06-01 16:06:23 +0000 |
commit | 435cc84f6607394c4041509e5480a73ccbd36ca3 (patch) | |
tree | ad857c34f96610dfa4fc7066aa5c24db7b256c1b /src | |
parent | 3c7273271dd0c37560a81660941664335efce188 (diff) | |
download | openttd-435cc84f6607394c4041509e5480a73ccbd36ca3.tar.xz |
(svn r10012) -Fix (r9999): crash when forcing road vehicles to turn
Diffstat (limited to 'src')
-rw-r--r-- | src/roadveh_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 8e912ad08..6f9a7bbc2 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -485,7 +485,7 @@ int32 CmdTurnRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) return CMD_ERROR; } - if (GetDisallowedRoadDirections(v->tile) != DRD_NONE) return CMD_ERROR; + if (IsTileType(v->tile, MP_STREET) && GetRoadTileType(v->tile) == ROAD_TILE_NORMAL && GetDisallowedRoadDirections(v->tile) != DRD_NONE) return CMD_ERROR; if (IsTunnelTile(v->tile) && DirToDiagDir(v->direction) == GetTunnelDirection(v->tile)) return CMD_ERROR; if (IsBridgeTile(v->tile) && DirToDiagDir(v->direction) == GetBridgeRampDirection(v->tile)) return CMD_ERROR; @@ -1417,7 +1417,7 @@ again: v->cur_speed = 0; return; } - } else if (IsTileType(tile, MP_STREET) && GetRoadTileType(v->tile) == ROAD_TILE_NORMAL && GetDisallowedRoadDirections(v->tile) != DRD_NONE) { + } else if (IsTileType(v->tile, MP_STREET) && GetRoadTileType(v->tile) == ROAD_TILE_NORMAL && GetDisallowedRoadDirections(v->tile) != DRD_NONE) { v->cur_speed = 0; return; } else { |