From ba01583ce36eac48f90d0b042e7bb811b14d74ab Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 21 May 2009 11:47:45 +0000 Subject: [PATCH] (svn r16364) [0.7] -Backport from trunk: - Fix: The previously selected NewGRF station type was still remembered after switching to a different game without newstations enabled, preventing stations from being built (r16363) - Fix: Pointer incremented with wrong count (r16361) - Fix: Delete invalid depots in TTD savegames caused by improper SVXConverter conversions (r16357) --- changelog.txt | 26 ++++++++++++++++++++++++++ os/debian/changelog | 6 ++++++ os/win32/installer/install.nsi | 4 ++-- src/network/network_content.cpp | 4 ++-- src/rail_gui.cpp | 5 +++++ src/saveload/oldloader_sl.cpp | 12 ++++++++++++ 6 files changed, 53 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6f9716e1d2..70e3f276c5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,29 @@ +0.7.1-RC2 (2009-05-21) +------------------------------------------------------------------------ +- Fix: The previously selected NewGRF station type was still remembered after switching to a different game without newstations enabled, preventing stations from being built (r16363) +- Fix: Pointer incremented with wrong count (r16361) +- Fix: Delete invalid depots in TTD savegames caused by improper SVXConverter conversions (r16357) +- Fix: Invalid read when OTTD savegame contains VEH_INVALID (r16353) +- Fix: Signal handler could end in endless loop (r16351) +- Fix: [NewGRF] When overriding 'original sounds', only allow overriding of the 'original sounds' and not any other that is already loaded (r16339) +- Fix: Desyncs when removing lots of stations/towns (r16329, r16328) +- Fix: Desyncs due to the fact that depot searching with a maximum search depth simply does not work with YAPF's caches [FS#2900] (r16323) +- Fix: Trains could get stuck in a depot when they wanted to go to the same depot again [FS#2873] (r16322) +- Fix: In the scenario editor change the (starting) game year of the scenario, not the (starting) game year for new games/scenarios (r16321) +- Fix: Loading of savegames created in revision between 0.3.5 and 0.3.6 caused crash (r16320) +- Fix: [NoAI] Set the autorenew settings for new AI companies to the default values, not to 0 or the local settings (r16316) +- Fix: [NewGRF] Allow accessing the house age when the house is not yet built (r16314) +- Fix: (Get|Set)TrackBits() is only valid for RAIL_TILE_NORMAL and _SIGNALS (r16311) +- Fix: Parameter is invalid when it is equal to length of an array (r16308) +- Fix: Close all windows before unloading the AI system as closing the content-download window will rescan for AIs [FS#2901] (r16306) +- Fix: ICC (Intel C++ Compiler) defined __GNUC__ but does not define __builtin_bswap32, so fall back to the default swap method for ICC (r16295) +- Fix: Road vehicles were unable to find a depot when turning around (in some cases), causing 'nearest depot' orders to be occasionally lost [FS#2893] (r16291 +- Fix: Unable to (re)set the desert state for watery tiles [FS#2888] (r16290) +- Fix: Possible (in theory) desync related to autorenew settings (r16287) +- Fix: Crash after using the 'Reset landscape' function and remove all waypoint signs and buoys after resetting landscape (r16280) +- Fix: [NewGRF] Disable multitile houses for which the NewGRF does not define proper additional tiles (r16274) + + 0.7.1-RC1 (2009-05-11) ------------------------------------------------------------------------ - Add: [NoAI] AIController::GetVersion, this returns the version of OpenTTD in the same way as for NewGRFs (r16253) diff --git a/os/debian/changelog b/os/debian/changelog index a9f1192636..24e2e5f4c6 100644 --- a/os/debian/changelog +++ b/os/debian/changelog @@ -1,3 +1,9 @@ +openttd (0.7.1~RC2) unstable; urgency=low + + * New upstream release. + + -- Matthijs Kooijman Thu, 21 Mar 2008 14:34:56 +0200 + openttd (0.7.1~RC1) unstable; urgency=low * New upstream release. diff --git a/os/win32/installer/install.nsi b/os/win32/installer/install.nsi index ccf76777b5..70df9b054a 100644 --- a/os/win32/installer/install.nsi +++ b/os/win32/installer/install.nsi @@ -1,7 +1,7 @@ !define APPNAME "OpenTTD" ; Define application name -!define APPVERSION "0.7.1-RC1" ; Define application version +!define APPVERSION "0.7.1-RC2" ; Define application version !define APPVERSIONINTERNAL "0.7.1.0" ; Define application version in X.X.X.X -!define INSTALLERVERSION 59 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!! +!define INSTALLERVERSION 60 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!! !include ${VERSION_INCLUDE} !define APPURLLINK "http://www.openttd.org" diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index a37e894c1c..9aa479f011 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -187,7 +187,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(uint count, const Con this->Send_Packet(p); count -= p_count; - content_ids += count; + content_ids += p_count; } } @@ -271,7 +271,7 @@ void ClientNetworkContentSocketHandler::DownloadSelectedContent(uint &files, uin this->Send_Packet(p); count -= p_count; - content_ids += count; + content_ids += p_count; } free(ids); diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index c523977cf1..875a4fee8b 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -989,6 +989,11 @@ public: this->vscroll.count = _railstation.station_count; this->vscroll.cap = 5; this->vscroll.pos = Clamp(_railstation.station_type - 2, 0, this->vscroll.count - this->vscroll.cap); + } else { + /* New stations are not available, so ensure the default station + * type is 'selected'. */ + _railstation.station_class = STAT_CLASS_DFLT; + _railstation.station_type = 0; } } diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index b3b76c7576..1d12692a15 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -96,6 +96,17 @@ static void FixTTDMapArray() FixOldMapArray(); } +static void FixTTDDepots() +{ + const Depot *d; + FOR_ALL_DEPOTS_FROM(d, 252) { + if (!IsRoadDepotTile(d->xy) && !IsRailDepotTile(d->xy) && !IsShipDepotTile(d->xy) && !IsHangarTile(d->xy)) { + /** Workaround for SVXConverter bug, depots 252-255 could be invalid */ + delete d; + } + } +} + #define FIXNUM(x, y, z) (((((x) << 16) / (y)) + 1) << z) static uint32 RemapOldTownName(uint32 townnameparts, byte old_town_name_type) @@ -1769,6 +1780,7 @@ bool LoadTTDMain(LoadgameState *ls) DEBUG(oldloader, 3, "Done, converting game data..."); FixTTDMapArray(); + FixTTDDepots(); /* Fix some general stuff */ _settings_game.game_creation.landscape = _settings_game.game_creation.landscape & 0xF;