Commit Graph

591 Commits

Author SHA1 Message Date
teinarss
b3b10729cd Remove ServerExternalMod from OrderManager 2021-06-12 12:50:51 +02:00
teinarss
91f99eeb4c Cleanup in Connect 2021-06-12 12:50:51 +02:00
teinarss
a1b3450b47 Remove Password and Endpoint from OrderManager 2021-06-12 12:50:51 +02:00
Vapre
fc49d6943a OrderIO performance improvement
OrderIO, ToOrderList, skip if frame is empty,
which occurs often each client each frame.
2021-06-09 23:31:27 +02:00
teinarss
82115c6bf7 Move Text handling to its own class 2021-06-04 21:47:39 +02:00
teinarss
d10c592987 Fix crash in OrderManager 2021-05-23 12:44:18 +01:00
reaperrr
fc3f200357 Replace F in OrderManager 2021-05-09 15:00:07 +01: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
teinarss
1385aca783 Move ConnectionTarget to its own file 2021-05-08 20:41:40 +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
Vapre
52d39db84a Fix possible endless loop in replay recorder while opening save file. 2021-04-15 18:10:45 +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
8b0a3ea680 Remove our own impl of ReadOnlyList and update usages 2021-04-03 11:33:31 +02:00
Matthias Mailänder
d15e7f76fc Port back to Mono.Nat and make discovery async. 2021-03-27 18:36:12 +00:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
teinarss
ed295ae315 Change throw exceptions to use nameof in parameter 2021-02-28 18:43:51 +01:00
teinarss
53b781960c Change FieldLoader.LoadUsing to use nameof 2021-02-28 18:43:51 +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
Paul Chote
de7a84e8ed Don't use Platform.ResolvePath when constructing hardcoded paths. 2020-11-22 16:42:46 +01:00
abcdefg30
77e85e7c58 Change DisabledSpawnPoints from List to HashSet 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
teinarss
13581c030d Use in parameter for Target 2020-11-06 22:02:24 +01:00
RoosterDragon
094ccf76b0 Prefer Min/MaxBy overloads to OrderBy().First() patterns 2020-10-17 23:48:48 +02:00
abcdefg30
8a7020b4ef Ignore the length requirement of sync orders we want to drop 2020-10-14 19:53:49 +02:00
abcdefg30
1bc19e788c Drop and log sync orders with mismatching length 2020-10-14 19:53:49 +02:00
abcdefg30
c17110dac5 Make OrderManager fields readonly where possible 2020-10-14 19:53:49 +02:00
abcdefg30
d07b34e67e Style fixups in ReplayConnection.cs 2020-10-14 19:53:49 +02:00
abcdefg30
accecee018 Fix savegames not saving sync packets correctly 2020-10-14 19:53:49 +02:00
abcdefg30
1861174d38 Add a Order.SyncHashOrderLength const 2020-10-14 19:53:49 +02: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
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
Clément Bœsch
d708f46d50 Orders: make SyncHash packet size check more accurate 2020-10-10 01:17:39 +02:00
Clément Bœsch
11f57b2b26 Protocol: add defeat state bitfields to Sync packets
Signed-off-by: Paul Chote <pchote@users.noreply.github.com>
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
ycanardeau
f358b566b1 Replace NetFrameNumber >= 1 with GameStarted 2020-08-29 12:37:20 +01: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
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
Andre Mohren
006a87692a Removed unused imports. 2020-07-28 18:22:51 +02:00
Matthias Mailänder
3a9b35980c Revert "Reduce order latency locally"
This reverts commit 20e5219cf4.
2020-07-21 21:58:31 +02:00
Matthias Mailänder
150439d215 Revert "Change where we send orders"
This reverts commit 616d9421d6.
2020-07-21 21:58:31 +02:00
Matthias Mailänder
b01a534a98 Revert "Refactor the OrderManager and world tick loop, improves input latency"
This reverts commit f642cead44.
2020-07-21 21:58:31 +02:00
Adam Mitchell
f642cead44 Refactor the OrderManager and world tick loop, improves input latency 2020-07-09 13:48:55 +02:00
Adam Mitchell
616d9421d6 Change where we send orders 2020-07-09 13:48:55 +02:00