Commit Graph

179 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
Paul Chote
54c08748e0 Overhaul player disconnect notifications. 2021-09-12 22:53:50 +02:00
Ivaylo Draganov
6af354ff99 Split chat lines into pools
- Add a common class for passing around chat lines
- Add wrapper methods for adding chat lines
- Combine repeated chat lines in the display widget
2021-07-04 14:02:58 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
b3b10729cd Remove ServerExternalMod from OrderManager 2021-06-12 12:50:51 +02:00
teinarss
a1b3450b47 Remove Password and Endpoint from OrderManager 2021-06-12 12:50:51 +02:00
teinarss
82115c6bf7 Move Text handling to its own class 2021-06-04 21:47:39 +02:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +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
reaperrr
f67b7ad837 Cache IResolveOrder traits on Actor
Avoids looking up all of them each time
an actor is given an order.
2020-10-10 13:59:40 +01:00
reaperrr
a4a409f39b Pass world directly to UnitOrders.ResolveOrder
Avoids order.Subject.World look-ups.

Also removes validOrders parameter,
we can get that directly from World now.
2020-10-10 13:59:40 +01:00
reaperrr
904a5f60d1 Cache IOrderValidator traits on World 2020-10-10 13:59:40 +01: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
Matthias Mailänder
930f8ab207 Reset lobby ready state when options change server side. 2020-09-27 15:06:48 +02:00
abcdefg30
82a2148300 Fix grouped orders not being validated correctly 2020-09-15 10:16:50 +02:00
Paul Praet
9a6f3b4c05 Reset Ready status of players in Lobby when options change
Addresses #11274
2020-08-23 00:05:55 +03: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
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
abcdefg30
78bf27709f Add basic support for grouped orders 2020-04-21 01:35:40 -05:00
Ivaylo Draganov
1dd1786469 Reduce duplication of "Battlefield Control" chat line label 2020-02-22 15:58:00 +00:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
abcdefg30
d2db707521 Move unit order resolving into a helper function 2019-12-23 14:53:13 +01:00
abcdefg30
2918ecadaa Fix team chat messages not always being displayed 2019-12-10 13:05:38 +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
Paul Chote
862a274357 Merge ServerOrder into Order and 0xFE order type into 0xFF. 2019-06-20 22:50:17 +02:00
teinarss
d9d2202599 System messages should be yellow to distinguish them from normal 2019-04-27 14:51:59 +02:00
abcdefg30
6163523334 Enable spectator team chat in the lobby 2019-04-22 19:55:04 +01:00
abcdefg30
e6feba8884 Remove the TeamChat order type 2019-04-22 19:55:04 +01:00
abcdefg30
9a84ccdd1d Send the designated team number as extra data in the order 2019-04-22 19:55:04 +01:00
abcdefg30
767de564fc Use Team numbers instead of stances 2019-04-22 19:55:04 +01:00
abcdefg30
43f22f908d Don't make team messages of dead players public 2019-04-22 19:55:04 +01:00
abcdefg30
9bd0a71ca8 Return early instead of nesting 2019-04-22 19:55:04 +01:00
abcdefg30
e7f60a1e25 Don't ignore the message limit in team chat 2019-04-22 19:55:04 +01:00
abcdefg30
4a9a5ba757 Remove and restyle comments in UnitOrders 2019-04-22 19:55:04 +01:00
Paul Chote
1f3b30c2d2 Implement game save/load backend. 2019-04-20 14:54:48 +02:00
Paul Chote
3e404f6ac2 Remove HSLColor. 2019-03-04 18:26:42 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 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
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Paul Chote
c74159e549 Add player authentication backend. 2018-07-29 00:30:17 +02:00
Paul Chote
234e6cc566 Prevent injected unpause orders from restarting a finished game. 2018-02-04 15:30:53 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
75d4062698 Limit chat messages to 2500 characters. 2017-10-14 13:10:27 +02:00
rob-v
78bedb0513 Fix IsSinglePlayer 2017-06-27 22:43:15 +01:00
rob-v
bad2c1c2bf Unify ingame message prefixes. #12923
Unify ingame message prefixes. #12923
2017-03-18 21:46:30 +01:00
Paul Chote
f2e6601e07 Remove legacy MP lobby mod and replay switching logic. 2017-02-11 16:45:18 +00:00
Paul Chote
2da4e87b94 Implement new server-connection mod switching logic. 2017-02-11 16:21:34 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00