Rubidium
3534214dfc
Codechange: use reference instead of pointer for CommandPacket
2024-02-05 18:57:58 +01:00
Rubidium
cb588d8d3f
Codechange: use std::vector for the incoming command queue
2024-02-05 18:57:58 +01:00
Rubidium
b3aa8a9c35
Codechange: use std::vector for the outgoing command "queues"
2024-02-05 18:57:58 +01:00
Rubidium
72a44b0df6
Codechange: use references for handling received TCP packets
2024-02-05 16:30:49 +01:00
Rubidium
794f12dc24
Codechange: cascade through SendNeedGame/CompanyPassword functions, instead of duplicating logic for determining whether to call these functions
2024-02-05 16:30:49 +01:00
Rubidium
8add0bf8ec
Codechange: use references for game info serialization
2024-02-05 16:30:49 +01:00
Rubidium
031a9d4e26
Codechange: use std::unique_ptr for the Packets created to send via TCP
2024-02-05 16:30:49 +01:00
Rubidium
36e1b32ccf
Codechange: use std::deque of std::unique_ptr to queue packets
2024-02-05 16:30:49 +01:00
Rubidium
c77a45ed86
Codechange: use std::unique_ptr for receiving network packets
2024-02-05 16:30:49 +01:00
Rubidium
4b372b6050
Codechange: use std::shared_ptr to manage saveload filters instead of manually trying to avoid double frees
2024-02-03 21:38:33 +01:00
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Patric Stout
363e251a10
Change: make -dnet=9 give traces of the details of the network protocol ( #11931 )
2024-01-31 19:36:41 +01:00
Tyler Trahan
28716548d2
Feature: Setting to automatically restart server based on hours played ( #11142 )
2024-01-26 10:25:25 -05:00
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
Patric Stout
0b7410d979
Codechange: compile-time validate the string format of IConsolePrint ( #11804 )
...
This means we can no longer use runtime picking what string to use.
2024-01-16 21:04:35 +00:00
Peter Nelson
7a5106042f
Codechange: Use CompanyMask and company group statistics for auto clean tests. ( #11693 )
...
This function does not need to know how many vehicles there are, only that there is at least one.
2024-01-05 20:58:24 +00:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
2023-09-10 08:40:25 -04:00
Bouke Haarsma
7e54418022
Codechange: workaround CMake/Xcode duplicate file name issue ( #11186 )
...
Having a library with files with the same name isn't supported in CMake's Xcode project file generation: https://gitlab.kitware.com/cmake/cmake/-/issues/20501 . One of the files is renamed to work around this bug.
2023-09-02 19:46:52 +02:00
Patric Stout
01f55eb734
Codechange: introduce week/quarter triggers for TimerGameCalendar ( #11189 )
...
This simplifies code that triggers on these periods.
2023-08-12 16:02:11 +02:00
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
2023-07-19 19:30:14 +02:00
Rubidium
f333372dd1
Codechange: let IConsoleCmdExec accept std::string
2023-06-29 06:06:15 +02:00
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
2023-06-25 12:02:32 +01:00
Rubidium
d4c2043294
Codechange: remove a number of unneeded c_str() calls
2023-06-15 22:14:45 +02:00
axet
60540f7df6
Change: Allow dedicated server to use threaded saves. ( #10787 )
...
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
2023-05-21 19:55:12 +02:00
Rubidium
f74e26ca7e
Codechange: replace error/usererror printf variant with fmt variant and rename
2023-04-25 17:55:09 +02:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
2023-04-15 13:58:55 +02:00
Peter Nelson
47e12a8790
Codechange: Check that CompanyMask fits into 16 bits during compilation.
2023-04-07 22:09:55 +01:00
Rubidium
90f1768006
Codechange: add non-nullptr asserts in cases where it should never be nullptr
...
Though where similar calls are checked for nullptr as in those instances of
the use of that function it can actually return nullptr. In other words, write
down the assumption that the function never returns nullptr in an assert.
2023-01-14 21:15:23 +01:00
Michael Lutz
d85348b1d1
Codechange: Template the command callback function type to allow unpacked arguments.
2021-12-16 22:28:32 +01:00
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
2021-12-16 22:28:32 +01:00
Michael Lutz
4f3ea3907e
Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).
2021-12-16 22:28:32 +01:00
Michael Lutz
ccefa76a46
Codechange: Template DoCommandPInternal.
2021-12-16 22:28:32 +01:00
Michael Lutz
0f64ee5ce1
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00
Michael Lutz
a05fd7aa50
Change: [Network] Transfer command data as serialized byte stream without 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.
2021-12-16 22:28:32 +01:00
Michael Lutz
a38bbefe1b
Codechange: Untangle command code, flags and error string for DoCommand*.
2021-12-16 22:28:32 +01:00
Michael Lutz
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
2021-12-16 22:28:32 +01:00
dP
31cf9e888b
Add: [Network] external chat messages for remote admins ( #9563 )
2021-09-19 23:09:06 +02:00
Patric Stout
d9f8ed7bdf
Add: [Network] On join, log the ClientID + IP + Name clearly ( #9558 )
...
Additionally, reword the disconnect to match connect / join messages.
Co-authored-by: Berbe <4251220+Berbe@users.noreply.github.com>
2021-09-19 21:52:46 +01:00
Patric Stout
e31b5d3870
Fix #9490 : [Network] a full server couldn't be queried either ( #9508 )
...
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.
2021-08-23 19:38:02 +02:00
Michael Lutz
fff09a4af2
Fix d9c1d18f2: Wrong format string for console disconnect message.
2021-08-19 19:56:00 +02:00
dP
2e6a77a78a
Fix: connecting with the same name thrice hangs the server ( #9485 )
2021-08-16 11:09:54 +02:00
Patric Stout
1ef4d3cf19
Remove: COMPANY_INFO packets and related code ( #9475 )
2021-08-14 23:24:02 +02:00
Patric Stout
508e465b59
Add: synchronize server name to clients and display in Online Players GUI ( #9472 )
2021-08-14 10:19:40 +02:00
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.
2021-08-10 20:03:13 +02:00
Patric Stout
f4dd2d88c7
Feature: raise the maximum NewGRF limit to 255
2021-07-11 12:16:07 +02:00
Patric Stout
61fdef8457
Remove: old server announcement to Master Server
...
As we now use the Game Coordinator for announcements, there is no
longer a need to use the Master Server for this.
2021-07-10 20:17:07 +02:00
rubidium42
981cd0197a
Codechange: [Network] Use std::string for the client name in the network server
2021-06-15 06:13:00 +02:00
rubidium42
a8b3afb236
Codechange: [Network] Use string_view for network compatability check
2021-06-15 06:13:00 +02:00