Commit Graph

31 Commits

Author SHA1 Message Date
Paul Chote
850fcd5100 Fix a typo. 2014-07-19 18:03:21 +12:00
Paul Chote
5b0cee78cf Calculate a new path (and possibly new target cell) if the original path is blocked. 2014-07-19 18:03:21 +12:00
Paul Chote
e805461be7 Don’t cancel MoveAdjacentTo / MoveWithinRange when target becomes invalid.
Move to the last known position instead.  Fixes #5968.
2014-07-19 15:42:52 +12:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
97a61273dd Bring PathSearch in line with the current code style. 2014-06-27 19:20:46 +12:00
Paul Chote
afa3fc8143 Simplify MoveAdjacentTo pathfinding. 2014-06-15 22:48:44 +12:00
Paul Chote
64ab0a77a9 Added MoveWithinRange activity for Mobile units. 2014-06-15 22:48:43 +12:00
Paul Chote
40eff95a10 Simplify MoveAdjacentTo logic. Fixes #5445. 2014-06-01 10:58:44 +12:00
Paul Chote
d2fa1a12f9 Use DomainIndex to fix naval transport path perf. 2014-01-12 22:35:06 +13:00
Paul Chote
3cdeea009b Make MoveAdjacentTo aware of moving targets.
Units moving toward another actor (passengers, hijackers, etc) will now repath if their target moves.
Fixes excessive repathing if the target cannot be reached.
2014-01-12 22:09:11 +13:00
Paul Chote
c333b59eb9 Cache trait lookups in MoveAdjacentTo. 2014-01-12 22:09:11 +13:00
Paul Chote
bc5c11e44f Check ITargetable when deciding target validity. Fixes #3659. 2013-08-22 19:29:05 +12:00
Paul Chote
9eaeeffae9 CenterLocation.ToCPos() -> CenterPosition.ToCPos(). 2013-07-08 21:52:26 +12:00
Paul Chote
e76c746b61 Rewrite Enter and related activities.
The unit will now path to the nearest adjacent cell, drag inside, do the inner activity, then (if still alive) drag back to its original
location.

This fixes:
 - Mismatch in logic between Enter and MoveAdjacentTo,
   which causes an infinite loop.
 - Building capturing failing from certain directions.
 - Being unable to enter buildings on unpathable tiles.
 - Units being stranded inside a building if the requirements
   for the inner order aren't met.
2013-04-15 08:05:37 +12: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
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00
Chris Forbes
2bc260c833 move Activity from OpenRA.Traits.Activities namespace to OpenRA.Traits 2011-10-06 23:11:58 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
9480846250 remove spurious constructor from MoveAdjacentTo 2011-09-17 11:24:39 +12:00
Chris Forbes
a3818a6aa2 fix MoveAdjacentTo so it doesnt suck so much 2011-09-07 20:43:18 +12:00
Chris Forbes
663a323f29 remove trait lookup spam everywhere for IOccupySpace. 2011-08-13 15:01:41 +12:00
Paul Chote
2231940056 Harvesters harvest the cell in front of them; fix harvester target lines; split harvester activities into their own (correctly named) files. 2011-07-25 22:23:21 +12:00
Paul Chote
64b88819a9 Add plumbing to support ownership checks in MobileInfo.CanEnterCell. 2011-07-14 21:00:50 +12:00
Chris Forbes
702f787899 fix entering helicopters 2011-05-01 15:20:35 +12:00
alzeih
255bac6aff QueuedActivity's Insert is broken 2011-04-16 12:50:13 +12:00
Chris Forbes
40f6c4e332 clean up unnecessary junk from MoveAdjacentTo 2011-04-09 15:21:16 +12:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Paul Chote
4b3c6cc62a Add a SubCell field to UIM. Allow UIM to query for units by subcell. 2011-02-04 18:39:03 +13:00
Bob
0d9cf63dd2 move Mobile et al into Mods/ 2010-10-22 11:31:13 +13:00
Bob
6513bd5fe0 don't use Move directly 2010-10-22 11:10:32 +13:00
Bob
88a8d84153 use new Enter activity for engy, spy, c4 2010-10-21 20:58:07 +13:00