summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-15 21:00:46 +0000
committeryexo <yexo@openttd.org>2010-01-15 21:00:46 +0000
commit31d1e9c051f6170282f027fe8b040e9ea6f3f143 (patch)
treeeb1a3585b713e53ef48dce6b6f2da9f51333f5b8 /src
parent72572a0586e3444af1c78c835a7f50fa5ca4be53 (diff)
downloadopenttd-31d1e9c051f6170282f027fe8b040e9ea6f3f143.tar.xz
(svn r18816) -Fix (r18807): getting the catchment area of oilrigs triggered an assert
Diffstat (limited to 'src')
-rw-r--r--src/airport.cpp1
-rw-r--r--src/airport.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/airport.cpp b/src/airport.cpp
index b10a73821..0de1033ff 100644
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -125,6 +125,7 @@ enum AirportTiles {
#include "table/airport_defaults.h"
AirportSpec AirportSpec::dummy = {NULL, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR};
+AirportSpec AirportSpec::oilrig = {NULL, NULL, 0, 1, 1, 0, 4, MIN_YEAR, MIN_YEAR};
/* Uncomment this to print out a full report of the airport-structure
* You should either use
diff --git a/src/airport.h b/src/airport.h
index 2ee8d9ff5..20c8c8787 100644
--- a/src/airport.h
+++ b/src/airport.h
@@ -63,6 +63,7 @@ struct AirportSpec {
static AirportSpec *Get(byte type)
{
+ if (type == AT_OILRIG) return &oilrig;
assert(type < NUM_AIRPORTS);
extern AirportSpec _origin_airport_specs[NUM_AIRPORTS];
return &_origin_airport_specs[type];
@@ -71,6 +72,7 @@ struct AirportSpec {
bool IsAvailable() const;
static AirportSpec dummy;
+ static AirportSpec oilrig;
};