abcdefg30
1bb319425b
Add Sound.Play overloads that play a random sound from a list
2019-04-20 01:22:30 +02:00
reaperrr
c7eee6ae5d
Improve ReturnToBase Activity.cs adherance
...
And make it use child activities for queueability.
2019-04-13 18:47:08 +02:00
reaperrr
8edf5b56ea
Exclude dead actors from ChooseResupplier
2019-04-13 18:47:08 +02:00
reaperrr
2cdae0b380
Merge HeliReturnToBase into ReturnToBase
2019-04-13 18:47:08 +02:00
tovl
8ee11028d7
Replace SequenceActivities with ChildActivity in several air activities.
2019-03-30 18:54:30 +00:00
reaperrr
3211119027
Simplify ResupplyAircraft
...
By moving part of the take-off prevention (when TakeOffOnResupply
is set to false) to Aircraft.
Main reason & advantage is that dropping the 'WaitFor' child
makes this activity always end when resupplies are done,
which makes it more compatible with being queued as ChildActivity
itself (for example by ReturnToBase).
2019-03-30 16:44:04 +01:00
Oliver Brakmann
b4fd7331b2
Simplify Activity class
...
After the removal of the CompositeActivity class, all the supporting
code that made it work can be removed as well.
2019-03-30 14:38:23 +00:00
tovl
16f1750252
Remove ResupplyAircraft hack
2019-03-22 19:02:05 +01:00
tovl
64cec4a0ad
Revise AttackMoveActivity.
2019-03-22 19:02:05 +01:00
reaperrr
5ec47b47af
Rename fields on Repairable traits
...
To bring them in line with RearmActors,
Repairable.RepairBuildings and
RepairableNear.Buildings have been renamed
to RepairActors.
Additionally, their RA-specific internal
defaults were removed and the FieldLoader
now requires them to be set explicitly.
2019-03-10 19:19:49 +01: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
tovl
6d51d3988c
fix aircraft ResupplyActivity
2019-03-09 21:47:43 +00:00
reaperrr
a7702a8ecd
Make HeliReturnToBase use RTB.ChooseResupplier
...
Small consistency fix and prep for merging HRTB into RTB.
2019-03-09 12:12:51 +00:00
Paul Chote
ab4a7e3558
Replace System.Drawing primitives with our own.
2019-03-04 18:26:42 +00:00
portablestew
a49287cc97
Possible fix for #14102 : Consider airfield available if already reserved for the same actor
2019-02-15 13:59:53 +01:00
portablestew
2d4bad66ae
Fix for #7083 : Fly stops turning when target is inside the turn radius
2019-02-08 19:38:01 +01:00
Oliver Brakmann
0ee9219df3
Fix unresponsive aircraft when executing orders queued during resupply
2019-02-06 18:01:51 +00:00
tovl
ee19cb61b4
add check for NextActivity to FlyCircle
...
prevent infinite loop
fix for ReturnToBase
cleanup
2019-02-03 11:24:19 +00:00
Paul Chote
60fcf5951c
Fix target invalidation and reacquisition in fly activities.
2019-01-26 22:53:46 +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
Paul Chote
2080c72ab9
Define plumbing to pass initial target positions to inner move activities.
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
ac3e601edf
Use INotifyIdle on Aircraft
...
For now only to trigger landing or circling.
2018-12-05 09:20:58 +13:00
reaperrr
d8220b390a
Add IdleTurnSpeed to Aircraft
...
Instead of hardcoding 1/3 of normal TurnSpeed on HeliFlyCircle.
2018-12-05 09:20:58 +13:00
Andre Mohren
b1a44086a0
Removed unused using directives.
2018-11-17 17:23:22 +00:00
reaperrr
92912c6c94
Add TurnToDock to Aircraft
...
Instead of hard-coding a turn before VTOLs
land/dock on resupplier.
2018-11-04 00:25:55 +01:00
reaperrr
e2227b9450
Make HeliReturnToBase use a landingProcedures list
...
Like ReturnToBase already does. Makes them easier to compare and later merge.
2018-11-04 00:25:55 +01:00
reaperrr
577fc1c409
Remove separate AircraftInfo caching from ReturnToBase
...
This extra info caching was overkill and most likely had zero effect on performance.
2018-11-04 00:25:55 +01:00
reaperrr
54d3656205
Move CalculateTurnRadius up in ReturnToBase
...
Just a slight readability improvement.
2018-11-04 00:25:55 +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
reaperrr
139d5efba8
Remove RepairBuildings from Aircraft
...
Require them to use Repairable trait instead.
2018-11-02 22:28:08 +00:00
abcdefg30
0b89883012
Prevent ReturnToBase from causing a divide by zero crash
2018-10-28 18:54:32 +01:00
Inq8
fec9fe1ad4
Aircraft Takeoff & Landing Sounds (Fixed-Wing)
...
Added Takeoff & Landing sounds to planes.
Changed Aircraft Trait, TakeoffSounds & LandingSounds are now arrays & accept a list of sound files & it will randomly select one to play.
Changed/fixed take off & landing sounds to originate from the aircraft location, rather than play a global sound.
2018-10-12 14:29:53 +02:00
Mustafa Alperen Seki
faa35946b8
Make Exit Conditional
2018-10-08 22:00:39 +01:00
BGluth
09b9ed3506
Rearming aircraft now reapplies rearming order if canceled on landing structure
...
- Implemented by making the ResupplyAircraft activity recreate a new resupply activity if cancelled and also having no other queued activities.
- Tested in TD, RA, TS.
2018-08-12 21:16:23 +02:00
reaperrr
77d03ce1e1
Replace Airfield/Helipad references with generic Resupplier in RTB activities
...
More generalization to prepare for possible future activity merger.
2018-08-12 14:24:21 +02:00
reaperrr
fc79e04c49
Generalize Land activities Aircraft caching naming
...
To make a possible future merger (or inheritance or other code-sharing) of these activities easier.
2018-08-12 14:24:21 +02:00
reaperrr
3f9aab7e86
Generalize Fly* plane activities Aircraft caching naming
...
To make a possible future merger (or inheritance or other code-sharing) with other activities easier.
2018-08-12 14:24:21 +02:00
reaperrr
6810ac92ba
Generalize HeliAttack activity Aircraft caching naming
...
To make a possible future merger (or inheritance or other code-sharing) with FlyAttack easier.
2018-08-12 14:24:21 +02:00
reaperrr
c3a0d129a3
Generalize FlyCircle activity Aircraft caching naming
...
To make a possible future merger (or inheritance or other code-sharing) of these activities easier.
2018-08-12 14:24:21 +02:00
reaperrr
ae92255ded
Generalize Fly activity Aircraft caching naming
...
To make a possible future merger (or inheritance or other code-sharing) of these activities easier.
2018-08-12 14:24:21 +02:00
reaperrr
96032d1953
Generalize *ReturnToBase trait caching naming
...
Makes both copying changes as well as a potential future activity merger a little easier.
2018-08-12 14:24:21 +02:00
BGluth
5c42f55b3a
Fixed aircraft in TS landing instantly to reload their ammo
...
- Updated calculating the landing altitude for the Land activity not taking into account the terrain height.
- Fixes 14312.
2018-08-04 21:09:59 +02:00
reaperrr
3069bbfa7d
Fix infinite loop in HeliReturnToBase
...
This can happen if HeliAttack tells the heli to return to base when the player doesn't have any of the RearmBuildings available, because the activity queues itself after the HRTB, and the latter will, after a forced land, then queue back HeliAttack, which then immediately queues back HRTB and so on.
Instead, we now assume that if there is no base to return to, going to NextActivity is pointless and don't queue NextActivity.
RTB was likely ordered by HeliAttack due to lack of ammo, so resuming the attack would be pointless.
2018-03-22 22:50:50 +01:00
Arular101
8a60918841
Update copyright notice year to 2018
2018-01-17 00:47:34 +01:00