Age | Commit message (Collapse) | Author |
|
|
|
|
|
the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
|
|
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.
|
|
|
|
|
|
function calls.
|
|
|
|
condition
A race condition happens when an IPv6 connection takes more than
250ms to report an error, but does return before the IPv4 connection
is established.
In result, an invalid socket might be used for that connection.
|
|
This should already be the case, but now assert()s will tell us
if this isn't.
|
|
|
|
|
|
|
|
invite code (#9615)
|
|
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.
|
|
|
|
Additionally, reword the disconnect to match connect / join messages.
Co-authored-by: Berbe <4251220+Berbe@users.noreply.github.com>
|
|
This changes nothing for us, but allows patchpacks to add the
right pieces of code to start filtering content entries on patchpack
only entries.
|
|
Fixes performance issues with dependency lookup when retrieving
content list from the content server.
|
|
ClientNetworkCoordinatorSocketHandler::CloseAllConnections() (#9534)
The function clears all stun-handlers. This causes all of those
objects to be destroyed.
A handler can have a pending connecter, which was only killed in
case CloseConnection() was called. This is never the case when
the object is destroyed. In result, the connecter could finish
and cause a use-after-free by calling into the (now deleted)
handler.
|
|
|
|
|
|
|
|
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.
|
|
You can now still query a full server, as long as the maximum
amount of allowed connections isn't reached. This means that as
long as there are not 255 clients connected to a server, you can
always connect to query.
|
|
(#9502)
|
|
|
|
Old servers don't tell the GameScript they are running, so nothing
should be shown.
All values in NetworkGameInfo initialize as 0/empty, except for GS
version. Someone has to be different from the rest, I guess.
|
|
If you update the server-list while not having last-joined selected
and it is no longer available, the game crashed.
|
|
|
|
Currently it says "the server" which is a bit ambigious. Be more
specific.
|
|
|
|
|
|
This prevents two servers battling for the same invite-code. Now
the last one wins.
|
|
|
|
|
|
|
|
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.
|
|
Online Players GUI (#9478)
The selector selects the first widget, which by accident was now only
the server visibility.
|
|
(#9472)
|
|
Soon we will make "join game" join the game as spectator first,
so limiting the amount of spectators makes no sense anymore in
that context. Not sure it ever did make sense.
|
|
|
|
"my_client" wasn't always free'd when a game ended. "my_client"
keeps a reference inside the PT_NCLIENT pool. The rest of the
code assumes that when you are not in a game, it can freely
reset this pool.
In result: several ways to trigger a use-after-free.
|
|
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.
It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
|
|
if needed
|
|
|
|
Before 8a2da49 the NewGRF names were synchronized using UDP packets, however
those have been removed. With this a new version of the GameInfo packet is
introduced that allows to specify the type of serialisation happens for
NewGRFs. Either only the GRF ID and checksum, or those two plus the name of
the NewGRF.
On this request for local servers will send the NewGRFs names.
The Game Coordinator will get the names on the first registration, and after
that only the GRF ID and checksum.
|
|
|
|
These were filled with "<Unknown>" (before 8a2da49) and later their name would get filled via UDP requests to the server. These UDP packets do not exist anymore, so they will always remain "<Unknown>".
Remove that logic and just use the generic translated error GRF UNKNOWN string instead.
|
|
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.
|