Paul Chote
6adf45bcb4
Convert IFacing.Facing and TurnSpeed to WAngle.
2020-06-12 18:35:41 +02:00
Paul Chote
6d6b21a0eb
Convert Aircraft.Facing to WAngle.
2020-06-01 20:25:38 +02:00
Paul Chote
7e72cd262c
Fix FlyAttack invalid target crash.
2020-02-19 23:35:16 -06:00
Paul Chote
d0f44143c2
Fix activity cancellation on FlyAttack RTB.
...
* AbortOnResupply will now cancel queued activities
in addition to the current attack.
* Resupply if no ammo is available during a standard attack.
* Don't resupply (move directly to target) if no ammo is available
during an attack move (C&C3 style).
2020-01-18 16:38:53 +01:00
Paul Chote
adb3c8e39c
Split fixed-wing attack and strafe attack types.
2020-01-12 21:06:35 +01:00
tovl
85bc843554
Fix aircraft failing to engage targets within range.
2020-01-12 21:06:35 +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
70459b311e
Refactor FlyAttack to make strafing runs interruptible when target becomes invalid.
2019-08-18 12:50:20 +02: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
reaperrr
e4011b86ac
Move AbortOnResupply to AttackAircraft
...
Additionally, if AbortOnResupply is set to 'true',
abort FlyAttack right away when queueing ReturnToBase.
2019-07-15 23:48:54 +01:00
tovl
985020b4ad
Simplify special exits of several acitivities.
2019-07-03 20:42:19 +02: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
8f7426f579
Reduce duplication around AttackFollow's targets.
2019-06-29 23:28:23 +02:00
reaperrr
c8a42cbce2
Introduce AirAttackType
...
Aircraft attack behavior (currently FlyBy or Hover)
is now controlled via this instead of the CanHover boolean.
2019-06-10 12:43:34 +02:00
reaperrr
979ed1b140
Merge HeliAttack into FlyAttack
...
And polish CanHover FlyAttack behavior:
- Get rid of direct TickFacing usage
- Fix that the CanHover facing/altitude update would override
TakeOff child of Fly
- Streamline the queueing of child activities
- Get rid of a direct FlyTick in favor of relying on Fly activity
- Pull queueing of TakeOff out of the if-else
2019-06-08 17:07:18 +01: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
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
8efa0da54d
Fix target invalidation and reacquisition in (Fly|Heli)Attack.
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
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
e42094625d
Merge AttackPlane and AttackHeli into AttackAircraft
2018-11-03 11:37:23 +00:00
reaperrr
8f1d8a67cc
Remove RearmBuildings from Aircraft and Minelayer
...
In favor of using Rearmable trait.
2018-11-02 22:28:08 +00:00
Arular101
8a60918841
Update copyright notice year to 2018
2018-01-17 00:47:34 +01:00
reaperrr
d602ec6485
Rename SelfReloads to AutoReloads
2017-11-12 19:48:06 +00:00
reaperrr
8b7a71685c
Remove AmmoPool-awareness from Armament
2017-11-12 19:48:06 +00:00
reaperrr
6f95080aa4
Add ReloadAmmoPool and adapt AmmoPool
...
Refactored and simplified Rearm activity.
Uses local Reload now.
Removed AmmoPool.SelfReloads.
2017-11-12 19:48:06 +00:00
reaperrr
c75e64a952
Properly account for disabled Armaments in various places
...
These places didn't care if an Armament was disabled, which could lead to unexpected behavior.
2017-08-22 20:55:46 +01:00
Jean-Rémy Buchs
1d1802a163
Add LandOnCondition to the trait Aircraft which triggers a landing and prevents takeoffs while the condition is met
2017-08-08 15:13:50 -05:00
Oliver Brakmann
9b0780e87c
Make FlyAttack use child activities
2017-01-22 20:41:41 +01:00
Taryn Hill
43317e0f5d
Update copyright notice year to 2017
2016-12-31 23:46:13 -06:00
Oliver Brakmann
2c66ee8c13
Add native support for uninterruptible activities
...
This pattern occurs a few times throughout the code, so it makes sense to bake it into the Activity class itself.
2016-10-31 18:46:27 +01:00
Paul Chote
34b10dcb77
Hack around the Lua API.
2016-09-26 17:48:25 +01:00
Oliver Brakmann
7f64495d6f
Make aircraft continue attack on same target after re-arming
2016-09-04 21:31:05 +02:00
Oliver Brakmann
e7d07e5a01
Fix FlyAttack not calling TakeOff for landed aircraft
2016-09-04 21:31:05 +02:00
PedroFerreiraRamos
958e35d61f
Fix air unit resupply #5966
2016-07-12 20:17:45 -03:00
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
Paul Chote
0039a2bdbf
Split out an ActivityUtils class.
2016-01-19 23:34:13 +00:00
RoosterDragon
8e89a6a696
Simplify names, remove unused usings, remove redundant casts.
2016-01-17 21:35:36 +00:00
pevers
6ed0273656
Actors will lose targets and AI won't follow indefinitely
2015-06-28 19:11:53 +02:00