Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
to spectators
|
|
|
|
if a header require a header make it include that header
|
|
executing the pause command. This to prevent showing paused and especially unpaused to be shown when the state doesn't change. Output now mentions whether pause changes keep the game paused and what reasons for pausing there 'currently' are.
|
|
'generic' includes so compilation without network support doesn't get broken as easily by changes in header files
|
|
did not get properly updated when the NewGRFs were rescanned causing reading of freed data
|
|
|
|
via command line when joining a server (based on patch by Progman, Ammler and planetmaker)
|
|
_local_company, but only as a storage location for the company you want to join in MP.
|
|
printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
|
|
delayed so much that the network stuff was already closed and the packet would never reach the master server causing the server to appear online longer than necessary.
|
|
[network]:server_bind_ip doesn't exist anymore. Add the IPs/hostnames to [server_bind_addresses]
|
|
client_address.
|
|
|
|
|
|
window crashed the server
|
|
|