Commit Graph

3961 Commits

Author SHA1 Message Date
Paul Chote
dcfc62f333 Move InstallUtils from Game to Mods.Common. 2015-03-07 10:02:43 +00:00
Paul Chote
2de91a4c4e Convert ContentInstaller into a manifest module. 2015-03-07 10:02:42 +00:00
Paul Chote
5552000d69 Allow mods to define custom manifest metadata. 2015-03-07 10:02:42 +00:00
Matthias Mailänder
3bb448b29b warn before loading incompatible replays 2015-03-07 10:06:17 +01:00
DeadlySurprise
1a2e8d56d1 Fixed radar not showing move/attack cursors 2015-03-06 14:30:45 +01:00
Paul Chote
8c4ea20636 Merge pull request #7430 from Rydra/upstream/pf-optimized
[Discussion PR] Complete refactor of Pathfinder
2015-03-03 19:50:25 +00:00
David Jiménez
54ae572303 - Introduced Unit Testing capabilities to the PathFinder trait and algorithm.
Introduced also a small Unit test project to prove it.

- Separated caching capabilities from PathFinder class to increase cohesion and maintainability.
Refactored the pathfinding algorithm by extracting methods based on responsibilities like
calculating costs and reordering functions. These changes should provide a in average a small increase in
pathfinding performance and maintainability.

- Optimized the pathfinder algorithm to reuse calculations like the
MovementCost and heuristics.

- Introduced base classes, IPathSearch and IPriorityQueue interfaces,
and restructured code to ease readability and testability

- Renamed the PathFinder related classes to more appropriate names. Made the
traits rely on the interface IPathfinder instead of concrete PathFinder
implementation.

- Massive performance improvements

- Solved error with harvesters' Heuristic

- Updated the heuristic to ease redability and adjustability. D can be
adjusted to offer best paths by decreasing and more performance by
increasing it

- Refactored the CellLayer<CellInfo> creation in its own Singleton class

- Extracted the graph abstraction onto an IGraph interface, making the
Pathfinder agnostic to the definition of world and terrain. This
abstraction can help in the future to be able to cache graphs for similar
classes and their costs, speeding up the pathfinder and being able to feed
the A* algorithm with different types of graphs like Hierarchical graphs
2015-03-03 20:11:11 +01:00
Paul Chote
b968b527d2 Allow map players to use non-selectable races. 2015-03-03 18:45:46 +00:00
Paul Chote
44159ecdd6 Add support for race-specific actor sequences. 2015-03-02 20:46:24 +00:00
Paul Chote
00a2146299 Adjust GetImage plumbing in preparation for race-specific sequences. 2015-03-02 20:46:24 +00:00
Bynnar18
0abe8f9b2b Fixes issues with support powers and adds property to all IOrderGenerator classes to determine priority over selection in the left-click order scheme. 2015-03-01 14:58:19 -06:00
Bynnar18
7b46b76329 Fixed left-click orders and implemented a selection deadzone. 2015-03-01 14:58:19 -06:00
Bynnar18
36d59d6b1d Restored faulty left-click logic for now. 2015-03-01 14:58:18 -06:00
Pavel Penev
67cee6324c Merge pull request #7511 from obrakmann/vqaplayer-no-mouse
Prevent VqaPlayerWidget from eating the radar bin's mouse input
2015-02-26 23:14:26 +02:00
Oliver Brakmann
4beef806d6 Merge pull request #7521 from delftswa2014/bugfix/cheatfix
Forgot shroud on all-cheat
2015-02-25 23:35:00 +01:00
pevers
6d716d301a DisableShroud cheat now properly disables after disabling the all-cheat
Smaller code base

Added newline

Added newline between assignment and statement

fixed spacing

fixed spacing

fixed spacing
2015-02-23 21:19:07 +01:00
RoosterDragon
d4421f0a41 Fix some broken Stream.Read calls.
Change callers of this method to use the ReadBytes extension method that ensures the requested amount of bytes are consumed.

Also tighten argument validation.
2015-02-23 19:40:16 +00:00
David Jiménez
8659a3e71e Introduced the interfaces IActor, ICacheStorage, ILog, IMap, IWorld a
nd IMobileInfo to separate concrete implementations and abstractions
2015-02-22 23:14:12 +01:00
Oliver Brakmann
293ec6577b Merge pull request #7507 from delftswa2014/bugfix/cheatfix
Fixed all cheat code
2015-02-22 15:10:17 +01:00
pevers
3f1db45ea6 changed all cheat to really enable everything on call
added givecash to the all cheat

fixed spacing

