1
0
Fork 0

(svn r13352) [0.6] -Backport from trunk (r13348, r13222, r13221, r13217):

- Fix: Industry tiles would sometimes tell they need a 'level' slope when they do not want the slope (r13348)
- Fix: Attempts to make the old AI perform better (r13217, r13221, r13222)
release/0.6
rubidium 2008-06-01 16:45:32 +00:00
parent 71144d1a98
commit 808f15e43f
7 changed files with 69 additions and 13 deletions

View File

@ -1,3 +1,9 @@
0.6.1 (2008-06-01)
------------------------------------------------------------------------
- Fix: Industry tiles would sometimes tell they need a 'level' slope when they do not want the slope (r13348)
- Fix: Attempts to make the old AI perform better (r13217, r13221, r13222)
0.6.1-RC2 (2008-05-21)
------------------------------------------------------------------------
- Fix: Do not send rcon commands of the server to the first client but do directly execute those on the server (r13137)

View File

@ -1,22 +1,28 @@
openttd (0.6.1~RC2) unstable; urgency=low
openttd (0.6.1-1) unstable; urgency=low
* New upstream release.
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Sun, 01 Jun 2008 15:35:00 +0200
openttd (0.6.1~RC2-1) unstable; urgency=low
* New upstream release.
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Wed, 21 May 2008 00:05:00 +0200
openttd (0.6.1~RC1) unstable; urgency=low
openttd (0.6.1~RC1-1) unstable; urgency=low
* New upstream release.
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Sat, 26 Apr 2008 22:55:00 +0200
openttd (0.6.0) unstable; urgency=low
openttd (0.6.0-1) unstable; urgency=low
* New upstream release.
-- Matthijs Kooijman <m.kooijman@student.utwente.nl> Tue, 01 Apr 2008 13:33:37 +0100
openttd (0.6.0~RC1) unstable; urgency=low
openttd (0.6.0~RC1-1) unstable; urgency=low
* New upstream release.

View File

@ -1,6 +1,6 @@
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "0.6.1" ; Define application version
!define INSTALLERVERSION 47 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define INSTALLERVERSION 48 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
!define APPURLLINK "http://www.openttd.org"
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"

View File

@ -1,6 +1,6 @@
OpenTTD README
Last updated: 2008-04-01
Release version: 0.6.0
Last updated: 2008-06-01
Release version: 0.6.1
------------------------------------------------------------------------

View File

@ -3377,7 +3377,8 @@ static void AiStateAirportStuff(Player *p)
AirportFTAClass::Flags flags = st->Airport()->flags;
if (!(flags & (_players_ai[p->index].build_kind == 1 && i == 0 ? AirportFTAClass::HELICOPTERS : AirportFTAClass::AIRPLANES))) {
/* if airport doesn't accept our kind of plane, dismiss it */
if (!(flags & (_players_ai[p->index].build_kind == 1 ? AirportFTAClass::HELICOPTERS : AirportFTAClass::AIRPLANES))) {
continue;
}
@ -3463,12 +3464,29 @@ static bool AiCheckAirportResources(TileIndex tile, const AiDefaultBlockData *p,
static int AiFindBestDefaultAirportBlock(TileIndex tile, byte cargo, byte heli, CommandCost *cost)
{
const AiDefaultBlockData *p;
uint i;
for (i = 0; (p = _airport_default_block_data[i]) != NULL; i++) {
// If we are doing a helicopter service, avoid building
// airports where they can't land.
if (heli && !(GetAirport(p->attr)->flags & AirportFTAClass::HELICOPTERS)) continue;
bool no_small = false;
if (!heli) {
/* do not build small airport if we have large available and we are not building heli route */
uint valid = GetValidAirports();
for (uint i = 0; (p = _airport_default_block_data[i]) != NULL; i++) {
uint flags = GetAirport(p->attr)->flags;
if (HasBit(valid, p->attr) && (flags & AirportFTAClass::AIRPLANES) && !(flags & AirportFTAClass::SHORT_STRIP)) {
no_small = true;
break;
}
}
}
for (uint i = 0; (p = _airport_default_block_data[i]) != NULL; i++) {
uint flags = GetAirport(p->attr)->flags;
/* If we are doing a helicopter service, avoid building airports where they can't land */
if (heli && !(flags & AirportFTAClass::HELICOPTERS)) continue;
/* Similiar with aircraft ... */
if (!heli && !(flags & AirportFTAClass::AIRPLANES)) continue;
/* Do not build small airport if we prefer large */
if (no_small && (flags & AirportFTAClass::SHORT_STRIP)) continue;
*cost = AiDoBuildDefaultAirportBlock(tile, p, 0);
if (CmdSucceeded(*cost) && AiCheckAirportResources(tile, p, cargo))

View File

@ -330,6 +330,20 @@ static uint GetSlopeZ_Industry(TileIndex tile, uint x, uint y)
static Foundation GetFoundation_Industry(TileIndex tile, Slope tileh)
{
IndustryGfx gfx = GetIndustryGfx(tile);
/* For NewGRF industry tiles we might not be drawing a foundation. We need to
* account for this, otherwise we might be applying a FOUNDATION_LEVELED
* on a steep slope which is not allowed. Furthermore other structures should
* draw the wall of the foundation in this case.
*/
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
const IndustryTileSpec *indts = GetIndustryTileSpec(gfx);
if (indts->grf_prop.spritegroup != NULL && HasBit(indts->callback_flags, CBM_INDT_DRAW_FOUNDATIONS)) {
uint32 callback_res = GetIndustryTileCallback(CBID_INDUSTRY_DRAW_FOUNDATIONS, 0, 0, gfx, GetIndustryByTile(tile), tile);
if (callback_res == 0) return FOUNDATION_NONE;
}
}
return FlatteningFoundation(tileh);
}

View File

@ -591,15 +591,27 @@ static const AiDefaultBlockData _airportdata_ai_5[] = {
MKEND(),
};
static const AiDefaultBlockData _airportdata_ai_6[] = {
MKAIR(6, 0, 0),
MKEND(),
};
static const AiDefaultBlockData _airportdata_ai_7[] = {
MKAIR(7, 0, 0),
MKEND(),
};
static const AiDefaultBlockData _airportdata_ai_8[] = {
MKAIR(8, 0, 0),
MKEND(),
};
#undef MKAIR
#undef MDEND
static const AiDefaultBlockData * const _airport_default_block_data[] = {
_airportdata_ai_8, // helistation
_airportdata_ai_6, // helidepot
_airportdata_ai_7, // intercontinental airport
_airportdata_ai_4, // international airport
_airportdata_ai_3, // metropolitan airport