Commit Graph

21 Commits

Author SHA1 Message Date
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
adc7e902e3 Speed up AutoTarget.ChooseTarget among groups of allied units.
Most auto target scans will be conducted among groups of allied units unable to target each other because they are allied and their weapons only target enemies. Since they cannot target each other, the scan will be repeated constantly. Realising this, we can significantly reduce the performance impact of auto target scanning by bailing early in this scenario to avoid carrying out expensive targeting checks on friendly units which we know will fail anyway.
2016-01-04 07:07:26 +00:00
RoosterDragon
7fbbaa2221 Optimize AutoTarget.ChooseTarget.
Avoid using LINQ for filtering, grouping and dictionary building. Instead, we do these ourselves to reduce overhead.

Actors are checked for AutoTargetIgnoreInfo (rather than the trait) since info checks are marginally faster. This check can now be done immediately to allow us to skip such actors right away.

The ClosestTo calculation is now only run on the group on actors for the selected armament, rather than all potential armaments.
2015-12-12 20:55:22 +00:00
RoosterDragon
487727c9d0 Optimize AutoTarget.ScanForTarget.
The currentTarget parameter is null at the only call site. Inlining it allows us to make some simplifications to the logic.
2015-12-12 20:55:20 +00:00
Michael Rätzel
51bb515a4d prevent allied units from autoattack building which is being captured. resolves #6170. 2015-11-11 14:32:38 +01:00
Pavel Penev
ab2c5ab43d Enable AutoTarget to aquire targets under fog if GPS is present 2015-11-10 22:50:22 +02:00
Oliver Brakmann
b096671acb Add an ActorInit for unit stances 2015-10-27 19:41:49 +01:00
Oliver Brakmann
1a879009f1 Change InitialStance to Defend for human players 2015-10-27 19:41:49 +01:00
Pavel Penev
8c7bdae617 Fix AutoTarget acquiring targets under fog/shroud 2015-10-23 00:27:42 +03:00
Pavel Penev
f68da6ada7 Small refactoring to AutoTarget
- Move a check for AutoTargetIgnore up the chain
 - Simplify some LINQs to a single .FirstOrDefault()
 - Rename local variable
2015-10-21 21:09:26 +03:00
Matija Hustić
2a0a7541ba Gets AttackMove to work with 'Defend' stance 2015-10-11 19:23:08 +02:00
Matija Hustić
d94c645046 First step in the attack mechanism's refactor.
Enabled firing multiple armaments at a target simultaneously.
Each armament defines own cursor for targeting.
The force attack modifier influences armament choice for target.
Autotargeting modified to handle firing multiple armaments simultaneously.
As a consequence, healers (medics) no longer require separate Heal
activity and AttackMedic and AutoHeal traits.
2015-10-06 01:46:55 +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
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
Paul Chote
0677c309f3 Move Shroud.IsTargetable to Player. 2015-06-19 22:02:08 +01:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
reaperrr
654f56c5d5 Moves Attack, Armament, Move, Air traits and activities as well as anything required by them to Mods.Common.
Extracts Exit from Production into its own trait.
2015-01-04 05:24:28 +01:00