Commit Graph

50 Commits

Author SHA1 Message Date
teinarss
f3777a25e6 Refactor send and receive Orders loop 2021-07-10 23:35:47 +02:00
teinarss
5e1468facb Fix NRE with ConnectionStateChanged 2021-07-08 01:12:05 +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
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
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
abcdefg30
8a7020b4ef Ignore the length requirement of sync orders we want to drop 2020-10-14 19:53:49 +02:00
abcdefg30
d07b34e67e Style fixups in ReplayConnection.cs 2020-10-14 19:53:49 +02:00
abcdefg30
1861174d38 Add a Order.SyncHashOrderLength const 2020-10-14 19:53:49 +02:00
teinarss
19b02875c7 Use Tuple syntax 2020-08-15 10:37:10 +01:00
jrb0001
bf397591f9 Implement IPv6 support for server and direct connect 2020-05-08 15:17:44 +02:00
abcdefg30
a28992aa38 Default LocalClientId in ReplayConnection to -1
We do not have a local client in replays.
This change prevents anything from accidentally using (sometimes there might be clients with ID 0 present).
2020-01-12 14:23:34 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
bfddfec461 Replace magic numbers with an OrderType enum. 2019-06-20 22:50:17 +02:00
jrb0001
f3133617dd Prevent immediate orders from being sent as regular orders 2019-04-23 01:00:52 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Jeremy
85a97998aa Added final game tick to replay meta data for completion percentage on replay. 2018-12-24 20:51:03 +01:00
Paul Chote
42f1db0d4b Rename Stream.Write(byte[]) extension method to fix compatibility with newer mono. 2018-03-03 18:40:01 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
ca01a1f186 Presize MemoryStream when possible.
Also use GetBuffer when we know we have presized the stream to the exact required size to prevent a needless copy.
2017-12-19 00:59:11 +01:00
RoosterDragon
713cdaef5d Reduce allocations needed by ReplayConnection.
Packets from each chunk are now saved directly in an array, removing the overhead of a list. Additionally, a list is reused as a buffer for decoding packets into, preventing a new buffer from needing to be allocated for each chunk.
2017-11-19 12:11:38 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
36a1715e5c Ensure replays end when the recorder disconnects.
When ReplayConnection fixes up disconnection packets, this allows the game to continue past the point of a player disconnecting. Unfortunately this also applies to the player who actually disconnected which means the replay continues in an invalid manner. To fix this - we now explicitly don't replace their packet in order to ensure such replays end at the correct time.
2015-10-25 21:22:44 +00:00
Herve-M
4366593b33 2 pass replay loader (fix freeze) close #6241 2015-10-11 20:21:19 +02:00
Matthias Mailänder
e428e6d8cc remove executable bits from source code 2015-08-06 18:05:50 +02:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
Paul Chote
96b5b1fc66 Automatically switch mods when connecting to a server / replay. 2014-12-23 09:20:21 +13:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
Pavlos Touboulidis
de0a5ebd43 Improve replay metadata and the replay browser
List of changes:

* Better and more filters with new layout, for both mods.

* Rename/Delete/Detele all functionality.

* Simplified ReplayMetadata class considerably by introducing a new
GameInformation data object. The new GameInformation class contains
more information than previously available so the new solution is not
compatible with old replays, meaning it can't read old replays.

* Better and cleaner game information gathering in order to be written
at the end of the replay file.

* Revert changes to ReplayConnection, no longer necessary.

* Better exception message on missing sprites and fonts.

* New "SpawnOccupant" class that holds all the information needed by the
MapPreviewWidget to visualize a spawn point. It was using Session.Client
before and it was necessary to separate it to be able to show information
not available at lobby time.

* Fix keyboard focus UI bug when closing a window would not remove focus.
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
ce8c42b552 Style & nit fixes 2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
98a05b61b3 Add metadata block to replays
The replay files are just streams all network communication so to
get any info out of them it is necessary to play back the stream
until the wanted information is reached.

This introduces a new metadata block placed at the end of the
replay files and logic to read the new block, or fall back to
playing back the stream for older files.

The replay browser is also updated to use the metadata information
instead of reading the replay stream directly.
2014-05-22 21:54:14 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
538a25ae6c Fix replays for network games. Fixes #4866. 2014-03-18 20:37:10 +13:00
Paul Chote
bce0a7b39e Overhaul replay parsing. Fixes #4608. 2014-03-08 11:47:55 +13:00
Paul Chote
6385e7ebaa Stylecop ReplayConnection. 2014-03-08 11:47:55 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Chris Forbes
f7e35899cf tidy ReplayConnection 2011-12-24 10:11:31 +13:00
Chris Forbes
727b897994 split ReplayRecorderConnection out into its own file 2011-12-24 10:05:14 +13:00
Chris Forbes
772734d032 merge cnc and ra lobby, fixes #1267, #1224, #106, others 2011-11-06 17:01:00 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Chris Forbes
2fad6f3bf1 move replay viewer delegate into mod 2010-12-19 17:48:52 +13:00
Bob
a61d21e501 fix sync-checking in replays 2010-10-21 15:33:24 +13:00
Bob
c2b3a749ca change IConnection interface wrt sending 2010-10-16 21:05:14 +13:00
Paul Chote
9c944924de Fix a pile of compile warnings and debug log spam. Fix <playername> (Dead) in chat 2010-10-14 19:40:00 +13:00
Bob
20276291ce move Game.world onto OrderManager. use call IssueOrder on world and/or on orderManager, not on Game 2010-10-12 17:30:27 +13:00
Bob
915ad7fb7b extract replay saving from OrderManager 2010-10-12 17:22:12 +13:00