Commit Graph

1010 Commits

Author SHA1 Message Date
Taryn Hill
fcb2141132 EmitInfantryOnSell now checks a Races string[] against the seller’s race. 2015-03-14 15:54:26 -05:00
Oliver Brakmann
863db5a42c Merge pull request #7640 from Phrohdoh/rand-dmg-sounds
SoundOnDamageTransition to use string[].
2015-03-14 12:39:20 +01:00
Taryn Hill
1e0612ddf0 Change SoundOnDamageTransition to randomly select
from a string[] instead of a single string.
2015-03-12 16:09:11 -05:00
Taryn Hill
602de0ea13 Fix NRE caused by checking the RampType of a tile in #7645. 2015-03-12 09:11:51 -05:00
Matthias Mailänder
fa4f43b750 account for initial health 2015-03-11 23:18:03 +01:00
Taryn Hill
a744900e74 Mark ramp/slope tiles as unbuildable. 2015-03-11 16:30:55 -05:00
Taryn Hill
51e470e64c Add some documentation to support powers. 2015-03-10 00:13:24 -05:00
Oliver Brakmann
190d197613 Merge pull request #7544 from delftswa2014/bugfix/sam_site_friendlyfire
Friendly fire fixes and sam sites
2015-03-08 16:16:14 +01:00
penev92
4a5b3b59ed Properly remove worms from the world 2015-03-08 15:01:40 +02:00
penev92
58ab28206f Fix multiple notifications in multiplayer bug 2015-03-08 15:01:38 +02:00
penev92
1261fd1b07 Increase NotificationInterval to 30 seconds 2015-03-08 15:01:36 +02:00
pevers
17fec82348 fixed taking over sam/pillbox/etc. to stop firing
fixed issue with powered down samsites

more optimization

very small optimization

undo changes to powerdown samsite fixes

refixed powered down sam sites

removed debug line

redid the fix in another approach by queueing a sell activity on the top of the queue. This was already present but didn't always work

fixed line I removed

prevented attack activity to be queued when actor is disabled

another style fail of me

reverse and queueactivity activities are now executed on top of the queue for a sell action
2015-03-04 18:13:33 +01:00
Taryn Hill
d6da7d54e4 Make Exit’s descs more informative. 2015-03-04 09:15:09 -06: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
b7a98c8eb7 Document the other Transforms trait properties. 2015-03-03 18:45:45 +00:00
Paul Chote
59d06a22bf Change "Cannot deploy here" to a notification. 2015-03-03 18:45:44 +00:00
Paul Chote
7b27b803f9 Allow actors to force a specific race variant. 2015-03-03 18:45:44 +00:00
Paul Chote
d1ed1bf0fb Set actor race (and icons) based on active producer. 2015-03-03 18:45:44 +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
Paul Chote
f606a1bfd7 Use a consistent set of arguments for Render* ctors. 2015-03-02 20:46:23 +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
Oliver Brakmann
92101a1393 Merge pull request #7487 from abcdefg30/changealtitude
Change the plane altitude in ra
2015-02-28 19:49:39 +01:00
RoosterDragon
d3b93345b4 Fix Viewport.VisibleCells.
Reworked the visible cells calculation to ensure the visible region is actually minimal, which should reduce the amount of rendering to be done by a small amount. Previously, the region would tend to overdraw by 2-3 cells in either direction. For isometric maps, there was also a bug where it would draw far too much vertically above the top of the map.
2015-02-28 13:36:58 +00:00
RoosterDragon
803390c68e Speed up rendering map border shroud when no shroud is visible.
When the map border shroud must be rendered, but no cells at the border are visible, then we know that no shroud will be visible at all. We can bail from rendering early in this case.
2015-02-27 20:07:32 +00:00
RoosterDragon
6baa35a763 Adjust DisabledOverlay.ModifyRender to be more efficient.
When not disabled, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is disabled, then the modifying enumerable has one less condition to check inside the loop.
2015-02-26 21:58:29 +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
02c4ace0af Change default facing to 0 2015-02-22 16:25:40 +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
293bb78a3c Merge pull request #7457 from pchote/actorpreviews
Introduce ActorPreviewWidget (and other related changes).
2015-02-21 01:35:03 +02: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
f2087de9bd Remove DeadBuildingState.
Fixes #3422, #3522, #5136.
2015-02-20 16:56:46 +00:00
Paul Chote
63e9cd4c9c Remove DeadBuildingState from TD. 2015-02-20 16:54:04 +00:00
abcdefg30
adffd33f4d Don't repulse actors flying with another altitude 2015-02-18 22:06:31 +01:00
abcdefg30
6155928678 Don't display beacons in the air 2015-02-18 22:06:28 +01:00
Matthias Mailänder
38dbb3063b Merge pull request #7462 from obrakmann/fix7459_build_area
Fix extent of buildable area below structures
2015-02-16 22:04:03 +01: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
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13:00
Oliver Brakmann
7f4b62b7ee Fix extent of buildable area below structures
Restore use of GetBuildingAt to take bibs into account for buildable area, and only consult the actor map if the actor at that location is not a building.
2015-02-10 19:28:54 +01:00
Paul Chote
aa9db669e7 Fix ActorPreview turret facings. 2015-02-10 15:22:42 +00:00
Jan-Willem Buurlage
ce6c883fb1 Fixed #7219. Reduce boarding priority to resolve conflict with force-attacking own units. 2015-02-08 22:31:56 +01:00
penev92
494b600ed8 Move refinery and harvester logic to Mods.Common;
Remove unused interface IAcceptOreDockAction
2015-02-06 13:23:07 +02: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
Matthias Mailänder
5040baac9b Merge pull request #7415 from obrakmann/gdi05a
Add mission gdi05a
2015-02-01 18:49:27 +01:00
Oliver Brakmann
4aa97ec776 Allow support powers to start with a full charge when created 2015-02-01 15:49:45 +01:00
atimoschenkow
f2ae11f247 Adjust nudging for cases where no enterable cell is found
- Randomly select one of the occupied "non-stupid" cells
- Notify blockers in that cell
- Wait until it can be entered
- Move to cell
2015-02-01 14:57:10 +01:00