fixed spacing
2015-02-22 14:43:42 +01:00
Matthias Mailänder
361c1bc010 Merge pull request #7483 from pchote/deadbuildingstate
Fix missing first animation frame and remove DeadBuildingState.
2015-02-21 14:00:23 +01:00
Pavel Penev
20ca9b2ab1 Merge pull request #7486 from delftswa2014/bugfix/apcbibs
Fixed #7472 so that cargo is only shown on allied vehicles
2015-02-21 02:08:41 +02:00
Pavel Penev
293bb78a3c Merge pull request #7457 from pchote/actorpreviews
Introduce ActorPreviewWidget (and other related changes).
2015-02-21 01:35:03 +02:00
Oliver Brakmann
10f0c83270 Prevent VqaPlayerWidget from eating the radar bin's mouse inputs 2015-02-20 22:44:37 +01:00
RoosterDragon
4d5101a7c4 Vastly improve shroud rendering performance.
Changes in the shroud are now tracked. If a cell changes it will mark itself and its neighbors as dirty. During the render phase all dirty cells will have their vertices calculated and cached. If a cell is not dirty, the pre-calculated vertices are retrieved from cache. Then the sprite renderer is provided the sprite and the pre-calculated vertices to draw.

This prevents constant recalculation of vertices for the shroud in the render phase, requiring instead only dirty cells in the visible area. The update phase is reduced to a practical noop, instead incurring the cost only of changed cells each frame, rather than checking the visible area.
2015-02-20 20:03:42 +00:00
Paul Chote
df7588f1bc Merge pull request #7488 from RoosterDragon/trait-remove-perf
Speed up TraitContainer.RemoveActor.
2015-02-20 17:45:40 +00:00
Paul Chote
1a6de9a03c Merge pull request #7374 from DeadlySurprise/cashOverflowFix
Added a check for overflowing player credits
2015-02-20 17:24:57 +00:00
Paul Chote
e9caf7f6e6 Initialise frame time when playing a new sequence.
Fixes #3706, #6389.
2015-02-20 16:54:04 +00:00
pevers
329d610577 Fixed #7472 so that cargo is only shown on allied vehicles
fixed spacing

pips are shown on every team when shroud is disabled

removed comment

Remove unwanted comment explaining how ally-detection works

fixed the real problem in RenderAfterWorld
2015-02-19 21:09:37 +01:00
DeadlySurprise
7b53582c5e Implemented Floating Text and radar video 2015-02-18 14:38:30 +01:00
RoosterDragon
a3898db660 Speed up TraitContainer.RemoveActor.
Use the binary search invariant of the lists to find the actor quickly and remove the range of entries from the list in a single operation to avoid redundant copying otherwise caused by removing entries one by one.
2015-02-17 00:02:43 +00:00
penev92
9664e32005 Merge pull request #7424 from RoosterDragon/minor-alloc
Avoid some memory allocations
2015-02-16 20:20:40 +02:00
Oliver Brakmann
de16d29aa6 Merge pull request #7445 from jwbuurlage/bleed
Fixes #7219. In addition, sets cursor corresponding to the order with hi...
2015-02-14 12:22:34 +01:00
Taryn Hill
5349c69307 Merge pull request #7467 from ScottNZ/stylecop-fixes
Brace style fixes.
2015-02-12 07:54:10 -06:00
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13:00
Paul Chote
aa550790e5 Merge pull request #4528 from Mailaender/mime
Registered Linux MIME type to directly load replays
2015-02-12 11:21:37 +00:00
Paul Chote
1af61c92c5 Split SpriteRenderable into its own file. 2015-02-10 17:47:49 +00:00
Paul Chote
8d51fb0e66 Use ActorPreviewWidget for the color pickers. 2015-02-10 15:22:42 +00:00
Paul Chote
268ca94dc1 Introduce ActorPreviewWidget. 2015-02-10 15:22:42 +00:00
Paul Chote
db1a27b071 Introduce IFinalizedRenderable.ScreenBounds. 2015-02-10 14:26:44 +00:00
Paul Chote
c55d723fb4 Remove Scale from IRenderable interface.
It is no longer used, and isn’t implemented for most renderables.
2015-02-09 23:26:06 +00:00
Paul Chote
a495a2f528 Split IFinalizedRenderable from Renderable to remove mutable structs. 2015-02-09 23:23:37 +00:00
Jan-Willem Buurlage
7eb2106375 Change cursor according to the command with highest priority. 2015-02-08 22:38:05 +01:00
RoosterDragon
b4993efff1 Avoid some minor allocations.
- Don't call string.Format in Actor.ToString since it gets called often, instead prefer a simple concat.
- In HiddenUnderFog.IsVisible, avoid a needless level of lambda indirection.
2015-02-02 21:16:14 +00:00
RoosterDragon
7e28acadd8 DrawPanelPartial now specifies each sprite as an individual parameter.
This allows some array allocations to be avoided, and makes the code more obvious since each sprite is referred to by name rather than an array index.
2015-02-02 21:16:14 +00:00
Matthias Mailänder
595c792879 remove the unused movie lists 2015-02-01 18:53:50 +01:00
DeadlySurprise
4f07de2af8 Added a check for overflowing player credits 2015-02-01 13:28:47 +01:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
Matthias Mailänder
034c071fbc Merge pull request #7382 from Mailaender/stylecop-plus
Added support for StyleCop+
2015-01-25 23:58:42 +01:00
Paul Chote
27a3a1e974 Merge pull request #7383 from obrakmann/fix7379_invalid_debug_channel
Fix wrong log channel name: Debug -> debug
2015-01-26 09:20:10 +13:00