Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/aircraft_cmd.cpp # src/blitter/32bpp_anim.cpp # src/cargopacket.cpp # src/cheat_gui.cpp # src/company_cmd.cpp # src/company_gui.cpp # src/core/pool_func.hpp # src/date.cpp # src/economy.cpp # src/error_gui.cpp # src/ground_vehicle.cpp # src/ground_vehicle.hpp # src/group_gui.cpp # src/industry_cmd.cpp # src/lang/dutch.txt # src/lang/french.txt # src/lang/german.txt # src/linkgraph/linkgraph_gui.cpp # src/linkgraph/mcf.cpp # src/network/network_content.cpp # src/network/network_server.cpp # src/network/network_udp.cpp # src/newgrf_engine.cpp # src/newgrf_station.cpp # src/order_cmd.cpp # src/order_gui.cpp # src/pathfinder/follow_track.hpp # src/pathfinder/yapf/yapf_common.hpp # src/saveload/saveload.cpp # src/settings_gui.cpp # src/station_cmd.cpp # src/station_kdtree.h # src/string_func.h # src/table/settings.ini # src/tgp.cpp # src/timetable_cmd.cpp # src/timetable_gui.cpp # src/toolbar_gui.cpp # src/town_cmd.cpp # src/train_cmd.cpp # src/train_gui.cpp # src/tree_gui.cpp # src/tunnelbridge_cmd.cpp # src/vehicle.cpp # src/vehicle_gui.cpp # src/video/sdl2_v.cpp # src/video/sdl_v.cpp # src/video/win32_v.cpp # src/viewport.cpp # src/viewport_sprite_sorter_sse4.cpp # src/window.cpp
This commit is contained in:
10
src/date.cpp
10
src/date.cpp
@@ -37,8 +37,6 @@ YearMonthDay _game_load_cur_date_ymd;
|
||||
DateFract _game_load_date_fract;
|
||||
uint8 _game_load_tick_skip_counter;
|
||||
|
||||
int32 _old_ending_year_slv_105; ///< Old ending year for savegames before SLV_105
|
||||
|
||||
/**
|
||||
* Set the date.
|
||||
* @param date New date
|
||||
@@ -215,11 +213,13 @@ static void OnNewYear()
|
||||
|
||||
if (_cur_date_ymd.year == _settings_client.gui.semaphore_build_before) ResetSignalVariant();
|
||||
|
||||
/* check if we reached end of the game (end of ending year) */
|
||||
if (_cur_date_ymd.year == _settings_game.game_creation.ending_year + 1) {
|
||||
/* check if we reached end of the game (end of ending year); 0 = never */
|
||||
if (_cur_date_ymd.year == _settings_game.game_creation.ending_year + 1 && _settings_game.game_creation.ending_year != 0) {
|
||||
ShowEndGameChart();
|
||||
}
|
||||
|
||||
/* check if we reached the maximum year, decrement dates by a year */
|
||||
} else if (_cur_date_ymd.year == MAX_YEAR + 1) {
|
||||
if (_cur_date_ymd.year == MAX_YEAR + 1) {
|
||||
int days_this_year;
|
||||
|
||||
_cur_date_ymd.year--;
|
||||
|
Reference in New Issue
Block a user