Commit Graph

184 Commits

Author SHA1 Message Date
Paul Chote
df798fb620 Overhaul client latency calculations.
The ping/pong orders are replaced with a dedicated
(and much smaller) Ping packet that is handled
directly in the client and server Connection wrappers.

This allows clients to respond when the orders are
processed, instead of queuing the pong order to be
sent in the next frame (which added an extra 120ms
of unwanted latency).

The ping frequency has been raised to 1Hz, and pings
are now routed through the server events queue in
preparation for the future dynamic latency system.

The raw ping numbers are no longer sent to clients,
the server instead evaluates a single ConnectionQuality
value that in the future may be based on more than
just the ping times.
2021-09-21 15:12:36 +02:00
Matthias Mailänder
0604a58581 Send a ping when the server is shut down
and stop the LAN beacon.
2021-09-18 17:38:52 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -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
7c02b4d264 Add Connection.EndPoint property. 2021-05-30 14:37:25 +02:00
Paul Chote
7b58f03f1c Move ColorValidator logic into a new ColorPickerManager trait. 2021-05-15 15:29:46 +02:00
Paul Chote
d89f14dcbc Limit resource center queries to 50 maps at a time. 2021-05-09 15:37:30 +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
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
Paul Chote
b05ee80d5c Remove first-client check from LobbySettingsNotification.
ClientWithIndex may rarely be null, causing a crash.
In any case we do want to report these changes to the first client, as
somebody else may have changed the settings and left.
2021-01-29 14:35:32 +01:00
Paul Chote
87790069e9 Add ITerrainInfo interface. 2021-01-11 21:57:55 +01: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
teinarss
73bba97aaa Update MasterServerPinger to modern approach 2020-12-22 20:57:40 +01:00
abcdefg30
8840a690c6 Fix maps without spawn points no longer working 2020-11-15 09:38:02 +01:00
Trevor Nichols
d66e0bb22e Right click lobby spawns to disable or remove players. 2020-11-07 19:33:28 +01:00
Curtis Shmyr
c0cbca26ea Use lobby option display values when clients join 2020-10-12 22:05:35 +02:00
Paul Chote
0672553a07 Lock Server.LobbyInfo to prevent races with callback threads. 2020-10-04 20:31:07 +02:00
Matthias Mailänder
930f8ab207 Reset lobby ready state when options change server side. 2020-09-27 15:06:48 +02: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
Paul Chote
3efac3287e Fix Session.Deserialize error handling. 2020-08-16 14:17:45 +02:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
abcdefg30
534b09ae4a Fix bots not working after adminship was transferred 2020-06-03 18:30:18 +02:00
jrb0001
bf397591f9 Implement IPv6 support for server and direct connect 2020-05-08 15:17:44 +02:00
Paul Chote
33f3038316 Fix map-specific factions remaining selected when changing map. 2020-04-16 16:49:00 +02:00
Paul Chote
41657dd291 Allow spectators to be kicked after the game starts. 2020-02-28 00:04:49 +01:00
Paul Chote
d6436858a9 Fix IPAddress capitalization. 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
8f2bf27edf Replace Server.Dedicated with Server.Type. 2020-01-01 20:33:30 +01:00
Paul Chote
c00b13a18e Fix player color when a client is bumped to a spectator slot. 2019-07-24 23:07:12 +02:00
Paul Chote
3e404f6ac2 Remove HSLColor. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
abcdefg30
3039b1d710 Reset the client state when being moved to spectator 2019-01-22 22:47:39 +00:00
Paul Chote
03adceb656 Rework master server ping rate-limit logic.
Pings are now delayed instead of dropped to avoid data loss.
2018-08-18 09:31:11 +01:00
Paul Chote
efccd610d3 Simplify server tick timeout handling. 2018-08-18 09:31:11 +01:00
teinarss
1c0aa24640 Added a player action dropdown.
Adds options for:
 - handling kick
 - transferring admin
 - move to spectator
2018-07-05 23:22:09 +01:00
teinarss
23155c039d Extract LobbyCommand command logic to their own methods. 2018-07-05 23:22:09 +01:00
Paul Chote
3a1857886a Add support for displaying master server warnings. 2018-05-31 17:45:58 +02:00
David Wilson
9bc9ce4577 Color picker update with team color presets. Bots added will use available team color presets by default 2018-03-18 23:29:47 -03:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
ae394f937b Fix the color validator overriding spectator colors. 2018-01-01 11:25:08 +01:00
Paul Chote
e7ce9aa263 Unhardcode server ping/query URLs. 2017-12-28 03:40:41 +01:00
Paul Chote
3ba610b535 Implement new master server ping protocol. 2017-12-26 20:05:38 +01:00
Paul Chote
3f67feab0e Rename boolean LobbyOption fields. 2017-12-12 22:43:11 +01:00
rob-v
315cc966f4 Clear team in lobby for spectators 2017-10-21 14:12:11 +01:00