Changeset - r6776:e1dea20d4870
[Not reviewed]
master
0 1 0
glx - 17 years ago 2007-06-01 16:06:23
glx@openttd.org
(svn r10012) -Fix (r9999): crash when forcing road vehicles to turn
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/roadveh_cmd.cpp
Show inline comments
 
@@ -485,7 +485,7 @@ int32 CmdTurnRoadVeh(TileIndex tile, uin
 
		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 {
0 comments (0 inline, 0 general)