Commit Graph

100 Commits

Author SHA1 Message Date
Oliver Brakmann
59d22a2ff0 Fix AttackMove not working properly under certain conditions
This fixes the issue where AttackMove (and possibly other order modes) would not work properly when people were clicking their mouse buttons at the same time. A move order (the default order mode) would be issued instead.
2015-12-13 14:16:06 +01:00
Paul Chote
756bec69b3 Fall back to target cell if there are no valid orders against the target actor. 2015-11-26 18:37:40 +00:00
Paul Chote
fb99a1f3c2 Remove ActorMap query for each actor. 2015-11-26 18:30:43 +00:00
Paul Chote
7b31f18046 Reduce duplication in UnitOrderGenerator. 2015-11-26 18:25:39 +00:00
Paul Chote
124c0ea041 Make CanTarget modifiers a ref parameter. 2015-11-16 20:38:53 +00:00
Pavel Penev
a69f26b705 Fix players being able to manually attack invisible structures 2015-10-23 00:27:46 +03: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
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
deniz1a
ef143e5f8a Freezes map after game ends.
Adds newline.

Disables keyboard hotkeys for units after game ends.
2015-07-25 18:56:23 +03:00
Matija Hustić
34d0518b29 Fixed regression from last PR. 2015-06-21 20:15:06 +01:00
reaperrr
c23ee1be2e Remove Selectable boolean from Selectable trait
Add work-around for ta/td bridge huts since they need actor Bounds to
be targetable by C4/engineer repair.
2015-06-17 20:13:59 +02:00
Matthias Mailänder
8381fbd712 fix dereference after null check 2015-06-07 13:17:33 +02:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +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
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
Jan-Willem Buurlage
7eb2106375 Change cursor according to the command with highest priority. 2015-02-08 22:38:05 +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
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
RoosterDragon
7cfece6dc0 Introduce a new type for representing map coordinates.
To resolve the ambiguity introduced when the introduction of isometric maps meant that cell and map coordinates were no longer equivalent, a new type has been introduced so they can each be represented separately.
2015-01-07 17:30:34 +00:00
RoosterDragon
c37a691c33 Convert some keys users of CellLayer to index via map-coords for efficiency. 2014-12-20 23:39:03 +00:00
Paul Chote
f5c09121ad Remove buggy classic mouse orders. Closes #3153. 2014-11-15 09:40:25 +13:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
Paul Chote
0884722c4b Change IOrderGenerator.RenderAfterWorld to return Renderables. 2014-07-25 21:14:39 +12:00
Paul Chote
bcc32d15ed Fix frozen actors being targetable under shroud. Fixes #5979, #5978. 2014-07-19 12:56:52 +12:00
Paul Chote
9487f49cd5 Replace WPos.ToCPos -> Map.CellContaining. 2014-06-27 23:30:40 +12:00
Paul Chote
086ec07eb6 Add World parameter to Target.FromCell. 2014-06-27 23:30:40 +12:00
RoosterDragon
0ea3509ee4 Added MinBy, MaxBy, MinByOrDefault and MaxByOrDefault methods and replaced calls of the style OrderBy[Descending]().First[OrDefault]() which is not as performant. 2014-05-23 08:23:42 +01:00
Matthias Mailänder
05eae2c890 only use Self for internal self references 2013-11-02 18:03:55 +01:00
Matthias Mailänder
73750f5a7c StyleCop cleanup 2013-11-02 18:03:55 +01:00
Paul Chote
33f514001e Fix viewport-px / world-px confusion in ScreenMap. Fixes #3964. 2013-10-21 17:57:53 +13:00
Paul Chote
3ae75362bb Remove WorldUtils.FindFrozenActorsAtMouse. 2013-10-05 21:01:22 +13:00
Paul Chote
1ca9c90565 Add ScreenMap.ActorsAt(MouseInput) overload. 2013-10-05 21:01:21 +13:00
Paul Chote
dfd51c0caa Introduce ScreenMap trait for caching screen-coord queries. 2013-09-27 15:36:25 +12:00
Paul Chote
bc5c11e44f Check ITargetable when deciding target validity. Fixes #3659. 2013-08-22 19:29:05 +12:00
Paul Chote
3e605b1ee9 Add plumbing for issuing orders against frozen actors. 2013-08-12 21:34:18 +12:00
Paul Chote
c3bcca2ff7 Use selection priority when picking tooltip actor. 2013-08-11 22:23:53 +12:00
Paul Chote
e4d1c654ed Merge IOrderTargeter.CanTargetActor and CanTargetLocation. 2013-08-11 22:23:52 +12:00
Paul Chote
4754cbb768 Replace IOrderGenerator.RenderBeforeWorld with world-sorted .Render.
Range circles have been moved to RenderAfterWorld for now.
2013-08-11 00:25:54 +12:00
Scott_NZ
ac430bd3bc Add force-move 2013-05-18 17:52:36 +12:00
Paul Chote
e545865599 Add Selectable field to Selectable.
There are a bunch of bogus assumptions about
targetable actors being selectable. These aren't
easily fixed, so this add a Selectable field that
can be diabled for things we want to target, but
not select.
2013-04-15 08:06:52 +12:00
Matthias Mailänder
c5313375f0 pull mouse button preference from global property 2013-01-18 10:57:41 +13:00
Matthias Mailänder
d52394bb47 add classic left-click orders 2013-01-18 10:57:40 +13:00
Chris Forbes
220473bf74 remove duplication in UOG 2012-06-26 11:31:13 +12:00
James Dunne
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00
Chris Forbes
cebf908bb2 Fixed #2041 -- Force attack always targeted ground
Revert "Force attacks always go through, regardless of what is beneath them."

This reverts commit b2c72d6990.
2012-04-25 00:22:07 +12:00
Kenny Hoxworth
b2c72d6990 Force attacks always go through, regardless of what is beneath them. 2012-03-23 10:06:59 +13:00
Chris Forbes
f2dd5eb0a3 simplify UOG 2011-12-24 12:19:59 +13:00
Chris Forbes
f83c9fd4d7 add IEnum<T>.JoinWith, use it to clean up a bunch of things 2011-11-01 21:57:58 +13:00