Commit Graph

511 Commits

Author SHA1 Message Date
Oliver Brakmann
280b30961f Add plumbing for short game option 2014-12-18 20:03:26 +01:00
RoosterDragon
3511fbbf2c Generate sync reports faster by delaying ToString calls until it is written to disk.
Values for the report are generated by calling ToString on members, we avoid calling this on value types for performance. By instead just copying the value we can delay calling ToString until later and avoid spending time and memory creating strings that usually go unused.
2014-12-16 18:39:02 +00:00
huwpascoe
d313317cf5 Cleaned up the server browser 2014-11-22 21:55:55 +00:00
Paul Chote
563efd678a Revert "DevEnableTech now displays from all factions"
This reverts commit 5d5f302d07.
2014-11-15 09:20:04 +13:00
huwpascoe
dfc6ebd3ba Introduced NUnit and some tests. 2014-11-02 20:18:04 +00:00
Matthias Mailänder
fb0d5036da beautify comment 2014-11-01 22:16:03 +01:00
Matthias Mailänder
b28615c2f6 StyleCop clean Order 2014-11-01 21:50:53 +01:00
Matthias Mailänder
0a06ae1d76 avoid unneccessary spaces 2014-11-01 21:48:09 +01:00
Matthias Mailänder
3f75ff0e00 StyleCop clean Unitorders 2014-11-01 21:48:09 +01:00
Matthias Mailänder
8e667304aa StyleCop clean SyncReport 2014-11-01 21:48:09 +01:00
Matthias Mailänder
7decbdeae0 StyleCop clean Session 2014-11-01 21:48:09 +01:00
Matthias Mailänder
a4b6ddc836 StyleCop clean ReplayRecorderConnection 2014-11-01 21:48:09 +01:00
Matthias Mailänder
6a5d304f07 StyleCop clean FrameData 2014-11-01 21:46:19 +01:00
Matthias Mailänder
7adacc0477 StyleCop clean Connection 2014-11-01 21:46:19 +01:00
Matthias Mailänder
7b22a01fc0 StyleCop clean OrderIO 2014-11-01 21:46:19 +01:00
Matthias Mailänder
95a4248419 StyleCop clean OrderManager 2014-11-01 21:46:19 +01:00
huwpascoe
5d5f302d07 DevEnableTech now displays from all factions 2014-10-19 20:28:29 +01:00
abcdefg30
d7857416b1 Added two diplomacy functions to lua
...and sneaked into AUTHORS
2014-10-19 13:30:00 +02:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
huwpascoe
d150ea1721 Fix server freeze on client absence. 2014-09-28 16:27:40 +01:00
Oliver Brakmann
36b5097fa0 Cache chat conversations in the lobby and in-game
This preserves the chat content from the lobby and makes it available
in-game, and also makes all chat content available to the end-game
dialog.
2014-09-26 07:18:33 +02:00
Matthijs Benschop
534f6c5a33 Prevent player name from becoming part of a formatting string.
fixes #6524
2014-09-21 10:01:40 +02:00
Matthias Mailänder
12876c23a2 fix tried logging to non-existant channel exception
closes #6168
2014-08-23 19:15:46 +02:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
Pavlos Touboulidis
b88b87b899 Improve game loop
Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
2014-07-10 04:06:29 +03:00
Paul Chote
802b6a652c Revert "new PauseState to differentiate game and editor pausing"
This reverts commit d1e18cad7a.
2014-07-08 10:42:00 +12:00
Matthias Mailänder
d1e18cad7a new PauseState to differentiate game and editor pausing 2014-07-06 08:24:08 +02:00
Paul Chote
a256e722d5 Remove conversions between legacy and world types. 2014-06-27 23:30:41 +12:00
Paul Chote
2af123034d Use ExtraData for SetStance and SetUnitStance. 2014-06-26 23:14:13 +12:00
Paul Chote
7d24053f52 Introduce Order.SuppressVisualFeedback to cleanly disable flashes. 2014-06-26 23:14:13 +12:00
Paul Chote
bc92bc1774 Merge pull request #5649 from Mailaender/upnp-polish
Made the Mono.NAT integration more robust
2014-06-21 01:31:33 +12:00
Paul Chote
50d3929862 Merge pull request #5616 from RoosterDragon/syncreport-simplify
Rewrite SyncReport for clarity and performance
2014-06-17 22:54:48 +12:00
Matthias Mailänder
1f7b0ad5d4 time limit the port forwarding if possible 2014-06-16 16:42:06 +02:00
Matthias Mailänder
a8c029f130 check if we really found a UPnP compatible NAT device 2014-06-16 16:35:33 +02:00
Matthias Mailänder
4d2412f4b8 this can't throw 2014-06-16 16:34:44 +02:00
Matthias Mailänder
d25fd654bc NatUtility.DeviceLost is never fired 2014-06-16 16:33:57 +02:00
Matthias Mailänder
db319f8f0b this will never happen 2014-06-16 16:33:16 +02:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
RoosterDragon
6f5fbeceb1 Use expressions to generate fast member access code rather than using the slower reflection based methods. 2014-06-12 08:32:26 +01:00
RoosterDragon
3e24e89477 Rewrite SyncReport for clarity and performance.
- Drop the impressive but inscrutable dynamically generated code in favour of some plain old code.
- Cache type information so costly reflection need not be performed each time.
- Only capture values from a sync object into an array rather than a dictionary lookup of both names and values for efficiency.
- Throw if the sync attribute is used on a property that cannot be read or that uses index parameters.
2014-06-12 08:30:27 +01: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
Chris Forbes
5eb61dbdd2 Merge pull request #5411 from RoosterDragon/general-clean
General Cleanup
2014-05-25 11:03:03 +12:00
Pavlos Touboulidis
5a286ef15e Fix #5414 2014-05-23 19:08:45 +03:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +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
WolfGaming
00698cefff Added in code for Tech Levels using prereqs
and fixed up some kinks of the old system
2014-05-19 03:29:25 +00:00
Matthias Mailänder
86271c3dd1 use List<MiniYamlNode> instead of System.Text.StringBuilder
add Deserialize methods for everything in Network.Session
2014-05-15 11:36:24 +02:00