Merge branch 'master' into jgrpp
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
* \li AIGroup::SetSecondaryColour
|
||||
* \li AIGroup::GetPrimaryColour
|
||||
* \li AIGroup::GetSecondaryColour
|
||||
* \li AIVehicle::BuildVehicleWithRefit
|
||||
* \li AIVehicle::GetBuildWithRefitCapacity
|
||||
*
|
||||
* \b 1.9.0
|
||||
*
|
||||
|
@@ -19,6 +19,10 @@
|
||||
*
|
||||
* This version is not yet released. The following changes are not set in stone yet.
|
||||
*
|
||||
* API additions:
|
||||
* \li GSVehicle::BuildVehicleWithRefit
|
||||
* \li GSVehicle::GetBuildWithRefitCapacity
|
||||
*
|
||||
* \b 1.9.0
|
||||
*
|
||||
* API additions:
|
||||
|
@@ -136,8 +136,10 @@
|
||||
if (!::IsValidTile(tile)) return -1;
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
const AirportSpec *as = ::AirportSpec::Get(type);
|
||||
if (!as->IsWithinMapBounds(0, tile)) return -1;
|
||||
|
||||
if (_settings_game.economy.station_noise_level) {
|
||||
const AirportSpec *as = ::AirportSpec::Get(type);
|
||||
AirportTileTableIterator it(as->table[0], tile);
|
||||
uint dist;
|
||||
AirportGetNearestTown(as, it, dist);
|
||||
@@ -155,6 +157,8 @@
|
||||
if (!IsAirportInformationAvailable(type)) return INVALID_TOWN;
|
||||
|
||||
const AirportSpec *as = AirportSpec::Get(type);
|
||||
if (!as->IsWithinMapBounds(0, tile)) return INVALID_TOWN;
|
||||
|
||||
uint dist;
|
||||
return AirportGetNearestTown(as, AirportTileTableIterator(as->table[0], tile), dist)->index;
|
||||
}
|
||||
|
@@ -256,9 +256,6 @@
|
||||
if (!IsValidEngine(engine_id)) return 0;
|
||||
|
||||
switch (GetVehicleType(engine_id)) {
|
||||
case ScriptVehicle::VT_WATER:
|
||||
return _settings_game.pf.pathfinder_for_ships != VPF_NPF ? 129 : 0;
|
||||
|
||||
case ScriptVehicle::VT_AIR:
|
||||
return ::Engine::Get(engine_id)->GetRange() * ::Engine::Get(engine_id)->GetRange();
|
||||
|
||||
|
@@ -472,9 +472,6 @@
|
||||
|
||||
const ::Vehicle *v = ::Vehicle::Get(vehicle_id);
|
||||
switch (v->type) {
|
||||
case VEH_SHIP:
|
||||
return _settings_game.pf.pathfinder_for_ships != VPF_NPF ? 129 : 0;
|
||||
|
||||
case VEH_AIRCRAFT:
|
||||
return ::Aircraft::From(v)->acache.cached_max_range_sqr;
|
||||
|
||||
|
Reference in New Issue
Block a user