- Extract an enum for edges rather than using magic numbers for everything.
- Remove duplicated code between FoggedEdges and ShroudedEdges by hosting the visibility function into a delegate.
- Make minimap methods more readable.
- Tidy formatting.
- Make some fields readonly.
- Remove unused usings.
- Refactored PerfTimer to use less memory.
- Avoid using the PerfTimer in highly called methods DoTimed and RunActivity, instead tracking long ticks manually to reduce overhead and avoid memory allocations.
- Added some helper methods in PerfTimer to output information when a tick takes too long.
- Changed PerfTimer logging to output the time at the start of the line, and no longer truncate output per line.
- Settings.LongTickThreshold changed from TimeSpan to float and renamed to LongTickThresholdMs.
* Use Pair instead of KeyValuePair
* double -> var
* Butcher XML comments
* Change WinState default to Undefined and use it instead of the new GameOutcome
* Other changes
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.
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.
This is useful to ignore fast operations that just spam the log.
The class had to be reworked because it couldn't properly handle cases
where all of a node's children where below the threshold.
Also changed DoTimed() and RunActivity() to use PerfTimer.
This introduces a hash on Shroud which ShroudRenderer
can observe, removing the need to explicitly twiddle
a dirty flag between objects.
Shroud disabling is now done via RenderPlayer, so
enabling the cheat or winning/losing will now give
vis equivalent to an observer.
- Each player has their own shroud and their visibility does not extend outside of the shroud.
- Units and buildings can no longer target other units outside of their visibility. Buildings can still be targetted if they have been explored.
- GPS will provide visibility in the fog-of-war.
- Spies that infiltrate radar domes will gain their victim's exploration and reset it on all clients (if the victim does not have GPS)