From 141a2f7ebc5fdab487205bec0bd1f450e46953be Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 17 Oct 2012 18:49:42 +0000 Subject: [PATCH] (svn r24602) [1.2] -Backport from trunk: - Fix: [NewGRF] Airport variables 60 to 65 and 69 used the wrong cargo translation table for translations (r24506) - Fix: Do not show the global goals as company goals for spectators (r24500) - Fix: Clarify description of command line option -n (r24485) - Fix: Do not call RebuildSubsidisedSourceAndDestinationCache() before subsidy savegame conversion is finished [FS#5232] (r24482) --- src/goal_gui.cpp | 2 +- src/newgrf_station.cpp | 2 +- src/openttd.cpp | 5 +++-- src/saveload/town_sl.cpp | 2 -- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp index 70dd6d5df3..0b01f825a9 100644 --- a/src/goal_gui.cpp +++ b/src/goal_gui.cpp @@ -190,7 +190,7 @@ struct GoalListWindow : Window { num = 0; FOR_ALL_GOALS(s) { - if (s->company == _local_company) { + if (s->company == _local_company && s->company != INVALID_COMPANY) { if (IsInsideMM(pos, 0, cap)) { /* Display the goal */ SetDParamStr(0, s->text); diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 4b0a14881b..b955c425ee 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -406,7 +406,7 @@ uint32 Station::GetNewGRFVariable(const ResolverObject *object, byte variable, b /* Handle cargo variables with parameter, 0x60 to 0x65 and 0x69 */ if ((variable >= 0x60 && variable <= 0x65) || variable == 0x69) { - CargoID c = GetCargoTranslation(parameter, object->u.station.statspec->grf_prop.grffile); + CargoID c = GetCargoTranslation(parameter, object->grffile); if (c == CT_INVALID) return 0; const GoodsEntry *ge = &this->goods[c]; diff --git a/src/openttd.cpp b/src/openttd.cpp index 7df58fabe4..ef66ffce14 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -60,7 +60,7 @@ #include "game/game.hpp" #include "game/game_config.hpp" #include "town.h" - +#include "subsidy_func.h" #include @@ -159,7 +159,7 @@ static void ShowHelp() " -g [savegame] = Start new/save game immediately\n" " -G seed = Set random seed\n" #if defined(ENABLE_NETWORK) - " -n [ip:port#company]= Start networkgame\n" + " -n [ip:port#company]= Join network game\n" " -p password = Password to join server\n" " -P password = Password to join company\n" " -D [ip][:port] = Start dedicated server\n" @@ -1155,6 +1155,7 @@ static void CheckCaches() extern void RebuildTownCaches(); RebuildTownCaches(); + RebuildSubsidisedSourceAndDestinationCache(); uint i = 0; FOR_ALL_TOWNS(t) { diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index 96cf87ada2..c0cb599948 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -50,8 +50,6 @@ void RebuildTownCaches() UpdateTownCargoes(town); } UpdateTownCargoBitmap(); - - RebuildSubsidisedSourceAndDestinationCache(); } /**