Commit Graph

659 Commits (f034714559c65829dd159c3150e681defdc4b26b)

Author SHA1 Message Date
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
Patric Stout d0eb3e4bc4
Fix: [Network] mark server as offline when no longer reachable (#9244) 3 years ago
rubidium42 0968d009c8 Fix #9243: [Network] For a dedicated server use a fallback client and server name
Also warn when the client or server name has not been set and provide pointers on how to set them
3 years ago
Patric Stout 9e7e87ce3e
Fix: [Network] don't rebuild the host-list during iterating the list (#9240)
Additionally, only rebuild it when we added a new manual server,
as otherwise it is a noop anyway.
3 years ago
Patric Stout 36e22f3a7b
Fix: [Network] clients leaving because of broken connections was not broadcasted (#9238)
The code mixed up "client has quit but we already told everyone"
with "client lost connection, handle this".

Split up those two signals:
- CLIENT_QUIT means we told everyone and the connection is now dead
- CONNECTION_LIST means we should tell everyone we lost a client
3 years ago
Patric Stout 583011bca0
Fix: lobby window doesn't close if no connection could be established (#9223) 3 years ago
Patric Stout b9ab3bd6b3 Fix: only query a manually added server if it isn't there yet
But always mark it as manually, no matter if it was there or not.
3 years ago
Patric Stout fc91f1d1b2 Fix: don't do a network disconnect between two queries
This meant that on opening the Multiplayer window, if you had more
than one server configured, it would one by one cancel all pending
queries and send a new. Result: only the last server was updated.
3 years ago
Patric Stout 664a8c3e85 Codechange: move connection_string to private for TCPConnecter
The most common case never needs access to it anymore. Make the
one exception to this explicit. This means the fact that we
store it is now an implementation detail.
3 years ago
rubidium42 e2774354b4
Codechange: [Network] Change ChatMessage's message to std::string and simplify some code 3 years ago
Patric Stout f7e390bdc0
Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199)
Hostnames like "content.openttd.org" resolve into multiple IPv4 and IPv6.
It is possible that either of the IPs is not working, either due to
a poorly configured OS (having IPv6 but no valid route), broken network
paths, or a service that is temporary unavailable.

Instead of trying the IPs one by one, waiting for a 3s timeout between
each, be a bit more like browsers, and stack attempts on top of each
other with slight delays. This is called Happy Eyebells.

Initially, try the first IPv6 address. If within 250ms there is no
connection yet, try the first IPv4 address. 250ms later, try the
second IPv6 address, etc, till all addresses are tried.

If any connection is created, abort all the other (pending) connections
and use the one that is created. If all fail 3s after the last connect(),
trigger a timeout for all.
3 years ago
rubidium42 59a817f21f Fix: [Network] Reading beyond the length of the server's ID when hashing password
Under normal circumstances the server's ID is 32 characters excluding '\0', however this can be changed at the server. This ID is sent to the server for company name hashing. The client reads it into a statically allocated buffer of 33 bytes, but fills only the bytes it received from the server. However, the hash assumes all 33 bytes are set, thus potentially reading uninitialized data, or a part of the server ID of a previous game in the hashing routine.
It is still reading from memory assigned to the server ID, so nothing bad happens, except that company passwords might not work correctly.

(cherry picked from commit 56aa6d0edd)
3 years ago
rubidium42 f1dfa661a1 Codechange: [Network] Use std::string for NetworkGameInfo 3 years ago
rubidium42 3d91eee919 Codechange: [Network] Move connection string parsing away from C-strings 3 years ago
Patric Stout f94fb93779
Codechange: use connection_string in favour of NetworkAddress (#9197)
We now resolve the connection_string to a NetworkAddress in a much
later state. This means there are fewer places constructing a NetworkAddress.

The main benefit of this is in later PRs that introduce different types
of NetworkAddresses. Storing this in things like NetworkGameList is
rather complex, especially as NetworkAddress has to be mutable at all
times.

Additionally, the NetworkAddress is a complex object to store simple
information: how to connect to this server.
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 56aa6d0edd Fix: [Network] Reading beyond the length of the server's ID when hashing password
Under normal circumstances the server's ID is 32 characters excluding '\0', however this can be changed at the server. This ID is sent to the server for company name hashing. The client reads it into a statically allocated buffer of 33 bytes, but fills only the bytes it received from the server. However, the hash assumes all 33 bytes are set, thus potentially reading uninitialized data, or a part of the server ID of a previous game in the hashing routine.
It is still reading from memory assigned to the server ID, so nothing bad happens, except that company passwords might not work correctly.
3 years ago
rubidium42 0eb17a70af Codechange: rename NetworkError to ShowNetworkError 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 83985fe26f Codechange: Move join information into a single structure 3 years ago
rubidium42 3bd416bfdb Change: [Console] Show help when passing invalid company number 3 years ago
Patric Stout 69118d063f
Change: use TCP for everything except for master-server and initial server scan (#9130)
This means that pressing Refresh button and adding servers manually
now uses TCP.

The master-server and initial scan are still UDP as they will be
replaced by Game Coordinator; no need to change this now.

If we query a server that is too old, show a proper warning to the
user informing him the server is too old.
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
Patric Stout 31f1db2d3a Change: no longer use UDP when entering the lobby of a server
The lobby of a server requested some parts via UDP and some via
TCP. This is strictly seen fine, but for future extensions it
is a lot easier if just one protocol is used.
3 years ago
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.
3 years ago
rubidium42 cbad518bf3 Codechange: [Network] Do not leak os_abstraction.h via network_func 3 years ago
Jonathan G Rennison 8eb27e1ac7 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/lang/japanese.txt
#	src/network/core/config.h
#	src/network/core/packet.cpp
#	src/network/core/tcp.cpp
#	src/network/network_content.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui_base.h
3 years ago
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
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 5266359424 Feature: rework in-game Online Players GUI
The GUI now more clearly shows some basic information about the
server you joined, your client name (and the ability to change it),
and what players are in which company.

It also contains useful buttons to press to join companies, chat
with other people, and for admins to kick/ban people.

Additionally, renamed "advertised" to "visibility"; this has to
do with future additions, but also because it is more clear in
wording.
3 years ago
rubidium42 e1cebe0ea0 Add: [Network] Validate the client name server side, so no clients with invalid names can actually join 3 years ago
rubidium42 bfb0ab3e2f Feature: [Network] Ensure players fill in a name instead of defaulting to "Player" 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
Jonathan G Rennison 253d54ce05 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/french.txt
#	src/network/network_udp.cpp
3 years ago
Rubidium ca6b9ad8b0 Change: move some things only relevant to UDP from network.cpp to network_udp.cpp 3 years ago
Jonathan G Rennison 425b725eab Include last sync frame in desync crash log 3 years ago
Jonathan G Rennison 4361a6dbf4 Avoid undefined behaviour const_casting std::string c_str()
Use non-const data() instead

See: #224
3 years ago
Jonathan G Rennison 082d9021d0 Only use more specific texts for money sending where available 3 years ago
Jonathan G Rennison f9956d88c3 Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/company_gui.cpp
#	src/lang/arabic_egypt.txt
#	src/lang/czech.txt
#	src/lang/esperanto.txt
#	src/lang/faroese.txt
#	src/lang/finnish.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/lang/latvian.txt
#	src/lang/malay.txt
#	src/lang/polish.txt
#	src/lang/spanish.txt
#	src/lang/spanish_MX.txt
#	src/lang/unfinished/urdu.txt
#	src/main_gui.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/road_cmd.cpp
#	src/settings_type.h
#	src/station_cmd.cpp
#	src/table/settings.ini
3 years ago
Jonathan G Rennison 6c3e5642f8 Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/crashlog.cpp
#	src/fileio.cpp
#	src/fileio_func.h
#	src/fios_gui.cpp
#	src/ini_load.cpp
#	src/ini_type.h
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/network/network_client.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/os/windows/win32.cpp
#	src/road_cmd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings.cpp
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/table/settings.ini
#	src/tree_cmd.cpp
#	src/tree_gui.cpp
#	src/vehicle_base.h
#	src/video/cocoa/cocoa_v.mm
#	src/video/cocoa/event.mm
#	src/video/cocoa/wnd_quartz.mm
#	src/viewport.cpp
#	src/widgets/tree_widget.h
3 years ago
Jonathan G Rennison 43980639de Merge branch 'master' into jgrpp
# Conflicts:
#	.gitignore
#	CMakeLists.txt
#	src/3rdparty/optional/optional.hpp
#	src/group_cmd.cpp
#	src/industry_cmd.cpp
#	src/misc_gui.cpp
#	src/video/sdl2_v.cpp
3 years ago
Patric Stout 62cdadb582 Change: move "give money" from client-list to company window
This is a much better location for this button, as you send
money from one company to another company, not from player
to player.

This is based on work done by JGRPP in:
f820543391
and surrounding commits, which took the work from estys:
https://www.tt-forums.net/viewtopic.php?p=1183311#p1183311

We did modify it to fix several bugs and clean up the code while
here anyway.

The callback was removed, as it meant a modified client could
prevent anyone from seeing money was transfered. The message
is now generated in the command itself, making that impossible.
4 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 4 years ago
Jonathan G Rennison 0c5dc5d41e Change: [Linkgraph] Pause the game when linkgraph jobs lag (#6470)
Check if the job is still running two date fract ticks before it is due
to join, and if so pause the game until its done.
When loading a game, check if the game would block immediately due to
a job which is scheduled to be joined within two date fract ticks,
and if so pause the game until its done.
This avoids the main thread being blocked on a thread join, which appears
to the user as if the game is unresponsive, as the UI does not repaint
and cannot be interacted with.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
4 years ago
Patric Stout d15dc9f40f Add: support for emscripten (play-OpenTTD-in-the-browser)
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.

Co-authored-by: milek7 <me@milek7.pl>
4 years ago
Jonathan G Rennison bbbda0739b Add third DoCommand parameter p3 4 years ago
Jonathan G Rennison 4763f441f6 On load, use previous local company or first usable company
Instead of always using the first company slot
4 years ago
Jonathan G Rennison ef7e658dee Network: Remove static buffer form of NetworkAddress::GetAddressAsString
This is used in multiple threads concurrently
4 years ago
Jonathan G Rennison 8fb0b638fa Merge branch 'master' into jgrpp
# Conflicts:
#	src/network/network.cpp
4 years ago
Quipyowert2 d1b7eb2de1 Codechange: Limit field width to avoid sscanf crash 4 years ago
Jonathan G Rennison babe98cdb1 Merge branch 'master' into jgrpp
# Conflicts:
#	src/network/network_server.h
#	src/pathfinder/yapf/yapf_road.cpp
#	src/viewport.cpp
4 years ago
Bjarni Thor 5880f1479f Feature #7756: Allow server to supply a reason to kicked/banned clients
This commit adds the missing feature of allowing the server owner to
    provide a reason for kicking/banning a client, which the client sees in
    a pop-up window after being kicked. The implementation extends the
    network protocol by adding a new network action called
    NETWORK_ACTION_KICKED that is capable of having an error string, unlike
    the other network error packages.  Additionally, the kick function
    broadcasts a message to all clients about the kicked client and the
    reason for the kick.
4 years ago
Jonathan G Rennison 7960db35f2 Merge branch 'master' into jgrpp
# Conflicts:
#	config.lib
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj
#	projects/openttd_vs142.vcxproj.filters
#	src/aircraft_cmd.cpp
#	src/base_station_base.h
#	src/core/pool_type.hpp
#	src/disaster_vehicle.cpp
#	src/economy.cpp
#	src/engine.cpp
#	src/group.h
#	src/group_cmd.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/network_command.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/saveload/town_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehiclelist.cpp
#	src/window_type.h
5 years ago
glx e3c75a30ba Fix: unused variable warnings 5 years ago
glx 41232f18c1 Codechange: Replace network related FOR_ALL with range-based for loops 5 years ago
Jonathan G Rennison cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison ec892879f4 Add passworded mechanism to change server game settings from client 5 years ago
Jonathan G Rennison a1d36b02f0 Network: Add state checksum which is check in network sync 5 years ago
Jonathan G Rennison c941d2d2a6 Desync: Change sync event logging to desync debug level 2 5 years ago
Jonathan G Rennison 002f5ca70e Adjust desync log format and add company events to log 5 years ago
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Jonathan G Rennison f5747bf753 Merge branch 'master' into jgrpp
# Conflicts:
#	src/genworld_gui.cpp
#	src/group_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 5 years ago
Jonathan G Rennison ba34ec7ade Merge branch 'master' into jgrpp
Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
peter1138 07de9d6c3f Codechange: Use override keyword in networking classes. 5 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
Niels Martin Hansen 830ed6be61 Fix: Do not mangle tagged revision strings for network revision strings 5 years ago
Niels Martin Hansen 5f8354f358 Change: Make a shortened network revision string for use in server queries 5 years ago
Jonathan G Rennison 940314a3c7 Use std::string for CommandContainer text instead of giant static buffer
Use move semantics for CommandContainer instance where feasible
6 years ago
Jonathan G Rennison 6342099c4d Allow 256 NewGRFs in multiplayer
Add extended network format for server info
Add general UDP packet fragmentation system
Fix map dimensions >= 64k
Increase length of server revision string
Maintain backwards compatibility with trunk for advertisement/server listing
6 years ago
Jonathan G Rennison 54494a0a7c Merge branch 'send_money_company' into jgrpp 7 years ago
Jonathan G Rennison 9c74da46b1 Change send money to company messages to be broadcasts.
Adjust text formatting depending on whether current client is
the source, destination or neither.
7 years ago
Jonathan G Rennison 3001595916 Change chat arbitrary data field from an int64 to a struct. 7 years ago
Jonathan G Rennison 8e6569c11f Include tick skip counter in all desync debug output.
Change message format to make field identification easier.
Update desync message reader to support tick skip counter.
8 years ago
Jonathan G Rennison 66cd454c37 Merge branch 'day_length-sx' into jgrpp 9 years ago
Jonathan G Rennison f03cd98d04 Check/print tick skip counter in desync and random logging. 9 years ago
Jonathan G Rennison 531956bb4d Merge branch 'house_placing' into jgrpp 9 years ago
rubidium e8788019fa (svn r27400) -Fix [FS#6368] (r26449): when a dedicated server was paused with no clients the tick length was increased significantly, making any assumptions about the tick length used further down in the code are not true anymore. One of such assumptions was that one should readvertise every 15 minutes worth of original ticks, but due to the lengthening this timeframe would be more like 45-60 minutes. Now we'll take the operating system's millisecond counter instead 9 years ago
rubidium ff5c05c1b4 (svn r27400) -Fix [FS#6368] (r26449): when a dedicated server was paused with no clients the tick length was increased significantly, making any assumptions about the tick length used further down in the code are not true anymore. One of such assumptions was that one should readvertise every 15 minutes worth of original ticks, but due to the lengthening this timeframe would be more like 45-60 minutes. Now we'll take the operating system's millisecond counter instead 9 years ago
Jonathan G Rennison c6854afcef Pause the game instead of blocking when link graph jobs lag.
Check if the job is still running one date fract tick before it
is due to join and if so pause the game until its done.
This avoids the main thread being blocked on a thread join.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
9 years ago
frosch e00f4cac59 (svn r26788) -Add: Desync replay option to skip/replay failed commands 10 years ago
frosch e2f5081f40 (svn r26788) -Add: Desync replay option to skip/replay failed commands 10 years ago
frosch db45d979db (svn r26786) -Fix: Also replay failed commands. 10 years ago
frosch 937265d6d6 (svn r26786) -Fix: Also replay failed commands. 10 years ago
rubidium 7db8be4a1e (svn r26577) -Fix [FS#6001]: [Network] Client of non-dedicated server was not correctly put into the first company for all state variables 10 years ago
rubidium e64249446d (svn r26577) -Fix [FS#6001]: [Network] Client of non-dedicated server was not correctly put into the first company for all state variables 10 years ago
rubidium 034735a54c (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 6ecc602050 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 10 years ago
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 10 years ago
rubidium 2be4215f43 (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
planetmaker 1d8c673587 (svn r26449) -Add: Allow more sound sleep for dedicated servers when there's nothing to do and nobody paying attention 10 years ago
planetmaker 3e9c10f9e1 (svn r26449) -Add: Allow more sound sleep for dedicated servers when there's nothing to do and nobody paying attention 10 years ago
rubidium 7457abb067 (svn r25997) -Codechange: make it slightly more clear what ports are coming from where in the debug output when listening 11 years ago
rubidium c40f281545 (svn r25997) -Codechange: make it slightly more clear what ports are coming from where in the debug output when listening 11 years ago
planetmaker f00d9976f9 (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
truebrain 1b34577941 (svn r23780) -Fix [FS#4963] (r23764): also name the two new errors server-side. As extra, split up one of the errors in 3 errors, to be more specific what goes wrong. As cherry on top, make sure on all sides we can never again forget to add such entries on both sides, by introducing an assert_compile() 13 years ago
truebrain 6c7c02eb14 (svn r23780) -Fix [FS#4963] (r23764): also name the two new errors server-side. As extra, split up one of the errors in 3 errors, to be more specific what goes wrong. As cherry on top, make sure on all sides we can never again forget to add such entries on both sides, by introducing an assert_compile() 13 years ago
rubidium f8faaebaf0 (svn r23751) -Codechange: rename NetworkUDPGameLoop to a more descriptive name, and move the UDP specific bits to network_udp 13 years ago
rubidium 531e501b5a (svn r23751) -Codechange: rename NetworkUDPGameLoop to a more descriptive name, and move the UDP specific bits to network_udp 13 years ago
rubidium d5eeab43b7 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
truebrain 3a799f1145 (svn r23618) -Add: ScriptGame::Pause, ScriptGame::Unpause, and ScriptGame::GetLandscape (GameScript only) 13 years ago
truebrain 55de5d336c (svn r23618) -Add: ScriptGame::Pause, ScriptGame::Unpause, and ScriptGame::GetLandscape (GameScript only) 13 years ago
truebrain c74ccfff1b (svn r23601) -Fix: fix the conflict in window number 13 years ago
truebrain 561b25d031 (svn r23601) -Fix: fix the conflict in window number 13 years ago
rubidium 56f37d9386 (svn r23476) -Codechange: use the error queue to replace switch mode error strings, again making it possible to return multiple errors 13 years ago
rubidium 2bf0fc3c5c (svn r23476) -Codechange: use the error queue to replace switch mode error strings, again making it possible to return multiple errors 13 years ago
rubidium fc5af08ef8 (svn r22934) -Fix [FS#4771]: prevent authentication bypass for the admin port when a new game is started 13 years ago
rubidium 998bbde49e (svn r22934) -Fix [FS#4771]: prevent authentication bypass for the admin port when a new game is started 13 years ago
frosch 30c413c399 (svn r22738) -Fix [FS#4722] (r21854): Setting company passwords via the GUI on servers (including starting a company with the default password) failed, so no client could join. 13 years ago
frosch 6bb33acc0d (svn r22738) -Fix [FS#4722] (r21854): Setting company passwords via the GUI on servers (including starting a company with the default password) failed, so no client could join. 13 years ago
rubidium 838a7040f3 (svn r22696) -Fix: don't requery the servers when the server list window isn't opened 13 years ago
rubidium 36e887591b (svn r22696) -Fix: don't requery the servers when the server list window isn't opened 13 years ago
rubidium 61a3963361 (svn r22424) -Document: some more bits 13 years ago
rubidium c4aa943aaa (svn r22424) -Document: some more bits 13 years ago
rubidium 1ef751e855 (svn r22423) -Document: some network stuff 13 years ago
rubidium 944a5cb7aa (svn r22423) -Document: some network stuff 13 years ago
rubidium 8430fadcbb (svn r22368) -Codechange: move the IP address field from the ClientInfo to ClientSocket 13 years ago
rubidium 2cae0cd54c (svn r22368) -Codechange: move the IP address field from the ClientInfo to ClientSocket 13 years ago
rubidium 9328b8b63d (svn r22363) -Codechange: NetworkFindClientStateFromClientID -> NetworkClientSocket::GetByClientID 13 years ago
rubidium f1d0c1a746 (svn r22363) -Codechange: NetworkFindClientStateFromClientID -> NetworkClientSocket::GetByClientID 13 years ago
rubidium 0a7dcc9781 (svn r22362) -Codechange: NetworkFindClientInfoFromClientID -> NetworkClientInfo::GetByClientID 13 years ago
rubidium bc9a803ea9 (svn r22362) -Codechange: NetworkFindClientInfoFromClientID -> NetworkClientInfo::GetByClientID 13 years ago
smatz c85e1c3089 (svn r22116) -Codechange: use PoolBase::Clean() at more places 14 years ago
smatz 756cc6cf65 (svn r22116) -Codechange: use PoolBase::Clean() at more places 14 years ago
rubidium 6e898d4bba (svn r22032) -Codechange: add some asserts to verify we don't allocate too many NetworkClientSockets/Infos 14 years ago
rubidium 05a846a574 (svn r22032) -Codechange: add some asserts to verify we don't allocate too many NetworkClientSockets/Infos 14 years ago
rubidium f1e42dc23b (svn r21854) -Codechange: refactor the password setting methods to make it possible to change the password of other companies (on the server) 14 years ago
rubidium 795a528328 (svn r21854) -Codechange: refactor the password setting methods to make it possible to change the password of other companies (on the server) 14 years ago
rubidium a5108a1fa2 (svn r21853) -Codechange: HashCurrentCompanyPassword is only used by servers, so move it to network_server.* (dihedral) 14 years ago
rubidium e54a1f6721 (svn r21853) -Codechange: HashCurrentCompanyPassword is only used by servers, so move it to network_server.* (dihedral) 14 years ago
rubidium ebc3fa3b93 (svn r21852) -Codechange: generalise GenerateCompanyPasswordHash (dihedral) 14 years ago
rubidium e95718bf43 (svn r21852) -Codechange: generalise GenerateCompanyPasswordHash (dihedral) 14 years ago
rubidium 01b7b94052 (svn r21851) -Codechange: rename NetworkClientSetPassword to NetworkClientSetCompanyPassword (dihedral) 14 years ago
rubidium c9609bbbc2 (svn r21851) -Codechange: rename NetworkClientSetPassword to NetworkClientSetCompanyPassword (dihedral) 14 years ago
rubidium 29ecb58682 (svn r21850) -Codechange: move password hashing to a more general location (dihedral) 14 years ago
rubidium a82118f360 (svn r21850) -Codechange: move password hashing to a more general location (dihedral) 14 years ago
rubidium 692e61d1dc (svn r21701) -Codechange: ConsoleColour = TextColour, so make it that way and remove some unneeded casts 14 years ago
rubidium b25cf57542 (svn r21701) -Codechange: ConsoleColour = TextColour, so make it that way and remove some unneeded casts 14 years ago
rubidium 30e78752a9 (svn r21513) -Feature [FS#532]: make the chat message timeout user configurable 14 years ago