changeset 18609:3f93348c5bed draft

(svn r23456) -Fix (r23441): oilrigs don't have any layouts nor do they provide airport noise
author yexo <yexo@openttd.org>
date Fri, 09 Dec 2011 15:16:21 +0000
parents 481f1979e346
children 3f5c777a330d
files src/station_cmd.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2111,7 +2111,7 @@
 	FOR_ALL_TOWNS(t) t->noise_reached = 0;
 
 	FOR_ALL_STATIONS(st) {
-		if (st->airport.tile != INVALID_TILE) {
+		if (st->airport.tile != INVALID_TILE && st->airport.type != AT_OILRIG) {
 			const AirportSpec *as = st->airport.GetSpec();
 			Town *nearest = AirportGetNearestTown(as, st->airport.layout, st->airport.tile);
 			nearest->noise_reached += GetAirportNoiseLevelForTown(as, st->airport.layout, nearest->xy, st->airport.tile);