Commit Graph

280 Commits (24efdf6ac5572a4822d233becda6ae36587f4900)

Author SHA1 Message Date
Rubidium 24efdf6ac5 Codefix 363e251: incorrect trace debug message 3 months ago
Rubidium bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 3 months ago
Patric Stout 15c14a896f
Fix: survey-time seconds for clients was calculated wrong (#12078) 4 months ago
Rubidium 3534214dfc Codechange: use reference instead of pointer for CommandPacket 4 months ago
Rubidium cb588d8d3f Codechange: use std::vector for the incoming command queue 4 months ago
Rubidium 72a44b0df6 Codechange: use references for handling received TCP packets 4 months ago
Rubidium 8add0bf8ec Codechange: use references for game info serialization 4 months ago
Rubidium 031a9d4e26 Codechange: use std::unique_ptr for the Packets created to send via TCP 4 months ago
Rubidium 4b372b6050 Codechange: use std::shared_ptr to manage saveload filters instead of manually trying to avoid double frees 4 months ago
Patric Stout 363e251a10
Change: make -dnet=9 give traces of the details of the network protocol (#11931) 4 months ago
Patric Stout d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) 4 months ago
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 4 months ago
Rubidium c6411168d8 Cleanup: missing spaces before continuation * in some comments 7 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 8 months ago
Tyler Trahan fca2b37726 Codechange: Move Ticks into their own class 9 months ago
Rubidium eaae0bb5e7 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
10 months ago
Rubidium af9b9327af Codechange: do not keep local variable for temporary string parameters 11 months ago
Jonathan G Rennison 4f6d75f97d Fix #11016: Defer deletion of client and server game socket handlers
This fixes various use after free scenarios in error handling paths
11 months ago
Rubidium acec34a0fe Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex 1 year ago
Rubidium d9a04ba446 Codechange: make the MD5 hash/digest/checksum variables a std::array 1 year ago
Rubidium a312a6c1b2 Codechange: make md5sumToString std::string compatible 1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Peter Nelson 47e12a8790 Codechange: Check that CompanyMask fits into 16 bits during compilation. 1 year ago
Zachary e17c82e32b Add: maximum number of companies allowed to the client list 1 year ago
Loïc Guilloux a2c8168924
Fix #10465: Delay closing of network join progress window (#10466) 1 year ago
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 1 year ago
Michael Lutz d85348b1d1 Codechange: Template the command callback function type to allow unpacked arguments. 2 years ago
Michael Lutz 4f3ea3907e Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID). 2 years ago
Michael Lutz ccefa76a46 Codechange: Template DoCommandPInternal. 2 years ago
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 2 years ago
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 2 years ago
dP 80e3397f85
Fix 3a1a915: Every 16th client never reconnects after server restart 3 years ago
glx22 1c0700e0c0 Fix #9624: compilation with RANDOM_DEBUG 3 years ago
dP 31cf9e888b
Add: [Network] external chat messages for remote admins (#9563) 3 years ago
Patric Stout b2f0491a90
Fix #9501: [Network] crash when more than one game-info query was pending (#9502) 3 years ago
Patric Stout 579f393374
Add: open Online Players GUI on starting/joining a server (#9479) 3 years ago
Patric Stout 1ef4d3cf19
Remove: COMPANY_INFO packets and related code (#9475) 3 years ago
Patric Stout 3d55ea2d4d
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.
3 years ago
Patric Stout 508e465b59
Add: synchronize server name to clients and display in Online Players GUI (#9472) 3 years ago
Patric Stout 4c1ea4020d
Change: remove the ability to control "max spectators" (#9466)
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.
3 years ago
Patric Stout 9cc706847c
Fix: crash when joining a server again after a TCP disconnect (#9453)
"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.
3 years ago
Loïc Guilloux 460991ecf4
Feature: Persistant rotation of numbered auto/netsave after restart (#9397)
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.
3 years ago
Patric Stout cbaac5609f Codechange: use UpdateNetworkGameWindow() over manually marking window dirty 3 years ago
Stephan a70aa5df49
Add #9188: netsave now keeps multiple version around, similar to autosave (#9395) 3 years ago
rubidium42 cdf9caf8ea 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
3 years ago
rubidium42 eb6cdadc4d Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
3 years ago
rubidium42 d9c1d18f2b Change: improve some of the console messages related to networking (make them more uniform) and convert to fmt 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
rubidium42 e3c9ed4d15 Codechange: [Network] Use std::string to determine an unique name for clients 3 years ago
rubidium42 806f78aa04 Codechange: [Network] Use std::string to send the client name and rcon commands 3 years ago