Commit Graph

67 Commits

Author SHA1 Message Date
Paul Chote
77ffc20a5f Convert Attack*.FacingTolerance to WAngle. 2020-11-30 16:39:48 +01:00
teinarss
13581c030d Use in parameter for Target 2020-11-06 22:02:24 +01:00
abcdefg30
9f093da61e Unhardcode the leeway range of AttackFollow 2020-09-11 23:55:57 +02:00
teinarss
8d27d22100 Use discard syntax 2020-08-19 18:11:07 +01:00
teinarss
27f1a7ab27 Use out var syntax 2020-08-19 18:11:07 +01:00
Paul Chote
6adf45bcb4 Convert IFacing.Facing and TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Paul Chote
16e0ea611e Revert "Fix AttackFollow ignoring allowMove flag when auto-targeting."
This reverts commit 3e116060cfc0a3e46563716c3e594a4ba3051b93.
2020-03-02 22:22:56 +01:00
Paul Chote
ab196a23e6 Fix AttackFollow ignoring allowMove flag when auto-targeting. 2020-02-14 17:30:38 +01:00
Paul Chote
51870a471a Add AttackSource enum. 2020-01-18 16:38:53 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
abcdefg30
1e138a9774 Drop invisible invalid targets immediately when changing stance 2019-12-14 17:17:36 +01:00
tovl
33d089a9d6 Fix lastVisibleTarget not being set in FlyAttack and AttackActivity. 2019-10-14 01:22:04 +02:00
tovl
5393b689d4 Disable preemptive targeting for queued orders. 2019-08-10 19:10:45 +01:00
Turupawn
3240b1e9eb Overhaul target line rendering:
- Targets are now defined by the activities
- Queued activities are shown
- Support custom attack colors
2019-08-05 02:53:09 +01:00
tovl
d59b01597a Always clear requested targets when exiting AttackActivity/Flyattack. 2019-07-18 23:14:56 +01:00
tovl
3790169db9 Make Tick return bool 2019-07-03 20:42:19 +02:00
tovl
b9c302a73a Move ChildActivity handling into base Activity class. 2019-07-03 20:42:19 +02:00
Paul Chote
ff9db0bf7a Reset RequestedTargets that are cancelled before the first attack tick. 2019-06-29 23:28:23 +02:00
Paul Chote
8f7426f579 Reduce duplication around AttackFollow's targets. 2019-06-29 23:28:23 +02:00
Paul Chote
3ca9d4b773 Drop targets when switching to a more restrictive stance. 2019-05-21 15:52:55 +02:00
Paul Chote
44c5d38a0e Disable AutoTarget if targeting a persistent fallback. 2019-05-19 13:23:01 +02:00
tovl
9abf715fd7 Allow opportunity fire for aircraft. 2019-05-04 23:40:16 +02:00
tovl
f16ff9eaa0 Base AttackAircraft on AttackFollow and get rid of SequenceActivities. 2019-05-04 23:40:16 +02:00
tovl
30de4df749 Replace SequenceActivities with ChildActivity in several activities. 2019-03-25 20:22:35 +00:00
tovl
a17cd0fa06 Replaced Canceled state with Canceling state. 2019-03-09 21:47:43 +00:00
tovl
8191a6566b Add missing self and optional pretick parameters to Queue, QueueChild and PrintActivity methods.
This means sequenceActivities needs to accept self as well.
2019-03-09 21:47:43 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
Paul Chote
8b618ef7bc Fix maximum range estimation for stationary turrets. 2019-03-02 18:16:12 +01:00
Paul Chote
49621bebd0 Abort activities when we don't know how close to move to a target. 2019-02-09 19:20:10 +01:00
Paul Chote
c26e77552e Allow turreted actors to acquire targets while doing other activities. 2019-02-03 18:07:02 +01:00
Paul Chote
012b17b974 Implement a secondary target-of-opportunity for AttackFollow. 2019-02-03 18:07:02 +01:00
Paul Chote
dc40a973e3 Allow attack orders to preempt move completion for turreted units. 2019-01-27 15:21:13 +01:00
Paul Chote
0bfc487999 Fix target invalidation and reacquisition in AttackFollow. 2019-01-26 22:53:46 +00:00
Paul Chote
d03c5b1c48 Split Target.Recalculate into methods with and without invalidation.
TargetExtensions is moved into its own file.
2019-01-26 22:53:46 +00:00
Paul Chote
b2d960ec19 Pass target line color to inner move activities. 2019-01-26 22:53:46 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
c34dd4b824 Allow Attack activities to target FrozenActors directly.
Removing the legacy FrozenActor to Actor workaround
fixes a number of long-standing bugs.

This also prevents units from losing their target when
it transforms into a different actor type.
2018-12-17 22:19:26 +01:00
reaperrr
0bff9e9119 Make some Attack* methods/classes public
Instead of protected, because some 3rd-party mods rely on these being
public.
2018-07-28 21:35:42 +02:00
reaperrr
bd38fe4926 Add INotifyAiming interface
And trigger notifications from Attack* traits.
2018-06-03 12:23:54 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
b898b5001a Rename AttackBase.IsAttacking to IsAiming to make its uses and assumptions clear. 2017-11-26 15:58:00 +01:00
reaperrr
456d32f3eb Make Attack* traits PausableConditional and replace IsDisabled with IsTraitDisabled checks 2017-11-25 03:55:56 +02:00
reaperrr
28e1f391e0 Make ITick require explicit implementation 2017-09-16 15:51:37 +02:00
reaperrr
94fa24088b Add dedicated TDGunboat traits
And get rid of Mobile.OnRails hack.
2017-07-23 15:06:03 +02:00
Paul Chote
45b13dabfb Explicitly implement interfaces in AttackBase. 2017-05-29 06:27:19 -05:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
2024f86290 Fix Turreted units not dropping cancelled targets. 2016-04-03 10:22:53 +01:00
Matthias Mailänder
ecbd1a0247 Merge pull request #9509 from penev92/upgradeTickTank
Convert Tick Tank to use DeployToUpgrade + some fixes
2016-02-23 23:33:38 +01:00
Pavel Penev
17ef6efefc Fix AttackFollow (and consequently AttackTurreted) firing at old target when the trait is reenabled
Most noticeable by ordering a deployed Tick Tank to fire at the ground, then undeploying it and deploying it again.
2016-02-22 02:44:28 +02:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00