Commit Graph

3943 Commits

Author SHA1 Message Date
RoosterDragon
69c409c20d Speed up depth sorting of renderables.
The OrderBy overload that takes an int generating key selector is faster than the one that requires a custom comparer. We extract a function from the ScreenZPosition function that determines the Z position of a WPos with an offset, but does not account for the tileset height. For the ordering function this is fine as only the relative magnitude of the comparison keys matter, so we don't need to spend time adjusting for the tileset height, as that won't affect the sort.
2015-01-07 18:22:38 +00:00
RoosterDragon
7cfece6dc0 Introduce a new type for representing map coordinates.
To resolve the ambiguity introduced when the introduction of isometric maps meant that cell and map coordinates were no longer equivalent, a new type has been introduced so they can each be represented separately.
2015-01-07 17:30:34 +00:00
Igor Popov
40c9d0a47d Merge pull request #7275 from RoosterDragon/formatting
Formatted all files.
2015-01-07 13:56:04 +03:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
RoosterDragon
dc4d522967 Cache render related TraitsImplementing calls in Actor.
The TraitsImplementing<T> performs a dictionary lookup to match up its generic type parameter with the right trait collection. Since actors are rendered so much, it is useful to cache this result to avoid looking it up repeatedly.
2015-01-05 21:05:19 +00:00
RoosterDragon
2c34358372 Avoid initialization of graphical elements for a server.
Avoid allocating memory and resources for graphical elements that will never be drawn when starting a dedicated server. This reduces the server memory footprint by approx 17 MiB.
2015-01-04 19:22:41 +00:00
Oliver Brakmann
58dc61e6ed Merge pull request #7262 from RoosterDragon/actormap-partitioning
Fix ActorMap spatial partitioning to actually work.
2015-01-04 18:48:01 +01:00
Matthias Mailänder
9d2f33d42c add a World type 2015-01-04 17:57:38 +01:00
Oliver Brakmann
302cf44f5a Merge pull request #7267 from atimoschenkow/fix-selection-after-radar
Selection rectangle is drawn after exiting radar widget while dragging the viewport
2015-01-04 17:23:08 +01:00
atimoschenkow
831f19e993 A selection box is drawn if the mouse exits the radar widget while dragging the viewport.
These changes prevent this side effect.
2015-01-04 17:06:50 +01:00
Oliver Brakmann
75808c365a Merge pull request #7269 from abcdefg30/general-polish
Some general polish
2015-01-04 16:54:37 +01:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
abcdefg30
4fed02cd74 Make health bars 2 pixels shorter 2015-01-04 13:07:55 +01:00
abcdefg30
f2e224dd72 Fix a crash in RemoveProximityTrigger 2015-01-04 13:06:06 +01:00
RoosterDragon
a0737ccbf3 Fix ActorMap spatial partitioning to actually work.
The bin partitioning in ActorMap worked by dividing the map up into a few chunks of cells, each of which would contain some actors. Unfortunately, the bins were accessed directly in world coordinates which are on a scale 1024x greater than cell coordinates. This lead to all actors being placed into the bottom right bin. When checking for actors in a box, only this bottom right bin would be iterated for actors. Thanks to the fact this bin indeed contained all the actors, some clamps on the input ranges and filtering required per bin anyway, this actually returned correct results. Effectively, it was as if there was no spatial partitioning at all.

