Merge branch 'master' into jgrpp
# Conflicts: # src/animated_tile.cpp # src/cargopacket.h # src/cheat_gui.cpp # src/company_cmd.cpp # src/company_gui.cpp # src/date.cpp # src/disaster_vehicle.cpp # src/dock_gui.cpp # src/economy.cpp # src/engine.cpp # src/error_gui.cpp # src/fontcache/spritefontcache.cpp # src/game/game_gui.cpp # src/game/game_text.cpp # src/gfx.cpp # src/graph_gui.cpp # src/highscore_gui.cpp # src/industry_cmd.cpp # src/lang/dutch.txt # src/lang/english_AU.txt # src/lang/english_US.txt # src/lang/finnish.txt # src/lang/french.txt # src/lang/italian.txt # src/lang/portuguese.txt # src/lang/russian.txt # src/lang/turkish.txt # src/lang/vietnamese.txt # src/main_gui.cpp # src/misc_gui.cpp # src/network/network_gui.cpp # src/network/network_server.cpp # src/newgrf.cpp # src/newgrf.h # src/newgrf_generic.cpp # src/news_gui.cpp # src/openttd.cpp # src/os/unix/unix.cpp # src/os/windows/font_win32.cpp # src/os/windows/win32.cpp # src/rail_gui.cpp # src/road_gui.cpp # src/saveload/afterload.cpp # src/saveload/misc_sl.cpp # src/saveload/oldloader_sl.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/script/script_gui.cpp # src/settings_table.cpp # src/signs_gui.cpp # src/smallmap_gui.cpp # src/smallmap_gui.h # src/spritecache.cpp # src/spritecache.h # src/spriteloader/grf.cpp # src/station_cmd.cpp # src/statusbar_gui.cpp # src/stdafx.h # src/strgen/strgen_base.cpp # src/subsidy.cpp # src/table/settings/difficulty_settings.ini # src/texteff.cpp # src/timetable_cmd.cpp # src/timetable_gui.cpp # src/toolbar_gui.cpp # src/town_cmd.cpp # src/town_gui.cpp # src/townname.cpp # src/vehicle.cpp # src/waypoint_cmd.cpp # src/widgets/dropdown.cpp # src/window.cpp
This commit is contained in:
@@ -71,6 +71,8 @@
|
||||
#include "../event_logs.h"
|
||||
#include "../newgrf_object.h"
|
||||
#include "../newgrf_industrytiles.h"
|
||||
#include "../timer/timer.h"
|
||||
#include "../timer/timer_game_tick.h"
|
||||
|
||||
|
||||
#include "saveload_internal.h"
|
||||
@@ -2617,19 +2619,19 @@ bool AfterLoadGame()
|
||||
case TE_PASSENGERS:
|
||||
case TE_MAIL:
|
||||
/* Town -> Town */
|
||||
s->src_type = s->dst_type = ST_TOWN;
|
||||
s->src_type = s->dst_type = SourceType::Town;
|
||||
if (Town::IsValidID(s->src) && Town::IsValidID(s->dst)) continue;
|
||||
break;
|
||||
case TE_GOODS:
|
||||
case TE_FOOD:
|
||||
/* Industry -> Town */
|
||||
s->src_type = ST_INDUSTRY;
|
||||
s->dst_type = ST_TOWN;
|
||||
s->src_type = SourceType::Industry;
|
||||
s->dst_type = SourceType::Town;
|
||||
if (Industry::IsValidID(s->src) && Town::IsValidID(s->dst)) continue;
|
||||
break;
|
||||
default:
|
||||
/* Industry -> Industry */
|
||||
s->src_type = s->dst_type = ST_INDUSTRY;
|
||||
s->src_type = s->dst_type = SourceType::Industry;
|
||||
if (Industry::IsValidID(s->src) && Industry::IsValidID(s->dst)) continue;
|
||||
break;
|
||||
}
|
||||
@@ -2647,7 +2649,7 @@ bool AfterLoadGame()
|
||||
const Station *sd = Station::GetIfValid(s->dst);
|
||||
if (ss != nullptr && sd != nullptr && ss->owner == sd->owner &&
|
||||
Company::IsValidID(ss->owner)) {
|
||||
s->src_type = s->dst_type = ST_TOWN;
|
||||
s->src_type = s->dst_type = SourceType::Town;
|
||||
s->src = ss->town->index;
|
||||
s->dst = sd->town->index;
|
||||
s->awarded = ss->owner;
|
||||
@@ -4201,6 +4203,16 @@ bool AfterLoadGame()
|
||||
_settings_game.economy.tick_rate = IsSavegameVersionUntil(SLV_MORE_CARGO_AGE) ? TRM_TRADITIONAL : TRM_MODERN;
|
||||
}
|
||||
|
||||
if (SlXvIsFeatureMissing(XSLFI_AI_START_DATE) && IsSavegameVersionBefore(SLV_AI_START_DATE)) {
|
||||
/* For older savegames, we don't now the actual interval; so set it to the newgame value. */
|
||||
_settings_game.difficulty.competitors_interval = _settings_newgame.difficulty.competitors_interval;
|
||||
|
||||
/* We did load the "period" of the timer, but not the fired/elapsed. We can deduce that here. */
|
||||
extern TimeoutTimer<TimerGameTick> _new_competitor_timeout;
|
||||
_new_competitor_timeout.storage.elapsed = 0;
|
||||
_new_competitor_timeout.fired = _new_competitor_timeout.period == 0;
|
||||
}
|
||||
|
||||
InitializeRoadGUI();
|
||||
|
||||
/* This needs to be done after conversion. */
|
||||
|
Reference in New Issue
Block a user