(svn r5198) Fix some strange control flow: the case for MP_RAILWAY fell through the case for MP_TUNNELBRIDGE
This commit is contained in:
		
							
								
								
									
										16
									
								
								elrail.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								elrail.c
									
									
									
									
									
								
							@@ -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);
 | 
										sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x, ti->y) + sss->z_offset);
 | 
				
			||||||
				return;
 | 
									return;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			/* Fall through */
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case MP_TUNNELBRIDGE:
 | 
							case MP_TUNNELBRIDGE:
 | 
				
			||||||
			if (IsBridgeTile(ti->tile) && IsBridgeMiddle(ti->tile) && GetRailTypeOnBridge(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenaryOnBridge(ti);
 | 
								if (IsBridge(ti->tile) && IsBridgeMiddle(ti->tile) && GetRailTypeOnBridge(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenaryOnBridge(ti);
 | 
				
			||||||
			/* Fall further */
 | 
					 | 
				
			||||||
		case MP_STREET: case MP_STATION:
 | 
					 | 
				
			||||||
			DrawCatenaryRailway(ti);
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		default:
 | 
					 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							case MP_STREET:  break;
 | 
				
			||||||
 | 
							case MP_STATION: break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							default: return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						DrawCatenaryRailway(ti);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user