Not surprisingly however, this is fairly inefficient. By correcting the spatial partitioning to actually partition we see a 7x speedup in ActorsInBox on the RA shellmap.
2015-01-04 02:35:16 +00:00
Matthias Mailänder
44cd174a8d StyleCop clean OpenRA.Game 2015-01-03 19:00:48 +01:00
Oliver Brakmann
30e42cdc62 Merge pull request #7247 from Hellhake/stylecop-game
Fix StyleCop warnings in OpenRA.Game
2015-01-02 12:58:04 +01:00
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
Matthias Mailänder
f093de98b6 Merge pull request #7238 from Mailaender/server-cpu-fix
Fixed high CPU usage due to Socket.Select not blocking the thread properly when the game started
2015-01-01 10:53:40 +01:00
asl97
d2a14842d8 avoid a busy server loop with high CPU usage
fixes #7237
2014-12-31 19:46:39 +01:00
Matthias Mailänder
714233d72e Merge pull request #7220 from obrakmann/d2k-worm-option-and-maps
Add worms to d2k maps and add lobby option to disable them
2014-12-31 13:03:37 +01:00
RoosterDragon
fdcfb30011 Improve YAML parse time.
Stream lines to avoid needing to load the whole file first, and avoid a LINQ Contains call when string.IndexOf will be much faster.
2014-12-30 18:17:32 +00:00
Oliver Brakmann
de0a62eb42 Add a lobby option to control spawning creeps (viceroids/worms)
The lobby option is only exposed in d2k currently, not in TD or TS.
2014-12-28 19:26:39 +01:00
Paul Chote
d9752c3bdf Make production type hotkeys configurable. 2014-12-28 17:24:12 +13:00
Matthias Mailänder
962d8fe74f fetch Mono.Nat from nuget 2014-12-26 15:40:06 +01:00
Oliver Brakmann
0a68db5dfa Merge pull request #7187 from pchote/allmods
Show games from all compatible mods in the server browser.
2014-12-25 23:22:05 +01:00
Paul Chote
2cdcd0f590 Don’t crash if a replay can’t be loaded. 2014-12-26 08:48:37 +13:00
Paul Chote
91807cb53c Remove redundant StyleCop definitions. 2014-12-25 10:10:57 +01:00
Paul Chote
3086cc6154 Disable SA1024 and SA1035.
These rules generate many false positives, and do not help with code readability within OpenRA.
2014-12-25 10:10:57 +01:00
Paul Chote
568a23e395 Show all mods in the server browser. 2014-12-25 09:46:14 +13:00
Paul Chote
199f80c8ed Cache GameServer joinable/compatible state across render frames. 2014-12-25 09:46:14 +13:00
Oliver Brakmann
39d13dc654 Merge pull request #7121 from pchote/switchmods
Add Launch.Connect command and on-connect mod switching.
2014-12-24 16:06:00 +01:00
Paul Chote
6923046564 Expose the cursor mode setting. 2014-12-23 22:09:22 +13:00
Paul Chote
1317101662 Add support for hardware cursors. 2014-12-23 22:09:22 +13:00
Paul Chote
75b046ae2a Reorganize cursor plumbing in preparation for hardware cursors. 2014-12-23 22:09:22 +13:00
Paul Chote
202247cf6a Include no-extension workaround for FrameCache too. 2014-12-23 22:09:22 +13:00
Paul Chote
380b0e1561 Capitalise cursor properties. 2014-12-23 22:09:21 +13:00
Paul Chote
dc211cc729 Fix an unrelated editor regression. 2014-12-23 10:00:23 +13:00
Paul Chote
96b5b1fc66 Automatically switch mods when connecting to a server / replay. 2014-12-23 09:20:21 +13:00
Paul Chote
660f6682ff Add Launch.Connect parameter for launching directly to a server. 2014-12-23 09:20:21 +13:00
Paul Chote
7bfffeadc2 Simplify mod content installation plumbing. 2014-12-23 09:20:21 +13:00
Paul Chote
ec7a32184e Move the mod-level initialisation code back into the load screen. 2014-12-23 09:20:19 +13:00
Paul Chote
2ed594fd86 Introduce map Visibility field.
This replaces the Selectable, UseAsShellmap, and special-cased Type = "Mission" fields.
2014-12-23 09:08:00 +13:00
Paul Chote
b4c9c19cce Don’t crash when saving automatically-upgraded maps. 2014-12-23 09:08:00 +13:00
Paul Chote
14deb1efdf Drop support for map format 5. 2014-12-23 09:08:00 +13:00
Matthias Mailänder
711a1ca5fc Merge pull request #6830 from RoosterDragon/dispose-renderer-resources
Closes #5116
2014-12-22 19:59:41 +01:00
Matthias Mailänder
ea410d0688 Merge pull request #7096 from ScottNZ/countries
Closes #5928
2014-12-22 19:20:43 +01:00
RoosterDragon
b28d999131 Made SheetBuilder rely on global settings rather than global renderer.
Additionally exposed an InitializeSettings method on game to initialize the global settings so that other classes can set up all the secret dependencies on the global settings required.
2014-12-22 17:39:19 +00:00
RoosterDragon
9cbac2d5e1 Clean up style of files affected by the last commit. 2014-12-22 17:34:02 +00:00