Commit Graph

411 Commits

Author SHA1 Message Date
Paul Chote
d2274f4285 Rewrite Mobile.MoveIntoTarget to support moving targets. 2019-02-03 20:21:51 +01:00
Paul Chote
1f7b558b29 Rename Enter to LegacyEnter. 2019-02-03 20:21:51 +01:00
Paul Chote
83212b100e Pause actor movement between cells when Mobile is disabled. 2019-02-03 20:21:51 +01:00
Paul Chote
c8f05e90dc Fix turn disabling mobile.IsMoving when setIsMoving is false. 2019-02-03 20:21:51 +01:00
Paul Chote
0a57fbda3c Prefer target to lastVisible target if it is visible. 2019-02-03 16:32:25 +01: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
7c52a6f498 Fix target invalidation and reacquisition in Attack. 2019-01-26 22:53:46 +00:00
Paul Chote
616b6c8499 Fix target invalidation and reacquisition in Follow. 2019-01-26 22:53:46 +00:00
Paul Chote
975821023d Fix target invalidation and reacquisition in MoveAdjacentTo. 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
0df159e73b Cache world INotifySelection traits in Selection. 2019-01-26 21:40:31 +00:00
Paul Chote
6fc291a634 Disable target recalculation for bots.
This fixes bot-controlled units freezing when they
lock on to units that aren't visible.
2019-01-03 02:04:08 +01:00
Mustafa Alperen Seki
4578ea09ba Add DamageTypes to Capture Sabotage 2019-01-02 20:04:06 +01:00
Paul Chote
b41c178cb9 Revert "Units that have turrets while deployed now move their turrets back to their initial positions before undeploying"
This reverts commit d34bea293505f152d5f5aae3806dfcf36104945b.
2018-12-26 16:35:26 +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
Paul Chote
0406b89a96 Add Actor.ReplacedByActor to track transformations.
This isn't great conceptually, but has precedent
in the Generation number.
2018-12-17 22:19:26 +01:00
Paul Chote
2ac7e451b4 Remove AttackBase.IgnoresVisibility.
This was a workaround for D2K sandworms, which is
now implemented using a custom attack activity.
2018-12-17 22:19:26 +01:00
Paul Chote
73198dc45a Fix queued EnterTransport unload glitch. 2018-12-08 11:41:20 +01:00
Paul Chote
4b6853b433 Prevent multiple Transforms from triggering in the same tick.
This leads to actor duplication.
2018-12-08 11:34:49 +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
Oliver Brakmann
7454427b13 Fix FindResources aborting to early 2018-11-25 22:41:46 +00:00
Paul Chote
3be008f592 Add EmptyCondition to Harvester. 2018-11-22 22:16:56 +01: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
Paul Chote
492bcdd9a7 Remove building lock from Transforms. 2018-11-03 15:09:14 +01:00
Paul Chote
18b84750aa Reimplement demolition lock using conditions. 2018-11-03 15:09:14 +01:00
Paul Chote
0901a7d9de Simplify FlashTarget.
Now defined in terms of a flash count, interval, and delay.
Broken FlashDuration parameter removed from Demolition.
2018-11-03 15:09:14 +01:00
Paul Chote
7e67ce0139 Pass CaptureTypes through the INotifyCapture interface.
Also make it require explicit implementation.
2018-11-03 14:47:22 +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
db58b35856 Further untangle (and - hopefully - fix) the afterLandActivity mess 2018-11-02 22:24:56 +00:00
abcdefg30
7e20bdd7ea Introduce a new CarryableHarvester trait 2018-11-02 22:24:56 +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
Paul Chote
22bd7fd90b Remove obsolete code. 2018-10-07 18:46:21 +02:00
Paul Chote
db1f794beb Fix captor being disposed if the capture fails. 2018-10-07 18:46:21 +02:00
Paul Chote
d97a2a5fa0 Remove legacy building lock calls.
This has been superseded by conditions.
2018-10-07 18:46:21 +02:00
Paul Chote
50423b13fb Add ConsumedByCapture flag to emulate legacy external behaviour. 2018-10-07 18:46:21 +02:00
Paul Chote
bab34252dd Add support for capture delays and conditions.
CaptureDelay is defined per-trait, and the shortest
delay will be used if multiple traits are enabled.

CapturingCondition and BeingCapturedCondition are
global, and are granted when any capture is in progress.

The capture period is defined from when the unit reaches
the cell next to the target, and either starts to wait
or enter the target through to when the capture succeeds
or fails.
2018-10-07 18:46:21 +02:00