Commit Graph

41 Commits

Author SHA1 Message Date
atlimit8
e29b9edfc1 Changes to map.cs, rename IPositionable.IsLeaving{ => Cell}, add IPositionable.GetValidSubCell 2014-08-29 23:30:16 -05:00
atlimit8
63c28ee4d7 Refactored in new enum SubCell 2014-08-29 23:00:53 -05:00
atlimit8
9efcf231e1 Refactor MobileInfo.CanEnterCell 2014-08-29 23:00:53 -05:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
atlimit8
4b7537bb13 Moved MobileInfo.SubCellOffsets to Map (dropping static) & added Map.SubCellsDefaultIndex 2014-08-04 18:09:26 -05:00
atlimit8
43478dd500 enum SubCell => int & Dictionary<SubCell, WVec> => WVec[] 2014-08-04 18:09:26 -05:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
7b52fa52b6 Replace CPos.CenterPosition -> Map.CenterOfCell. 2014-06-27 23:30:40 +12:00
Paul Chote
78f8c94df8 Make PathDistance struct immutable. 2014-06-27 22:07:03 +12:00
Paul Chote
441971f6d7 Use CellLayer for pathfinding. 2014-06-27 22:07:03 +12:00
Paul Chote
97a61273dd Bring PathSearch in line with the current code style. 2014-06-27 19:20:46 +12:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
Pavlos Touboulidis
060d5326ed Move FindTilesInCircle from WorldUtils to Map 2014-06-13 14:24:53 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
20b88fd904 Remove World.FrameNumber. 2014-03-12 17:19:29 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
Paul Chote
68cd537c9b Rename DebugOverlay -> PathfinderDebugOverlay. 2013-10-14 21:16:46 +13:00
Paul Chote
0676116d77 Convert Move and related plumbing to world coordinates. 2013-07-21 17:35:45 +12:00
Paul Chote
c7c9b8710e Fix cached paths in PathFinder. Fixes #3557. 2013-07-14 17:08:36 +12:00
Andrew Aldridge
8287c5c872 Use static empty pathfinding path when possible 2013-07-12 09:43:35 -04:00
Andrew Aldridge
ba885907ba Use MobileInfo.GetMovementClass for domain indexing, clearing path for caching and smarter behavior
* Move DomainIndex from being a manual hard-coded hook in World to an IWorldLoaded trait.
2013-07-12 09:40:55 -04:00
Andrew Aldridge
6fb01c7ab8 Properly deal with FindUnitPathToRange
This fixes boats attacking land targets.
2013-07-12 09:37:01 -04:00
i80and
d4cead2187 Initial terrain domain work 2013-07-12 09:37:00 -04:00
Paul Chote
a263fd879d Account for sub-cell offsets in FindUnitPathToRange. Fixes #2417. 2013-07-10 21:23:30 +12:00
Matthias Mailänder
2abde381a7 Exposed PathSearch.owner and removed Player argument from PathFinder functions. 2013-03-10 07:33:31 +01:00
Matthias Mailänder
493eb10b96 Now coloring A* cells by owning player color. Added checkbox to cheats menu. 2013-03-10 07:33:25 +01:00
Matthias Mailänder
7d0de5645f Added QuadRenderer to render shaded/colored quads. Added DebugOverlay to World to show A* bidi search cost per cell. 2013-03-10 07:32:35 +01:00
James Dunne
ba1a36f26e Units heading in generally opposite directions are now considered blockers; this fixes pathing deadlocks. 2012-07-05 23:53:31 -05:00
James Dunne
9c9a16d80e Path planning no longer considers moving friendly units as blockers. 2012-07-05 23:52:34 -05:00
James Dunne
80123b6aa4 Many harvester behavior improvements; summary below.
Implemented Harvester territory marking with a simple resource claim system in ResourceClaimLayer trait added to World.
Added customCost for PathSearch to support new Harvester search preferences.
Explicit delivery order forces harvester to always deliver to that refinery.
Explicit harvest order frees harvester from forced delivery refinery and allows for auto-balancing.
Harvesters auto-balance refinery choice such that no more than 3 harvesters are linked to any one refinery at a time.
Harvesters try very hard to not block the refinery dock location.
Harvesters try to avoid enemy territory when searching for resources.
Group-select harvest order intelligently disperses harvesters around the order location.
Fixed PathFinder caching to not be a sliding window. This is a correctness issue. Sliding window causes no-route paths to be cached permanently in tight move loops and doesn't allow eventual progress to be made. This may have negative performance implications.
2012-06-24 20:26:00 -05:00
James Dunne
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
64b88819a9 Add plumbing to support ownership checks in MobileInfo.CanEnterCell. 2011-07-14 21:00:50 +12:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Chris Forbes
533df844d8 pool CellInfo[,] to save massive amounts of memory (now uses only 512K for CellInfos on default-sized maps) 2011-03-05 18:28:59 +13:00
Paul Chote
266e2717f5 Remove AvoidUnitsNear pathfinding heuristic (causes problems with crates and crushing). 2011-02-15 22:51:32 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Chris Forbes
9d768fa1c1 move some MobileInfo-related bits onto MobileInfo 2010-12-27 18:41:07 +13:00
Chris Forbes
3d47584cd8 use bidi pathing for moving into range (MoveToAdjacent-style hack) 2010-12-27 15:33:59 +13:00
Bob
0d9cf63dd2 move Mobile et al into Mods/ 2010-10-22 11:31:13 +13:00