Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
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.
|
|
As we now use the Game Coordinator for announcements, there is no
longer a need to use the Master Server for this.
|
|
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
|
|
|
|
banning clients
|
|
|
|
|
|
|
|
|
|
|
|
|
|
passwords
|
|
|
|
simplify some code
|
|
|
|
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.
|
|
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.
|
|
|
|
network code (#23)
|
|
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
|
|
It currently was a bit scattered over the place. Part of
NetworkGameInfo is also the GRF Identifiers that goes with it.
|
|
|
|
"Player"
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
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
|
|
|
|
state information upon creation of their company
|
|
|
|
name, and move the UDP specific bits to network_udp
|
|
on servers (including starting a company with the default password) failed, so no client could join.
|
|
ClientSocket, after all the Socket is the bit that's associated with the network
|
|
ClientID, which later resolves the IP address to ban. This to consolidate the knowledge about resolving IP addresses
|
|
NetworkClientInfo::GetByClientID
|
|
possible to change the password of other companies (on the server)
|
|
and remove some unneeded casts
|
|
unrelated to the number of passed game days, i.e. don't stop aging chat messages when the server is paused
|
|
(dihedral)
|
|
specific intervals (dihedral)
|
|
and dihedral)
|
|
static in that file.
|
|
NetworkFindClientInfoFromIP().
|
|
(anymore) otherwise.
|
|
|