Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
This allows future extensions to have different ways of referencing
a server, instead of forcing to use IP:port.
|
|
This removes all UDP from the game except for a local broadcast
to find LAN games.
So long Master Server, and tnx for all the fish!
|
|
|
|
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
|
|
|
|
|
|
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.
|
|
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.
|
|
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
|
|
|
|
strings.
|
|
|
|
|
|
|
|
A conforming compiler with a valid <mutex>-header is expected.
Most parts of the code assume that locking a mutex will never fail unexpectedly,
which is generally true on all common platforms that don't just pretend to
be C++11. The use of condition variables in driver code is checked.
|
|
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.
|
|
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
|
|
various sources (including Eagle_rainbow, MinchinWeb)
|
|
selected anymore (adf88)
|
|
|
|
|
|
name becomes available
|
|
NewGRFs were downloaded
|
|
search restrictions.
|
|
|
|
|
|
|
|
a GRFText* to make translations possible
|
|
consisted of unrelated values use static const (u)int
|
|
subclassing it
|
|
receiving a reply instead of when requesting the information. With slow/unstable network connections it would look like the NewGRF settings button went randomly missing.
|
|
remove some unused variables
|
|
|
|
did not get properly updated when the NewGRFs were rescanned causing reading of freed data
|
|
(like done for video, music, sound, etc)
|
|
|
|
|
|
|
|
|
|
connect to them in any case
|
|
|
|
|
|
|
|
|
|
|
|
so they don't freeze OpenTTD when for example the network connection got severed. Thanks to glx for writing the mutex implementation for Windows.
|
|
structure so we can pass either one of them and not convert an ip to a string and then back again.
|
|
headers so that nothing from the network directory needs to include basically all network headers.
|