Andreas Schmitt
5e3a244198
Add topography and industries screenshot types
2021-06-11 20:14:56 +02:00
Patric Stout
849a10520c
Change: allow pause/unpause console command in single player too ( #9342 )
2021-06-10 20:11:50 +02:00
rubidium42
e3717ae903
Codechange: [ContentInfo] Use std::string instead of string buffers
2021-06-10 20:09:44 +02:00
Rubidium
2606f5409a
Fix: leaking file descriptors
...
(cherry picked from commit 495d73a67f
)
2021-05-30 07:52:55 +01:00
rubidium42
fd95736bac
Codechange: [Network] Use std::string for server side logic of kicking and banning clients
2021-05-30 00:01:49 +02:00
rubidium42
8b9f1147df
Codechange: [Network] Let server changing a client name use std::string
2021-05-30 00:01:49 +02:00
rubidium42
aa5a8fe28a
Codechange: use thread safe time functions
...
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
2021-05-14 23:22:29 +02:00
rubidium42
297d6e20bf
Codechange: [Network] Pass passwords as std::string to the network code
2021-05-14 23:22:04 +02:00
rubidium42
98283116fa
Codechange: [Network] Make company state password std::string
2021-05-14 23:22:04 +02:00
William Davis
879de9781b
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
...
(cherry picked from commit 881e1da51d
)
2021-05-14 18:15:00 +01:00
rubidium42
16437b7c0d
Codechange: move client name in settings to std::string
2021-05-13 23:13:17 +02:00
rubidium42
cc6c078dec
Codechange: move hostnames in settings to std::string
2021-05-13 23:13:17 +02:00
Rubidium
495d73a67f
Fix: leaking file descriptors
2021-05-10 16:03:31 +02:00
William Davis
881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
2021-05-08 11:02:30 +01:00
Michael Lutz
2e6cadb005
Fix #9147 : Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread.
...
(cherry picked from commit 1f159f79de
)
2021-05-06 20:52:00 +01:00
PeterN
9d72eb02f5
Cleanup: Remove old FiosList helper methods. ( #9139 )
...
(cherry-picked from commit f018471b36
)
2021-05-06 19:35:57 +01:00
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
2021-05-03 21:59:49 +01:00
Michael Lutz
1f159f79de
Fix #9147 : Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread.
2021-05-02 17:57:24 +02:00
rubidium42
39c51c35f4
Fix #6598 : Do not disconnect before company number validation
...
NetworkClientConnectGame already does a NetworkDisconnect, so no reason to do it here
2021-05-01 18:30:08 +02:00
rubidium42
3bd416bfdb
Change: [Console] Show help when passing invalid company number
2021-05-01 18:30:08 +02:00
PeterN
f018471b36
Cleanup: Remove old FiosList helper methods. ( #9139 )
2021-04-29 22:46:42 +01:00
rubidium42
a61696d6c5
Change: [Network] Encapsulate logic about the connection string to the network code ( #23 )
2021-04-29 20:12:11 +02:00
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.
2021-04-29 20:12:11 +02:00
Patric Stout
cb2ef1ea4b
Codechange: move all NetworkGameInfo related functions to a single file
...
It currently was a bit scattered over the place. Part of
NetworkGameInfo is also the GRF Identifiers that goes with it.
2021-04-27 20:18:53 +02:00
rubidium42
cbad518bf3
Codechange: [Network] Do not leak os_abstraction.h via network_func
2021-04-27 18:17:34 +01:00
Jonathan G Rennison
253772e9af
Merge branch 'master' into jgrpp
...
# Conflicts:
# CMakeLists.txt
# COMPILING.md
# src/console.cpp
# src/console_cmds.cpp
# src/console_internal.h
# src/rev.cpp.in
2021-04-25 02:14:58 +01:00
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
2021-04-25 01:23:52 +01:00
Loïc Guilloux
888389c28d
Codechange: Use std::string in console commands/aliases registration, and std::map instead our sorted linked list ( #9057 )
...
* Codechange: Use std::string in console commands and aliases registration
* Codechange: Use std::map to register console commands
* Codechange: Use std::map to register console aliases
* Cleanup: Remove now unused function
2021-04-24 15:19:57 +02:00
rubidium42
2e0f3799a8
Change: [Network] Prevent invalid client names being sent to the server when changing it using the console/settings
2021-04-24 08:02:54 +02:00
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.
2021-04-20 17:34:04 +02:00
Jonathan G Rennison
6a62b94263
Add NewGRF railtype flag to disable realistic braking for vehs of that type
...
See: #242
2021-04-15 20:56:45 +01:00
Jonathan G Rennison
0422e2fe1e
Add misc debug flag for water flooding states
2021-04-12 23:59:21 +01:00
Jonathan G Rennison
253d54ce05
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/french.txt
# src/network/network_udp.cpp
2021-04-12 22:59:30 +01:00
rubidium42
c4bccd4f70
Fix #8874 : show a warning when a NewGRF scan is requested multiple times from the console ( #9022 )
2021-04-12 20:53:04 +02:00
Jonathan G Rennison
8e92a6844f
Add a "misc_debug" console command
...
Add a flag to open veh window when TrainBrakesOverheatedBreakdown called
2021-04-12 00:18:13 +01:00
Jonathan G Rennison
5e14b54a0c
Merge branch 'master' into jgrpp
2021-04-05 17:51:45 +01:00
Patric Stout
5056e963ba
Fix #8851 : don't allow infinite "exec" depth in script, but limit to 10 deep
...
This means if you execute a script from a script from a script, ..
for more than 10 times, it bails out now. This should be sufficient
for even the most complex scripts.
2021-03-13 10:01:05 +01:00
Patric Stout
8230cd009d
Fix: calling "exec" from script never returned
...
Example:
exec other.script
echo hello
The "echo" was never executed.
2021-03-13 10:01:05 +01:00
Jonathan G Rennison
4361a6dbf4
Avoid undefined behaviour const_casting std::string c_str()
...
Use non-const data() instead
See: #224
2021-03-11 01:33:06 +00:00
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.
2021-03-10 13:41:18 +01:00
Jonathan G Rennison
9bf6d1407f
Add screenshot type: whole map at current zoom level
2021-03-06 02:33:02 +00:00
Jonathan G Rennison
d6e2b32132
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/screenshot.h
2021-03-06 01:36:41 +00:00
Patric Stout
06a3c0cb26
Fix dddf885f
: use IConsoleError to produce console errors
2021-03-04 22:23:05 +01:00
Patric Stout
8c6b5e52fd
Add: allow making heightmap screenshot via console
2021-03-04 22:23:05 +01:00
Patric Stout
ac5e77ea3b
Feature: allow custom width/height of screenshot via console
...
Reworked how the screenshot command works while keeping it backwards
compatible. It can now more freely understand arguments, and has
the ability to make SC_DEFAULTZOOM screenshots.
2021-03-04 22:23:05 +01:00
Jonathan G Rennison
b931df9934
Add debug console command to delete a vehicle ID
2021-02-27 20:36:47 +00:00
Jonathan G Rennison
0df3e785cb
Debug: Add console command to dump tile info
2021-02-21 20:59:25 +00:00
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
2021-02-19 15:38:34 +00:00
Jonathan G Rennison
667ca4d0a7
Add help info for gfx_debug and viewport_debug console commands
2021-02-16 11:24:58 +00:00
SamuXarick
a4035af337
Codechange: Apply coding style ( #8640 )
...
* Fix: Missing or needed spaces
* Codechange: Remove space
* Codechange: Remove space
* Codechange: More missing spaces
* Codechange: Missing spaces
* Codechange: Remove space
* Codechange: Remove space
2021-02-05 11:00:36 +01:00