|
Patric Stout
|
r28627:3ac57f81c4f2
|
9 months ago
|
|
|
|
Tyler Trahan
|
r28549:6bc33bc6ee38
|
9 months ago
|
|
|
|
Rubidium
|
r28531:925d537e515d
|
9 months ago
|
|
|
|
Rubidium
|
r28449:548e1fdb09a4
|
9 months ago
|
|
Remove: Debug redirect over network
It does not work for dedicated servers because upon starting the process to resolve the address to redirect to gets killed. Also with all the async going on in the network code, the debug redirection will start very late in the process.
|
|
Charles Pigott
|
r28362:23e5c9d6b27d
|
10 months ago
|
|
|
|
Rubidium
|
r28025:9116d6e411b0
|
12 months ago
|
|
|
|
frosch
|
r27944:a5c70dad53db
|
13 months ago
|
|
|
|
Tyler Trahan
|
r27883:ddbd33508a8a
|
14 months ago
|
|
|
|
Rubidium
|
r27737:728d55b97775
|
17 months ago
|
|
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
|
|
Jonathan G Rennison
|
r27643:618d2fbb7cf6
|
16 months ago
|
|
Fix #11016: Defer deletion of client and server game socket handlers This fixes various use after free scenarios in error handling paths
|
|
Rubidium
|
r27518:95f27f79eed5
|
17 months ago
|
|
|
|
Rubidium
|
r27392:b8be4cd54ca6
|
17 months ago
|
|
|
|
Rubidium
|
r27391:048886674223
|
17 months ago
|
|
|
|
Patric Stout
|
r27371:b9ad4c1bff08
|
18 months ago
|
|
Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate in our automated survey. You have to opt-in, and can easily opt-out (via the Options) at any time.
When opt-in, whenever you exit a game, a JSON blob will be send to the survey server hosted by OpenTTD. This JSON blob contains information that gives a global picture of the game just played: - What settings were used - How many humans vs AIs - How long the game has been played - Basic information about the OS / CPU
All this information is kept very generic, so there is no chance we send private information to our survey server. Nothing in the JSON blob could identify you as a person; it mostly tells about the game played. At any time you can see what the JSON blob includes, by pressing the "Preview Survey Results" button in-game.
|
|
Tyler Trahan
|
r27166:64e04a3ef9b1
|
18 months ago
|
|
|
|
Patric Stout
|
r27148:4e041ae27b9d
|
18 months ago
|
|
|
|
Patric Stout
|
r26874:065b6bc49f35
|
20 months ago
|
|
Add: use https:// for content-service connections ( #10448) This requires the use of WinHTTP (for Windows) or libcurl (for all others except Emscripten). Emscripten does not support http(s) calls currently. On Linux it requires ca-certificates to be installed, so the HTTPS certificate can be validated. It is really likely this is installed on any modern machine, as most connections these days are HTTPS. (On MacOS and Windows the certificate store is filled by default) Reminder: in case the http(s):// connection cannot be established, OpenTTD falls back to a custom TCP-based connection to fetch the content from the content-service. Emscripten will always do this.
|
|
Rubidium
|
r26832:a6bd9039c80b
|
21 months ago
|
|
|
|
Rubidium
|
r26768:010c70fb5adc
|
21 months ago
|
|
|
|
Michael Lutz
|
r26120:15c912177c88
|
3 years ago
|
|
|
|
Michael Lutz
|
r26103:316b73a1be08
|
3 years ago
|
|
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.
|
|
Michael Lutz
|
r26099:9c675ef812ea
|
3 years ago
|
|
Change: [Network] Transfer command data as serialized byte stream without fixed structure.
The data will be transmitted as the length followed by the serialized data. This allows the command data to be different for every command type in the future.
|
|
Michael Lutz
|
r26092:d96f469449f6
|
3 years ago
|
|
|
|
Michael Lutz
|
r26091:9a8d99243966
|
3 years ago
|
|
|
|
Michael Lutz
|
r26054:cfc48891bea2
|
3 years ago
|
|
|
|
Patric Stout
|
r26005:fa9fad1bd9d6
|
3 years ago
|
|
Add: [Network] Keep the refresh button in lowered state while refreshing ( #9600) This gives user visual feedback that the refresh is still pending, and prevents people from clicking again and again thinking nothing is happening. This is especially true for connections that fall back to TURN, as that takes a few seconds to kick in. Additionally, prevent clicking on the button again while a refresh is pending. This is only delaying a successful result.
|
|
dP
|
r25978:1911877bcb73
|
3 years ago
|
|
|
|
Patric Stout
|
r25925:38cfb717fb3f
|
3 years ago
|
|
Fix: [Network] show query errors in the server listing instead of error popup ( #9506) When you are query several servers at once, it is rather unclear for which server you got a popup. Instead, show any errors on the server itself. This is only true for the query-part. Joining a server still gives an error popup to tell you about any issue.
|
|
Patric Stout
|
r25923:d1582e09c6ed
|
3 years ago
|
|
|
|
Patric Stout
|
r25887:61d27ee7a913
|
3 years ago
|
|
|
|
Patric Stout
|
r25886:4a328504ff89
|
3 years ago
|
|
Feature: make "join game" button join the game, instead of first showing a lobby window ( #9467) Nobody really paid attention to the lobby window, and it completely missed its purpose. Most people don't even wait for companies to show up, but just hit "New Company". This in turn means people create a lot of unneeded companies, while they "just want to watch the game" or join another company. Instead, "Join Game" now just joins the game as spectators.
|
|
Rubidium
|
r25854:8c8bc8b61b57
|
3 years ago
|
|
|
|
Patric Stout
|
r25848:1aa50567d7ba
|
3 years ago
|
|
|
|
Patric Stout
|
r25819:0fb41dc4b582
|
3 years ago
|
|
Fix: "Search LAN games" used the socket after it was closed ( #9437) Every outgoing connection, either TCP or UDP, triggered NetworkInitialize(), which triggered NetworkUDPInitialize() which first closes all connections. Now the problem was that "Search LAN games" found a server, added it to the list, after which (over TCP) it queries the server. This closes all UDP sockets (as that makes sense, I guess?), while the UDP was still reading from it. Solve this by simply stop initializing UDP every time we make an outgoing TCP connection; instead only do it on start-up.
|
|
Patric Stout
|
r25817:3f5c3838fe0a
|
3 years ago
|
|
Add: allow setting your server visibility to "invite-only" ( #9434) In this mode you do register to the Game Coordinator, but your server will not show up in the public server listing. You can give your friends the invite code of the server with which they can join.
|
|
Patric Stout
|
r25815:13efa809f0d9
|
3 years ago
|
|
Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes are small (~7 characters) indentifiers for servers, which can be exchanged with other players to join the servers.
|
|
Patric Stout
|
r25814:efd9cb732234
|
3 years ago
|
|
Change: groundwork to allow ServerAddress to use invite codes
Normally TCPConnecter will do a DNS resolving of the connection_string and connect to it. But for SERVER_ADDRESS_INVITE_CODE this is different: the Game Coordinator does the "resolving".
This means we need to allow TCPConnecter to not setup a connection and allow it to be told when a connection has been setup by an external (to TCPConnecter) part of the code. We do this by telling the (active) socket for the connection.
This means the rest of the code doesn't need to know the TCPConnecter is not doing a simple resolve+connect. The rest of the code only cares the connection is established; not how it was established.
|
|
Patric Stout
|
r25813:ea6d38b6c3a1
|
3 years ago
|
|
Codechange: track servers with a ServerAddress instead of a NetworkAddress
This allows future extensions to have different ways of referencing a server, instead of forcing to use IP:port.
|
|
Patric Stout
|
r25802:5a9afa6d773f
|
3 years ago
|
|
Remove: old server announcement to Master Server
As we now use the Game Coordinator for announcements, there is no longer a need to use the Master Server for this.
|
|
Patric Stout
|
r25800:5bcbdca2efaf
|
3 years ago
|
|
|
|
Patric Stout
|
r25799:67f31839e848
|
3 years ago
|
|
|
|
rubidium42
|
r25726:96b4fe65dab7
|
3 years ago
|
|
Codechange: [Network] Remove overload on NetworkValidateClientName
Rename the zero-parameter NetworkValidateClientName to NetworkValidateOurClientName to make it clearer it is performed on our client name, and to make it a non-overloaded function to aid with the variant being added a few commits later
|
|
rubidium42
|
r25665:904100ec67ac
|
3 years ago
|
|
|
|
rubidium42
|
r25655:1030dcb7eb52
|
3 years ago
|
|
|
|
Patric Stout
|
r25592:e33a477d2b91
|
3 years ago
|
|
|
|
glx22
|
r25565:6a5de7df7ea1
|
3 years ago
|
|
|
|
rubidium42
|
r25563:ffc7b5a68ed9
|
3 years ago
|
|
|
|
rubidium42
|
r25551:26df1bec7e96
|
3 years ago
|
|
|
|
rubidium42
|
r25496:62d0ac1340b7
|
3 years ago
|
|
|
|
rubidium42
|
r25494:4c9126caa0f2
|
3 years ago
|
|
|
|
rubidium42
|
r25487:e8c958a8b290
|
3 years ago
|
|
|
|
rubidium42
|
r25485:a78d3ba0b5ae
|
3 years ago
|
|
|
|
rubidium42
|
r25484:c5af4712cb7f
|
3 years ago
|
|
|
|
rubidium42
|
r25478:0c7266566a47
|
3 years ago
|
|
|
|
rubidium42
|
r25475:0426c207464e
|
3 years ago
|
|
|
|
rubidium42
|
r25474:d9d75ddfaa02
|
3 years ago
|
|
|
|
rubidium42
|
r25464:b2a279799858
|
3 years ago
|
|
|
|
rubidium42
|
r25463:a9b079004e01
|
3 years ago
|
|
|
|
rubidium42
|
r25462:cf7a0a10bcaa
|
3 years ago
|
|
|
|
rubidium42
|
r25461:f4423b696b95
|
3 years ago
|
|
|
|
Patric Stout
|
r25440:04e72c31c8b4
|
3 years ago
|
|
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
|
|
Patric Stout
|
r25435:d32679f29f00
|
3 years ago
|
|
|
|
rubidium42
|
r25434:b3363e7a23bb
|
3 years ago
|
|
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
|
|
Patric Stout
|
r25433:2354652aa0d6
|
3 years ago
|
|
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.
|
|
Patric Stout
|
r25431:ee9e6d792f6e
|
3 years ago
|
|
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
|
|
Patric Stout
|
r25423:cff94a4ccd78
|
3 years ago
|
|
|
|
Patric Stout
|
r25420:b4938bd4a2ae
|
3 years ago
|
|
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.
|
|
Patric Stout
|
r25419:c885ebd51ddf
|
3 years ago
|
|
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.
|
|
Patric Stout
|
r25417:d53fed680b16
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25400:69a72bf5e010
|
3 years ago
|
|
|
|
Patric Stout
|
r25397:c741c77120c8
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25396:b4291ae45d23
|
3 years ago
|
|
|
|
rubidium42
|
r25392:925cc07e1a56
|
3 years ago
|
|
|
|
Patric Stout
|
r25388:32b23efdcf4e
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25386:b146841c350c
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25360:c5efeb83c7e8
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25350:f2f32536f95c
|
3 years ago
|
|
|
|
rubidium42
|
r25347:06f82554f1b8
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25346:21c8ec239c8f
|
3 years ago
|
|
|
|
rubidium42
|
r25344:3bb29eeaba63
|
3 years ago
|
|
|
|
Patric Stout
|
r25313:a5c6f5530336
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25308:af5928950609
|
3 years ago
|
|
|
|
Patric Stout
|
r25307:56a5a942d776
|
3 years ago
|
|
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.
|
|
Patric Stout
|
r25293:51d13a17d6ec
|
3 years ago
|
|
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.
|
|
Patric Stout
|
r25289:7c44ede418ad
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25279:5ca426e4239a
|
3 years ago
|
|
|
|
Patric Stout
|
r25254:2fb698f75978
|
3 years ago
|
|
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.
|
|
rubidium42
|
r25235:b3850f08e2b1
|
3 years ago
|
|
|
|
rubidium42
|
r25233:c47c9757c370
|
3 years ago
|
|
|
|
Patric Stout
|
r25199:8b7dd6858005
|
3 years ago
|
|
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.
|
|
Rubidium
|
r25169:d36f2d41209f
|
3 years ago
|
|
|
|
Patric Stout
|
r24582:1447201ea3e3
|
4 years ago
|
|
|
|
Charles Pigott
|
r24521:57ec498b9221
|
4 years ago
|
|
|
|
Jonathan G Rennison
|
r24483:c8962d3f47a6
|
6 years ago
|
|
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.
|
|
Patric Stout
|
r24439:3207de2680bf
|
4 years ago
|
|
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>
|
|
Quipyowert2
|
r24120:38dae2186bfb
|
5 years ago
|
|
|
|
Bjarni Thor
|
r24082:4997f7095c26
|
5 years ago
|
|
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.
|
|
glx
|
r23975:ff757d54be79
|
5 years ago
|
|
|
|
glx
|
r23964:f1693194d4bf
|
5 years ago
|
|
|
|
S. D. Cloudt
|
r23917:50c2317ea357
|
5 years ago
|
|
|