mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r18816) -Fix (r18807): getting the catchment area of oilrigs triggered an assert
This commit is contained in:
parent
1da504aa73
commit
b46c6d56c0
@ -125,6 +125,7 @@ enum AirportTiles {
|
|||||||
#include "table/airport_defaults.h"
|
#include "table/airport_defaults.h"
|
||||||
|
|
||||||
AirportSpec AirportSpec::dummy = {NULL, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR};
|
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
|
/* Uncomment this to print out a full report of the airport-structure
|
||||||
* You should either use
|
* You should either use
|
||||||
|
@ -63,6 +63,7 @@ struct AirportSpec {
|
|||||||
|
|
||||||
static AirportSpec *Get(byte type)
|
static AirportSpec *Get(byte type)
|
||||||
{
|
{
|
||||||
|
if (type == AT_OILRIG) return &oilrig;
|
||||||
assert(type < NUM_AIRPORTS);
|
assert(type < NUM_AIRPORTS);
|
||||||
extern AirportSpec _origin_airport_specs[NUM_AIRPORTS];
|
extern AirportSpec _origin_airport_specs[NUM_AIRPORTS];
|
||||||
return &_origin_airport_specs[type];
|
return &_origin_airport_specs[type];
|
||||||
@ -71,6 +72,7 @@ struct AirportSpec {
|
|||||||
bool IsAvailable() const;
|
bool IsAvailable() const;
|
||||||
|
|
||||||
static AirportSpec dummy;
|
static AirportSpec dummy;
|
||||||
|
static AirportSpec oilrig;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user