Commit Graph

377 Commits

Author SHA1 Message Date
Paul Chote
aa798c252b Remove "X has joined the game." notification when starting a Skirmish. 2021-07-06 13:12:51 +02:00
teinarss
1f1373509e Refactor server orders 2021-07-03 14:55:03 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Ivaylo Draganov
1af2ab566e Fix player handicap erroneously set to player team 2021-06-25 09:25:17 -05:00
Paul Chote
2a26ddc622 Replace server Select loop with individual client threads.
This guarantees that any unexpected blocking calls due to network
issues cannot stall the main server thread.
2021-05-30 14:37:25 +02:00
Paul Chote
6535411744 Move SendData to Connection. 2021-05-30 14:37:25 +02:00
Paul Chote
7c02b4d264 Add Connection.EndPoint property. 2021-05-30 14:37:25 +02:00
Paul Chote
7e79e69eae Remove public mutable state from Connection. 2021-05-30 14:37:25 +02:00
teinarss
96b8273916 Remove FrameData and update OrderManager 2021-05-09 15:08:48 +02:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
0bbb32e8ac Rework MapPreview custom rule handling.
The previous asynchronous approach did not work particularly well,
leading to large janks when switching to custom maps or opening the
mission browser.

This commit introduces two key changes:

 * Rule loading for WorldActorInfo and PlayerActorInfo is made
   synchronous, in preparation for the next commit which will
   significantly optimize this path.
 * The full ruleset loading, which is required for map validation,
   is moved to the server-side and managed by a new ServerMapStatusCache.
   The previous syntax check is expanded to include the ability to run
   lint tests.
2021-04-21 18:57:44 +02:00
Paul Chote
abee274f88 Remove direct access to MapPreview.Rules. 2021-04-21 18:57:44 +02:00
Matthias Mailänder
5a0bcc01a6 Add a lint check for trait placement on hardcoded actor names. 2021-04-11 20:20:00 +02:00
reaperrr
1a9dfc0893 Refactor GameSpeed setting
*Remove internal GameSpeed defaults
 Enforce setting values explicitly all the time
 Require definition of a DefaultSpeed

*Remove Global.Timestep default

*Remove the hacky Timestep/OrderLatency setting via LobbyInfo

*Fix shellmaps ignoring mod-defined gamespeeds

*Make DateTimeGlobal use the MapOptions gamespeed
2021-04-09 22:58:14 +01:00
Matthias Mailänder
d15e7f76fc Port back to Mono.Nat and make discovery async. 2021-03-27 18:36:12 +00:00
teinarss
7073279ab8 Replace WebClient with HttpClient 2021-03-07 16:04:57 +00:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
Vapre
f176a0ed83 Fix. Call EndGame in one place of server main loop. Ensure UPnP port forward is removed always. 18807. 2021-02-14 13:54:48 +00:00
Paul Chote
02a2624bcc Add a per-player handicap option to the lobby.
Handicaps reduce unit health, firepower, and build speed.
2021-01-10 22:23:52 +01:00
Vapre
e90fc1ef39 As proposed by Leonardo-Ferreira. 2020-12-24 23:43:35 +00:00
Vapre
ce013f17d6 Server DispatchOrdersToClients create frame once for all clients.
Avoid creating frame data per client connection. Avoid
the allocation of a memory stream and setting frame header
and copying frame data.
2020-12-24 23:43:35 +00:00
Paul Chote
de7a84e8ed Don't use Platform.ResolvePath when constructing hardcoded paths. 2020-11-22 16:42:46 +01:00
Paul Chote
6b6b1e56e6 Resolve random players and spawn points in server replays. 2020-10-31 14:31:44 +01:00
Matthias Mailänder
4da14cee0a Disable UPnP on local games. 2020-10-16 18:14:33 +01:00
abcdefg30
1bc19e788c Drop and log sync orders with mismatching length 2020-10-14 19:53:49 +02:00
abcdefg30
1861174d38 Add a Order.SyncHashOrderLength const 2020-10-14 19:53:49 +02:00
Clément Bœsch
815bbc6ee8 Save disconnect frame in the GameInformation
This information is useful to infer a winner in case the winstate is
unknown.
2020-10-10 01:17:39 +02:00
Clément Bœsch
ca8870a5cf Server: handle wins/losses using Sync hash
Signed-off-by: Paul Chote <pchote@users.noreply.github.com>
2020-10-10 01:17:39 +02:00
Clément Bœsch
e5da58e2b4 Server: add basic replay recording
Signed-off-by: Paul Chote <pchote@users.noreply.github.com>
2020-10-10 01:17:39 +02:00
Paul Chote
0672553a07 Lock Server.LobbyInfo to prevent races with callback threads. 2020-10-04 20:31:07 +02:00
Aigamo
06a1c88e86 Replace 0x7FFFFFFF with int.MaxValue 2020-08-29 12:37:20 +01:00
teinarss
9c4fd0e3d3 Use Null-Propagation Operator 2020-08-19 18:11:07 +01:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
Matthias Mailänder
3a9b35980c Revert "Reduce order latency locally"
This reverts commit 20e5219cf4.
2020-07-21 21:58:31 +02:00
Adam Mitchell
20e5219cf4 Reduce order latency locally 2020-07-09 13:48:55 +02:00
jrb0001
bf397591f9 Implement IPv6 support for server and direct connect 2020-05-08 15:17:44 +02:00
Paul Chote
429dbe3e0c Block profiles with revoked keys from joining auth-only servers. 2020-04-16 16:43:10 +02:00
Paul Chote
a63c17baab Disable IP tooltip in skirmish games. 2020-04-15 23:16:24 +02:00
Paul Chote
9c4faddc0f Switch GeoIP database from MaxMind to IP2Location.
The IP2Location data is licensed under CC BY-SA, which
allows us to distribute the database with releases.
2020-04-15 23:16:24 +02:00
Paul Chote
d6436858a9 Fix IPAddress capitalization. 2020-01-15 12:12:54 +01:00
Paul Chote
38cb818469 Anonymise client IPs and allow server operators to disable sharing. 2020-01-15 12:12:54 +01:00
Paul Chote
d74a5065b9 Require GeoLite2 database path to be specified by the server operator. 2020-01-15 12:12:54 +01:00
Paul Chote
6b2c019caa Evaluate player location on the server. 2020-01-15 12:12:54 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
baa5b3d25e Bypass fingerprint validation for skirmish/mission servers. 2020-01-01 20:33:30 +01:00
Paul Chote
8f2bf27edf Replace Server.Dedicated with Server.Type. 2020-01-01 20:33:30 +01:00
teinarss
4dd8472d9b Reset server after game 2019-08-25 15:30:45 +02:00
4mfie
ff02b8ba06 Add timestamps to server log files
Servers are now writing timestamps to the log files using the the ISO 8601 timestamp format defined in the game server settings.
2019-07-27 10:47:24 +01:00
Paul Chote
c6232f20f9 Split Protocol version into Handshake vs Orders.
Handshake is kept at 7.
Orders is incremented to 8 to reflect immediate order changes.
2019-06-20 22:50:17 +02:00
Paul Chote
fe41dcb45e Restore 0xFE order for handshakes.
This restores handshake compatibility with protocol 7 servers.
2019-06-20 22:50:17 +02:00