Peter Nelson
00bf42353a
Codechange: Place gamelog into its own class, along with internal data.
...
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
1 year ago
Rubidium
1f3b7e2efd
Codechange: use std::string instead of stredup for saveload error messages
1 year ago
Rubidium
ee723f26ba
Codechange: Make FileToSaveLoad's title std::string and simplify assignments
1 year ago
Rubidium
ef3beef7e9
Codechange: use fmt::format_to instead of seprintf to write the savegame info
1 year ago
Patric Stout
f5fad88723
Change: base autosaves intervals on real time (instead of game time) ( #10655 )
...
There are two fundamental issues with autosave:
- When fast-forwarding, it saves way too often
- When paused, it never saves
Both makes no sense. Autosaves are meant to prevent you from
accidentally losing your work. The emphasis on "your" work.
To solve both issues, the autosave now works on real time. You
can select every 10 / 30 / 60 / 120 minutes, which are similar to
what the setting was in game-months.
When you pause, autosaving will stop. Unless you make any change
to the game; then it will continue to make autosaves, even so
the game is paused. Unpausing / pausing resets this mechanism.
1 year ago
Charles Pigott
80bd5ad727
Codechange: Use std::strto* variants everywhere ( #10720 )
1 year ago
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
1 year ago
Rubidium
f74e26ca7e
Codechange: replace error/usererror printf variant with fmt variant and rename
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Rubidium
f5f6306af3
Codechange: use string/fmt instead of printf for ShowInfo(F)
1 year ago
Jonathan G Rennison
7a836ee50f
Add SCOPE_INFO_FMT for CheckCaches
1 year ago
Jonathan G Rennison
1350e23e29
CheckCaches: Improve VehicleCargoList/StationCargoList cache checks
...
Log failures with details instead of just asserting
1 year ago
Jonathan G Rennison
08e43a0814
Simplify CCLOG macros in CheckCaches
1 year ago
PeterN
d5f9e04a55
Change: Failure to load a savegame is critical. ( #10682 )
...
Marking the error message critical ensures it is queued if multiple errors occured.
1 year ago
Patric Stout
ed83c4b0da
Change: replace per-AI "start_date" with a global "competitors_interval" ( #10653 )
...
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.
While at it, also ported this part over to the new timer system.
1 year ago
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
1 year ago
Patric Stout
5e1bcee39b
Codechange: introduce a framework for all our timers
...
IntervalTimer and TimeoutTimer use RAII, and can be used to replace
all the time-based timeouts, lag-detection, "execute every N" we
have.
As it uses RAII, you can safely use it as static variable, class
member, temporary variable, etc. As soon as it goes out-of-scope,
it will be safely removed.
This allows for much easier to read code when it comes to intervals.
1 year ago
Jonathan G Rennison
1031955033
Console: check_caches should also log failure messages to the console
2 years ago
Jonathan G Rennison
04aedf4798
TBTR: Add template replacement index validation to CheckCaches
2 years ago
Jonathan G Rennison
6cdf67f38a
Saveload: Add save flag for if this is a scenario save
2 years ago
Jonathan G Rennison
062d57eadb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/openttd.cpp
# src/video/dedicated_v.cpp
2 years ago
Rubidium
24b5033a06
Fix #10568 : "can savegame be loaded check" failed in dedicated server
...
* If loading fails, it usually returns SL_REINIT which doesn't trigger check
* If savegame has NewGRFs, it complains NewGRFs are not allowed in intro game
2 years ago
Jonathan G Rennison
3657db3b23
Fix 6aa8997e: Type mismatch for _sl_xv_upstream_version variable
2 years ago
Jonathan G Rennison
6aa8997eee
Saveload: Add corresponding upstream version to SLXI chunk
2 years ago
Jonathan G Rennison
633450f620
Add cast to clarify slicing of TimeSettings from _settings_client.gui
2 years ago
Jonathan G Rennison
ae9b416684
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/ai/ai_core.cpp
# src/ai/ai_gui.cpp
# src/ai/ai_instance.cpp
# src/console_cmds.cpp
# src/engine_type.h
# src/game/game_gui.cpp
# src/game/game_instance.cpp
# src/goal.cpp
# src/goal_cmd.h
# src/lang/english.txt
# src/lang/estonian.txt
# src/network/network_client.cpp
# src/newgrf.cpp
# src/newgrf_generic.h
# src/openttd.cpp
# src/saveload/saveload.h
# src/script/api/script_log.cpp
# src/script/api/script_town.cpp
# src/settings_table.cpp
# src/station_cmd.cpp
# src/station_cmd.h
# src/station_map.h
# src/strings.cpp
# src/table/settings/difficulty_settings.ini
# src/table/settings/gui_settings.ini
# src/tbtr_template_gui_main.h
# src/timetable_cmd.cpp
# src/timetable_cmd.h
# src/timetable_gui.cpp
# src/town_gui.cpp
# src/train_gui.cpp
# src/water_cmd.cpp
2 years ago
Jonathan G Rennison
483e3172af
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/core/strong_typedef_type.hpp
# src/gfx.cpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/map_func.h
# src/newgrf_debug_gui.cpp
# src/order_cmd.cpp
# src/pathfinder/follow_track.hpp
# src/rail_cmd.cpp
# src/road_cmd.cpp
# src/road_gui.cpp
# src/saveload/saveload.cpp
# src/screenshot.cpp
# src/smallmap_gui.cpp
# src/station_cmd.cpp
# src/strings.cpp
# src/tile_type.h
# src/timetable_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
2 years ago
Jonathan G Rennison
05ec32f577
Run water flooding at constant speed at day lengths >= 4
...
See: #482
2 years ago
Rubidium
4e65ec1dc4
Codechange: do not declare functions in blocks
2 years ago
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2 years ago
Jonathan G Rennison
3877bb31ef
Changing day length or date no longer changes time in minutes
...
Add offset variables for scaled date ticks.
Adjust offset when changing day length or date, such that scaled
date ticks remain the same.
Store _scaled_tick_counter and scaled date ticks offset in the savagame.
2 years ago
Jonathan G Rennison
b1051fa131
Move GRF global var init to common function
2 years ago
Jonathan G Rennison
351090ae7f
Fix crash when launching game with non-default GUI scale in config
...
See: #459
2 years ago
Jonathan G Rennison
6d4474b84e
Merge tag '13.0-beta2' into jgrpp
...
# Conflicts:
# src/cheat_gui.cpp
# src/company_gui.cpp
# src/console_gui.cpp
# src/depot_gui.cpp
# src/error_gui.cpp
# src/gfx.cpp
# src/graph_gui.cpp
# src/group_gui.cpp
# src/lang/english.txt
# src/lang/korean.txt
# src/lang/polish.txt
# src/misc_gui.cpp
# src/network/network_content_gui.h
# src/newgrf_debug_gui.cpp
# src/order_gui.cpp
# src/rail_gui.cpp
# src/road_gui.cpp
# src/settings_gui.cpp
# src/settings_type.h
# src/station_gui.cpp
# src/subsidy_gui.cpp
# src/table/settings/gui_settings.ini
# src/timetable_gui.cpp
# src/town_gui.cpp
# src/train_cmd.cpp
# src/vehicle_gui.cpp
# src/viewport.cpp
# src/water_cmd.cpp
# src/widgets/dropdown.cpp
# src/window_gui.h
2 years ago
Jonathan G Rennison
1e769d050f
Leave PLYP chunk unchanged when loading/saving server saves in non-MP
2 years ago
Jonathan G Rennison
6f963a1268
Include company infrastructure totals in state checksum
2 years ago
Peter Nelson
9666e46739
Feature: Variable GUI scale.
...
GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
2 years ago
Jonathan G Rennison
0fae0599b7
Fix: Data race on effect volume setting with mixer thread
2 years ago
Jonathan G Rennison
07b752fe69
Add a generic worker thread pool job executor mechanism
2 years ago
Jonathan G Rennison
e8463a15c3
Fix: Data race on effect volume setting with mixer thread
2 years ago
Jonathan G Rennison
6459e62fff
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/english.txt
# src/map_type.h
# src/network/network_command.cpp
# src/object_cmd.cpp
# src/rail_cmd.cpp
# src/road_cmd.cpp
# src/road_func.h
# src/saveload/afterload.cpp
# src/saveload/saveload.h
# src/settings_gui.cpp
# src/string.cpp
# src/table/road_land.h
# src/table/settings/game_settings.ini
# src/table/settings/world_settings.ini
# src/tbtr_template_gui_main.h
# src/train_cmd.cpp
2 years ago
krysclarke
21cea308f9
Codechange: Move Sound Driver parameter name listings ( #10127 )
2 years ago
Jonathan G Rennison
29a1e49c28
Change various asserts to not be included in release builds
2 years ago
Jonathan G Rennison
0a9c44d1a2
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/airport_gui.cpp
# src/blitter/32bpp_anim_sse4.cpp
# src/console_cmds.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/newgrf_object.h
# src/road_gui.cpp
# src/widgets/road_widget.h
# src/window.cpp
2 years ago
Jonathan G Rennison
377fb5ec30
CheckCaches: Check town cache fields individually
...
Do not compare viewport sign cache
2 years ago
Charles Pigott
9059215b3b
Fix #10073 : Stop truncating output of list_ai and friends commands
2 years ago
Jonathan G Rennison
23b974fb39
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/fontcache.cpp
# src/openttd.cpp
# src/os/macosx/font_osx.cpp
# src/os/unix/font_unix.cpp
# src/os/windows/font_win32.cpp
# src/strings.cpp
2 years ago
Peter Nelson
f6ad8e1c9c
Change: Rename some freetype things to fontcache.
...
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.
This now uses more suitable terms.
2 years ago
Jonathan G Rennison
2ff11017dc
Fix #432 : Fix false positive warning in CheckCaches with very old saves
2 years ago
Jonathan G Rennison
bd2593ca48
Add function to enqueue a DoCommandP call
2 years ago
Jonathan G Rennison
3d857333c8
Reduce delays with company bankrupcty/sale processing at high day lengths
2 years ago
dP
ca23e8abcf
Add step console command to advance n ticks
...
Cherry-picked from https://github.com/citymania-org/cmclient
Commit: 5ce2d21223a96934a83b8da43434c7a81f001ef0
2 years ago
Jonathan G Rennison
7c78b22c48
Show failure reason in message box when network savegame load fails
...
See: #412
2 years ago
Jonathan G Rennison
1d08572cfa
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/english_AU.txt
# src/openttd.cpp
# src/viewport_sprite_sorter_sse4.cpp
2 years ago
Niels Martin Hansen
c6953f13e4
Fix #9940 : Print debuglevel parse errors to console when changed from console
2 years ago
Jonathan G Rennison
752e46dfcb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/station_cmd.cpp
2 years ago
Jonathan G Rennison
c6ae82b611
Fix 9ff161e4
boosting lookahead braking stats but not actual brake forces
2 years ago
Jonathan G Rennison
04da11b668
Store signal style GRF to local map in savegame
...
Update existing signal style IDs as necessary
2 years ago
Jonathan G Rennison
7ae06124ae
Add signal style flag for no aspect increase behaviour (banner repeater)
2 years ago
Jonathan G Rennison
6e4c4b35e7
Initial implementation of NewGRF custom signal styles
2 years ago
Niels Martin Hansen
470c902bdc
Fix #9918 : Reset industy last production year on scenario start
2 years ago
Niels Martin Hansen
2cdb0cb084
Codechange: Factor out OnStartScenario function
2 years ago
Jonathan G Rennison
5b7db9d849
Merge branch 'master' into jgrpp
...
# Conflicts:
# .github/workflows/ci-build.yml
# .github/workflows/commit-checker.yml
# src/command.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/crashlog.cpp
# src/economy.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/misc_gui.cpp
# src/newgrf_config.cpp
# src/openttd.cpp
# src/settings_gui.cpp
# src/ship_cmd.cpp
# src/table/settings/gui_settings.ini
2 years ago
Niels Martin Hansen
0dce7bf85d
Add: Commandline option to skip NewGRF scanning
2 years ago
Tyler Trahan
ec90fb4c99
Fix #6544 : Don't join AI company when loading network game in singleplayer
2 years ago
Jonathan G Rennison
a54416afbc
Add GRF variable to use extra station names even when default names remain
2 years ago
Jonathan G Rennison
dacdb1137a
Add extended feature array with static current version values
3 years ago
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
3 years ago
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
Jonathan G Rennison
7953a1f8d1
Allow setting autosave interval to a custom number of real-time minutes
3 years ago
Jonathan G Rennison
69b6b388d6
On dedicated servers, save copy of last autosave on crash
...
This is to avoid all autosaves being overwritten when the server
is auto-restarted with a new map
3 years ago
Jonathan G Rennison
54b7aa3d1b
Add chicken bit for periodic signal infra total check
...
Set automatically if server detects signal infra mismatch
3 years ago
Jonathan G Rennison
3cff5e53e4
Add train cached_curve_speed_mod to VENC, cache checks and debug window
3 years ago
Jonathan G Rennison
faf32200cf
Merge tag '12.0-beta1' into jgrpp-beta
...
# Conflicts:
# CMakeLists.txt
# bin/ai/CMakeLists.txt
# bin/game/CMakeLists.txt
# src/build_vehicle_gui.cpp
# src/console_cmds.cpp
# src/core/overflowsafe_type.hpp
# src/fios.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/lang/polish.txt
# src/network/core/game_info.cpp
# src/network/core/game_info.h
# src/network/core/tcp_game.cpp
# src/network/core/tcp_game.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_coordinator.cpp
# src/network/network_gui.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf_engine.cpp
# src/openttd.cpp
# src/rev.cpp.in
# src/settings_type.h
# src/train.h
# src/train_cmd.cpp
3 years ago
Jonathan G Rennison
f764fcfb1f
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/console_cmds.cpp
# src/debug.cpp
# src/lang/vietnamese.txt
# src/network/core/address.cpp
# src/network/core/address.h
# src/network/core/config.h
# src/network/core/os_abstraction.cpp
# src/network/core/os_abstraction.h
# src/network/core/tcp_listen.h
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_gamelist.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf.cpp
# src/openttd.cpp
# src/saveload/saveload.h
# src/settings.cpp
# src/settings_table.cpp
# src/settings_type.h
# src/table/settings/network_settings.ini
3 years ago
Jonathan G Rennison
61cc60099a
Merge branch 'jgrpp' into jgrpp-beta
...
# Conflicts:
# src/network/core/packet.cpp
# src/network/core/udp.cpp
3 years ago
Jonathan G Rennison
da282c3ecc
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/ci-build.yml
# CMakeLists.txt
# src/lang/finnish.txt
# src/lang/french.txt
# src/lang/korean.txt
# src/lang/norwegian_bokmal.txt
# src/lang/russian.txt
# src/lang/spanish.txt
# src/misc_gui.cpp
# src/newgrf.cpp
3 years ago
Jonathan G Rennison
b58ff65c5c
Debug: Fix company money state checksum being logged with wrong company
3 years ago
Jonathan G Rennison
4042480806
Merge branch 'jgrpp' into jgrpp-beta
...
# Conflicts:
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/table/company_settings.ini
# src/table/currency_settings.ini
# src/table/gameopt_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/table/win32_settings.ini
# src/table/window_settings.ini
3 years ago
Patric Stout
563884105f
Change: by default, make "unload all" leave stations empty ( #9301 )
...
(cherry picked from commit 7648483364
)
3 years ago
Jonathan G Rennison
6f16655e6e
Add "special events" log. Add console command, include in crash logs.
3 years ago
Jonathan G Rennison
2e022d5194
Move game events to new event_logs header/cpp files
3 years ago
Jonathan G Rennison
6b250c203c
Add chicken bit to control CheckCaches periodic/post-command flags
3 years ago
Jonathan G Rennison
24fdc8331b
Add CheckCaches mode to emit a log/save/screenshot on detected issue
3 years ago
Jonathan G Rennison
5ed7aee8d3
Add flags field to CheckCaches for which checks to run
...
Add header file for CheckCaches
3 years ago
Jonathan G Rennison
d4d54c9b90
Add a chicken bit setting to enable periodic CheckCaches
3 years ago
Jonathan G Rennison
fd605e3cf3
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/commit-checker.yml
# src/company_cmd.cpp
# src/console_cmds.cpp
# src/crashlog.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/indonesian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/swedish.txt
# src/linkgraph/linkgraphjob.cpp
# src/linkgraph/mcf.cpp
# src/network/core/tcp.cpp
# src/network/core/tcp.h
# src/network/core/tcp_game.h
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_admin.cpp
# src/network/network_admin.h
# src/network/network_chat_gui.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_func.h
# src/network/network_internal.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf.cpp
# src/newgrf_station.cpp
# src/order_gui.cpp
# src/rail_cmd.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/station_cmd.cpp
# src/stdafx.h
# src/table/currency_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/terraform_cmd.cpp
# src/timetable_gui.cpp
# src/train_cmd.cpp
# src/tree_cmd.cpp
# src/water_cmd.cpp
3 years ago
Jonathan G Rennison
0b0d154788
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/ci-build.yml
# src/lang/german.txt
# src/lang/romanian.txt
# src/lang/slovak.txt
# src/lang/turkish.txt
# src/network/core/address.cpp
# src/network/core/tcp.h
# src/network/core/udp.cpp
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/network/network_udp.cpp
# src/openttd.cpp
# src/saveload/newgrf_sl.cpp
# src/tree_cmd.cpp
# src/video/video_driver.hpp
# src/window.cpp
# src/window_gui.h
3 years ago
Jonathan G Rennison
da1ac73c02
Merge commit 'f1dfa661a1898cde06a38ab4cb230c95912b245b' into jgrpp-beta
...
# Conflicts:
# src/lang/estonian.txt
# src/lang/hungarian.txt
# src/network/core/game_info.cpp
# src/network/core/game_info.h
# src/network/core/packet.h
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/openttd.cpp
# src/string_func.h
3 years ago
Jonathan G Rennison
2bd535e834
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/engine_base.h
# src/gfxinit.cpp
# src/graph_gui.cpp
# src/lang/brazilian_portuguese.txt
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/korean.txt
# src/lang/norwegian_bokmal.txt
# src/lang/portuguese.txt
# src/lang/russian.txt
# src/lang/spanish.txt
# src/lang/spanish_MX.txt
# src/network/core/address.cpp
# src/network/core/game_info.h
# src/network/core/os_abstraction.h
# src/network/core/udp.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_internal.h
# src/newgrf_engine.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/string_func.h
# src/town_gui.cpp
# src/video/video_driver.cpp
# src/widget_type.h
3 years ago
Rubidium
92559e6f3a
Fix #9388 : thread unsafe use of NetworkAdminConsole/IConsolePrint
3 years ago
Jonathan G Rennison
58a290d8e9
Include version label in output of -q switch
3 years ago
Jonathan G Rennison
b2ef6c0de8
Add implementation of multi-aspect signalling and GRF support
...
Requires realistic braking
See: #247
3 years ago
Patric Stout
579f393374
Add: open Online Players GUI on starting/joining a server ( #9479 )
3 years ago
Rubidium
1c8f4bfaef
Fix #9388 : thread unsafe use of NetworkAdminConsole/IConsolePrint
...
(cherry picked from commit d7a0e80fc18b689455eaca09883fccbcc722d7e3)
# Conflicts:
# src/debug.cpp
# src/debug.h
# src/table/settings/gui_settings.ini
See: https://github.com/OpenTTD/OpenTTD/pull/9456
3 years ago
Jonathan G Rennison
8c9dd75b5b
Fix #301 : Network server local company change on load did not update network state
3 years ago
Jonathan G Rennison
4174fe727c
Add NewGRF feature: Extra station name strings
...
These are used when all the default names have been used up,
instead of "Town Station #NNN".
3 years ago
Loïc Guilloux
460991ecf4
Feature: Persistant rotation of numbered auto/netsave after restart ( #9397 )
...
It was always starting from 0 on openttd restart.
Now the most recent auto/netsave number will be used as a base to generate the next filename.
3 years ago
glx22
afea5e85ae
Fix 433f74e: GetString() requires a language pack
3 years ago
Jonathan G Rennison
f9f83df92d
Change dedicated debug level to net=3
3 years ago
Stephan
a70aa5df49
Add #9188 : netsave now keeps multiple version around, similar to autosave ( #9395 )
3 years ago
Jonathan G Rennison
f90d7662d8
Increase verbosity of station docking mismatch check in CheckCaches
3 years ago
Jonathan G Rennison
1819a4218b
Clear signal speed restriction at game shutdown
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
rubidium42
e588923bff
Codechange: add std::string accepting SetDParamStr to ErrorMessageData
3 years ago
Jonathan G Rennison
e5696e6b5a
Fix owner legend colours when gui.starting_colour setting used
3 years ago
Patric Stout
ed3946e295
Add: '-X' option to ignore global folders in the search path ( #9341 )
...
This is extreme useful for automated testing. Without this, OpenTTD
will always look in your personal-dir (like ~/.local/share/openttd
or %USER%\Documents\OpenTTD). For most users this is exactly what
we want, that there is a shared place for all their files.
However, for automated testing this is rather annoying, as your
local development files influence the automated test. As such,
'-X' counters this, and only gives the local folders. This is
especially useful in combination with '-x' and '-c'.
3 years ago
Rubidium
e227bbaff0
Cleanup: remove the old FIO slot functions
...
(cherry picked from commit fa6abe1646
)
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
44ca7d9377
Change: Use gender-neutral pronouns
3 years ago
rubidium42
297d6e20bf
Codechange: [Network] Pass passwords as std::string to the network code
3 years ago
William Davis
879de9781b
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
...
(cherry picked from commit 881e1da51d
)
3 years ago
rubidium42
c73d64adf9
Codechange: move passwords in settings to std::string
3 years ago
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
3 years ago
Patric Stout
b136e65cf9
Change: reworked the debug levels for network facility ( #9251 )
...
It now follows very simple rules:
0 - Fatal, user should know about this
1 - Error, but we are recovering
2 - Warning, wrong but okay if you don't know
3 - Info, information you might care about
4 -
5 - Debug #1 - High level debug messages
6 - Debug #2 - Low level debug messages
7 - Trace information
3 years ago
Rubidium
fa6abe1646
Cleanup: remove the old FIO slot functions
3 years ago
William Davis
881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
3 years ago
rubidium42
3d91eee919
Codechange: [Network] Move connection string parsing away from C-strings
3 years ago
glx22
dfe616bef4
Codechange: Replace window related FOR_ALL with range-based for loops
...
(cherry picked from commit 14e92bd8e2
)
3 years ago
rubidium42
e7581fd42d
Change: [Network] Update server's NetworkServerGameInfo only when needed
...
Split the updating in a "static" version that only needs to be called when a new map is loaded or some settings are changed, and a "dynamic" version that updates everything that changes regularly such as the current game date or the number of spectators.
3 years ago
Jonathan G Rennison
a9515456cb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/network/core/os_abstraction.h
# src/network/core/tcp_content.h
# src/network/core/udp.cpp
# src/table/currency_settings.ini
# src/table/settings.h.preamble
3 years ago
rubidium42
05394d5216
Fix #6598 : Prevent invalid memory accesses when abandoning a join from within a network game
...
One could join a network game from within an already running network game. This would call a NetworkDisconnect, but keeps the UI alive. If, during that process the join is aborted, e.g. by cancelling on a password dialog, you would still be in your network game but also get shown the server list.
Solve all the underlying problems by falling back to the main UI when (re)connecting to a(nother) server.
3 years ago
rubidium42
a61696d6c5
Change: [Network] Encapsulate logic about the connection string to the network code ( #23 )
3 years ago
Patric Stout
be37a2cab8
Codechange: use NetworkAddress instead of two host/port variables where possible
...
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
3 years ago
rubidium42
cbad518bf3
Codechange: [Network] Do not leak os_abstraction.h via network_func
3 years ago
Jonathan G Rennison
ba418f9d0d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/simplified_chinese.txt
# src/network/core/tcp_content.cpp
# src/network/core/udp.cpp
# src/network/network_server.cpp
# src/saveload/linkgraph_sl.cpp
# src/table/gameopt_settings.ini
3 years ago
Patric Stout
31897eaa7d
Codechange: split ParseConnectionString into two functions
...
One also looks for a company, the other doesn't. There were more
uses of the latter than the first, leaving very weird code all
over the place.
3 years ago
Patric Stout
f4bd3fff5e
Remove: "map_name" from server announcements / listing
...
The idea back in the days was nice, but it never resulted in
anything useful. Most servers either read "(loaded game)" or
"Random Map", neither being useful. It was meant for heightmaps,
so you could find a server that was using a specific one .. but
there are many things wrong with that idea. Mostly, servers tend
to save and load savegames from time to time, after which the
original heightmap used was lost.
All in all, removing map_name all together is just better.
3 years ago
Jonathan G Rennison
b514d29db1
Replace TrainCache::cached_tilt with a flags field
3 years ago
Jonathan G Rennison
e623560120
Fix 4c2e42fa: Wrong town caches when loading pre more-houses savegame
3 years ago
Jonathan G Rennison
253d54ce05
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/french.txt
# src/network/network_udp.cpp
3 years ago
rubidium42
c4bccd4f70
Fix #8874 : show a warning when a NewGRF scan is requested multiple times from the console ( #9022 )
3 years ago
Jonathan G Rennison
272e583478
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/korean.txt
# src/settings.cpp
3 years ago
rubidium42
df045b92ea
Fix #9008 : Validate starting year given on the command line. ( #9014 )
...
An invalid starting year causes all sorts of weird behaviour and crashes in map generation.
Now just set the appropriate setting via IConsoleSetSetting so the validation
and, if needed, clamping is performed on the starting year value.
4 years ago
Jonathan G Rennison
d7b536ca78
Fix e094b7f1: Wrong include path
4 years ago
Jonathan G Rennison
63ddf7f587
Crashlog: Update thread/lock handling to match GameLoop changes
4 years ago
Jonathan G Rennison
e094b7f1d6
Partially fix thread safety issues around _cur_palette
...
Replaces: 4c59dfb6
See also: https://github.com/OpenTTD/OpenTTD/issues/8712
4 years ago
Jonathan G Rennison
2a13c8623c
Revert: 4c59dfb6
, move DoPaletteAnimations back into GameLoop
...
Race fix to follow
4 years ago
Jonathan G Rennison
5e14b54a0c
Merge branch 'master' into jgrpp
4 years ago
Jonathan G Rennison
26a123b708
Realistic braking: Cache offset of centre of mass of train
4 years ago
Jonathan G Rennison
f53697ce76
Windows: Call SetThreadStackGuarantee for all threads, not just main thread
4 years ago
Jonathan G Rennison
4361a6dbf4
Avoid undefined behaviour const_casting std::string c_str()
...
Use non-const data() instead
See: #224
4 years ago
Patric Stout
5426cb3baf
Fix: abort GRFFileScanner on exiting the game as soon as possible
...
This prevents the window from "freezing" when you close it during
the scanning of NewGRFs, as it first would continue the action.
4 years ago
Patric Stout
b349ef6e71
Fix: don't update framerates when a modal window is open
...
Otherwise the numbers are all over the place when a modal window
just closed.
4 years ago
Patric Stout
970fedd78c
Add: make modal windows update more smooth
...
Basically, modal windows had their own thread-locking for what
drawing was possible. This is a bit nonsense now we have a
game-thread. And it makes much more sense to do things like
NewGRFScan and GenerateWorld in the game-thread, and not in a
thread next to the game-thread.
This commit changes that: it removes the threads for NewGRFScan
and GenerateWorld, and just runs the code in the game-thread.
On regular intervals it allows the draw-thread to do a tick,
which gives a much smoother look and feel.
It does slow down NewGRFScan and GenerateWorld ever so slightly
as it spends more time on drawing. But the slowdown is not
measureable on my machines (with 700+ NewGRFs / 4kx4k map and
a Debug build).
Running without a game-thread means NewGRFScan and GenerateWorld
are now blocking.
4 years ago
Patric Stout
47e11fa3f2
Codechange: only run InteractiveRandom() from the draw-thread ( #8831 )
...
Otherwise both the draw-thread and game-thread can do it both
at the same time, which gives rather unwanted side-effects.
Calling it from the draw-thread alone is sufficient, as we just
want to create some unpredictable randomness for the player. The
draw-thread is a lot more active (normally) than the game-thread,
so it is the best place of the two to do this.
Additionally, InteractiveRandom() mostly has to do with visuals
that are client-side-only, so more related to drawing than to
game.
4 years ago
Jonathan G Rennison
edeced8fce
Zstd: Enable zstd for autosaves
...
See also: https://github.com/OpenTTD/OpenTTD/pull/8773
4 years ago
Jonathan G Rennison
0a31a3b923
Fix for crash when exiting whilst NewGRF scan still in progress
...
See: https://github.com/OpenTTD/OpenTTD/issues/8760
4 years ago
Jonathan G Rennison
e95216b59d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/core/geometry_func.cpp
# src/date.cpp
# src/genworld_gui.cpp
# src/gfx.cpp
# src/object_gui.cpp
# src/openttd.cpp
# src/settings_type.h
# src/video/allegro_v.cpp
# src/video/dedicated_v.cpp
# src/video/null_v.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
4 years ago