Commit Graph

289 Commits

Author SHA1 Message Date
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
Matthias Mailänder
c7fad3a693 StyleCop and TODO 2014-05-15 10:04:21 +02:00
Matthias Mailänder
f68a6bbd76 split latency from Client into ClientPing
closes #4282
2014-05-15 10:04:21 +02:00
Matthias Mailänder
f365f9da2b split lobby SyncInfo order into smaller chunks
closes #4594
2014-05-15 10:04:03 +02:00
Oliver Brakmann
63f4a0646f Fix build palette showing too many queued items when BuildLimit is reached
When a BuildLimit on an actor type is set and nearly reached, you could
shift-click the build palette and it would show it had five more items
queued when really less are allowed to be built. This fixes it so that
only the allowed number of items is enqueued, and thus showing the
correct number on the build palette.
2014-04-26 16:27:02 +02:00
Matthias Mailänder
ab3dc92554 only add bots when the map allows it
fixes #5110
2014-04-20 14:58:57 +02:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
fcb3d7347a Kick clients who don't have the map when the host force-starts. 2014-03-21 23:33:14 +13:00
Paul Chote
538a25ae6c Fix replays for network games. Fixes #4866. 2014-03-18 20:37:10 +13:00
Paul Chote
2106393122 Simplify the server browser code. 2014-03-16 21:46:00 +13:00
Paul Chote
4c4783262f Simplify the replay browser code. 2014-03-16 21:45:59 +13:00
Paul Chote
c30b18a9d6 Introduce MapCache and MapPreview for improved UI map previews. 2014-03-16 21:45:59 +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
39484bdd45 Move order lag change announcements to server.log 2014-02-24 13:33:04 +13:00
Matthew Uzzell
c6b0e37f7e updated the AllowSpectate variable to be AllowSpectators
added KickSpectatorsLogic for a confimation of kicking spectators & changed the toggle buttons to be a checkbox
2014-02-22 21:55:35 +00:00
Matthew Uzzell
88121b272d edited the LobbyLogic to include a spectator toggle in the server admin dropdown. 2014-02-22 21:55:34 +00:00
Paul Chote
06be4d3efd Catch IOExceptions in Connection.cs. Closes #4083. Closes #4423. 2014-01-31 15:41:32 +13:00
Igor Popov
9d9807b23a cleanup 2014-01-28 11:02:23 +04:00
Paul Chote
6d6d1e230b Remove runtime mod merging. Closes #3421. 2013-11-15 09:54:42 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
bb8f4494f5 Merge pull request #3938 from Mailaender/game-id
Added a Game ID and print it to syncreport.log
2013-10-17 22:51:27 -07:00