Commit Graph

54 Commits

Author SHA1 Message Date
abcdefg30
fe5754e2bd Change the parameters of ICrushable.CrushableBy 2016-02-14 18:51:59 +01:00
abcdefg30
8b59ce4dc2 Add a new INotifyCrushed interface 2016-02-14 18:51:56 +01:00
RoosterDragon
7fe42d7493 Fix mobility checks when we aren't checking a realized actor. 2016-02-06 22:18:30 +00:00
RoosterDragon
4b308dee02 Remove checks for self being null in Mobile.cs. 2016-02-05 22:11:11 +00:00
reaperrr
75d066d6af Fix Mobile using legacy CenterPosition.Z check 2016-01-29 22:26:52 +01:00
teees
cb3be2cd0d Fix units visually moving to a bogus subcell via MoveIntoWorld 2016-01-27 12:01:37 +01:00
teees
65e1e301f4 Added Gates
FIXUP: account for full gate footprint when updating neighbours.

FIXUP: gate-wall connection adjacency yaml.
2016-01-25 09:14:00 +01:00
Paul Chote
0039a2bdbf Split out an ActivityUtils class. 2016-01-19 23:34:13 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Paul Chote
3b18c7815d Remove Util.GetFacing. 2016-01-16 22:38:17 +00:00
RoosterDragon
b0619a3e25 Added comments in performance sensitive code. 2015-12-13 16:24:54 +00:00
RoosterDragon
4ed5a24bbe Merge pull request #10118 from pchote/rework-order-targets
Rework order targeting crazyness.
2015-12-10 20:09:57 +00:00
atlimit8
c827dbe183 Replace IDisableMove with upgradability 2015-12-04 19:26:49 -06:00
atlimit8
0fc04b7a4a Make Mobile upgradable 2015-12-04 19:22:23 -06:00
Paul Chote
373bfefc6c Only support move orders against terrain targets. 2015-11-26 18:38:10 +00:00
Paul Chote
124c0ea041 Make CanTarget modifiers a ref parameter. 2015-11-16 20:38:53 +00:00
atlimit8
7352290c94 Move SpawnActorOnDeath to OpenRA.Mods.Common & fix spawned death actor teleportation 2015-11-05 00:55:29 -06:00
reaperrr
2f69711341 Rename ActorMap *UnitsAt* occurences to *ActorsAt*
These enumerate actors in general, not just mobile actors (which the term 'unit' usually refers to).
2015-10-16 00:07:06 +02:00
Nolt
7994d08702 Create #9435 DisableMovementOnUpgrade, rename DisableUpgrade to DisableOnUpgrade and Fixed not showing the blocked move cursor when movement is disabled. 2015-09-28 21:32:00 -03:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -05:00
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
RoosterDragon
0739fc80a3 Cache the speed modifiers enumerable, not just the traits, in Mobile. 2015-08-31 20:45:34 +01:00
RoosterDragon
be59d045ce Only enumerate crushable traits once in MobileInfo.IsBlockedBy. 2015-08-31 20:45:25 +01:00
RoosterDragon
ac1658c9ce Refactor movement cost method to avoid repeated terrain information lookups.
As the world tileset is fixed, the pathfinder can look up the terrain information for that tileset on creation. This is implemented by the WorldMovementInfo struct. When calculating node costs, this allows the pathfinder to avoid having to repeat this expensive dictionary lookup on every node.
2015-08-31 20:43:18 +01:00
RoosterDragon
3d94c4b216 Minor formatting fix in Mobile.cs. 2015-08-18 22:03:14 +01:00
RoosterDragon
7eab7220ff In CanMoveFreelyInto, check if transient actor checks are needed at the start.
When transient actors checks are not needed, all control flows in the method return true. Therefore, we can return true directly in this case. Checking this condition is cheaper than checking for a free sub-cell, so this allows us a faster exit when we don't need to check for transient actors.
2015-08-18 22:03:13 +01:00
RoosterDragon
ca75b5af30 Factor logic for determining if an actor blocks movement into IsBlockedBy. 2015-08-18 22:03:11 +01:00
RoosterDragon
6414743f8e Introduce HasCellCondition to avoid HasFlag overhead. 2015-08-18 22:03:09 +01:00
Taryn Hill
6fa1f757b0 Add Map.DistanceAboveTerrain(WPos) and Actor.IsAtGroundLevel() extension method 2015-08-01 11:48:47 -05:00
Matija Hustić
72e8e08f48 Step in the direction of RA2 paratroopers. 2015-07-14 20:39:06 +01:00
Oliver Brakmann
9415ced6ff Merge pull request #8664 from Mailaender/unduplicate-mobile
Removed code duplication from Mobile.cs
2015-07-13 22:17:37 +02:00
atlimit8
1bcc07ce69 Add property requirements to safe traits 2015-07-12 12:44:30 -05:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
Matthias Mailänder
3f38d063a9 remove code duplication 2015-07-06 11:06:55 +02:00
Matthias Mailänder
50e5e9df24 check voice actor references 2015-06-20 12:09:58 +02:00
penev92
fcd9906683 Make speedModifiers Lazy 2015-05-31 00:24:12 +03:00
Paul Chote
9e5e1f1a89 Add methods to IOccupySpaceInfo. 2015-05-15 17:08:31 +01:00
David Jiménez
044b51742f Remove plumbing for trait unit tests. 2015-05-01 16:24:14 +12:00
RoosterDragon
500a33b590 Cache some trait lookups that occur frequently. 2015-04-25 20:41:49 +01:00
Taryn Hill
4ed53c5952 Simplify return statements.
Remove redundant ‘this’.
Remove unused using directives.
Simplify LINQ chains.
Add some trait property descriptions.
Add readonly where viable.
Add fullstops to some yaml descriptions.
2015-04-01 12:33:17 -05:00
RoosterDragon
1515ac54f6 Enforce a line length limit. 2015-03-19 17:20:34 +00: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
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
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
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13: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
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00