Commit Graph

710 Commits

Author SHA1 Message Date
Paul Chote
4db3da61e1 Avoid an integer (long) overflow in FindAndDeliverResources. 2019-08-23 14:15:51 +02:00
tovl
ed8abe9861 Define nearenough parameter for aircraft so they can exit movement early when stuck. 2019-08-23 13:54:58 +02:00
reaperrr
e71001f4f8 Fix Resupply closeEnough bugs
Fixes that
- RepairableNear actors wouldn't move close enough
- isCloseEnough would return 'true' even if the host
  is invalid.
2019-08-22 10:26:36 +01:00
Paul Chote
ab94ea9715 Discourage harvesters from wandering too far from the refinery. 2019-08-20 20:22:39 +02:00
tovl
2d394f33b8 Fix units from transports appearing at load point. 2019-08-19 00:33:38 +02:00
tovl
70459b311e Refactor FlyAttack to make strafing runs interruptible when target becomes invalid. 2019-08-18 12:50:20 +02:00
Paul Chote
e600848947 Fix crash for invalid Resupply hosts. 2019-08-18 12:48:17 +02:00
tovl
08c472b2e2 Disallow attack-moving units from chasing their targets. 2019-08-15 18:03:30 +02:00
Paul Chote
78302ea593 Rework aircraft rally point handling. 2019-08-15 17:02:27 +02:00
abcdefg30
bfc3e1354b Rename SearchFromOrderRadius to SearchFromHarvesterRadius 2019-08-11 16:40:55 +02:00
abcdefg30
698ef5e375 Don't use SearchFromProcRadius when searching from self.Location 2019-08-11 16:40:55 +02:00
reaperrr
b7d966f78f Don't exit FlyOffMap immediately on leaving map
Usually they'll get removed afterwards, so they need to be
out of players' sight before ending this activity.
2019-08-11 16:28:42 +02:00
reaperrr
64780fc865 Fix ProductionAirdrop aircraft removal timing
...when leaving map before finishing TakeOff.
2019-08-11 16:28:42 +02:00
tovl
5393b689d4 Disable preemptive targeting for queued orders. 2019-08-10 19:10:45 +01:00
abcdefg30
d1c56d78e1 Fix spamming repair orders repairing faster 2019-08-10 11:39:12 +01:00
tovl
c0d5cd750d Add missing target lines. 2019-08-10 12:17:36 +02:00
teinarss
daa82d113e Prevent crash when unloading Cargo structures 2019-08-10 11:52:33 +02:00
reaperrr
969be686a3 Fix aircraft with TakeOffOnResupply not taking off
...after auto-resupply.
2019-08-09 09:45:40 +02:00
reaperrr
ac3b3db7ac Made Resupply canceling more robust
The following improvements are made here:
- merged and streamlined the two IsCanceling checks in Tick
  into one that covers both isCloseEnough cases
- isCloseEnough now only checks distance to host
  if host is still valid and otherwise returns 'false'
- called transports are now also cancelled when host becomes
  invalid, not only if the activity is cancelled via order
- aircraft now always take off if the host becomes invalid
- ground actors only try to leave if host is still existing
2019-08-08 17:22:53 +02:00
tovl
b7a7b7aa7e Revise target line colours to distinguish different attack types. 2019-08-05 02:53:09 +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
8c7ff3b5b0 Make VisualMove uninterruptible by making Turn a Child of Drag. 2019-08-04 11:48:59 +02:00
teinarss
2ddf9fa826 Using Locomotor instead of Info for pathfinding 2019-07-26 15:54:22 +02:00
reaperrr
e662f17f06 Fix that VTOLs can ignore TurnToDock/-Land
When already at horizontal target position, no Turn was queued.
2019-07-23 16:17:18 +02:00
tovl
d9e1a68453 Cancel carryall transport request when cancelling order. 2019-07-22 22:54:01 +02:00
reaperrr
bfcdb3a8a2 Add IdleBehavior enum to Aircraft 2019-07-21 16:29:38 +02:00
reaperrr
7f4fbfcf46 Change Resupply closeEnough 'infinite' to negative
...instead of 'zero'.

Returning 'true' at a distance of zero was a legacy left-over
that isn't used anymore once #16695 is merged.
2019-07-21 15:17:09 +02:00
reaperrr
fa41554309 Fix actors resupplying even if too far from resupplier 2019-07-21 15:17:09 +02:00
tovl
c5558e2145 Remove SequenceActivities. 2019-07-20 23:41:31 +02:00
tovl
a38c2d9aae Allow ReturnToBase to exit if actor does not land at building. 2019-07-19 12:19:15 +02:00
tovl
231825d0d0 Remove WaitForTransport activity. 2019-07-19 10:49:24 +02:00
tovl
922c6e9c40 Fix harvesters losing their last harvesting position when carried by carryall. 2019-07-19 10:49:24 +02:00
tovl
d59b01597a Always clear requested targets when exiting AttackActivity/Flyattack. 2019-07-18 23:14:56 +01:00
reaperrr
cf4d73ab91 Revert FlightDynamics
This needs more thought and most parts might get superseded
by other approaches.

Kept CanSlide separation from CanHover.
2019-07-18 10:26:43 +02:00
reaperrr
c51f2c036a Make aircraft always take off after repair
Reservable logic doesn't handle repairs, and we
don't want aircraft to block repair bays etc. until it does.
2019-07-15 23:48:54 +01:00
reaperrr
5211eb25aa Improve handling of finished/cancelled Resupply 2019-07-15 23:48:54 +01:00
reaperrr
5b65e618ee Remove Resupply Cancel override
This became detrimental to actor responsiveness
while resupplying.
2019-07-15 23:48:54 +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
reaperrr
1bb988512f Move AmmoPool RemainingTicks reset to Rearmable
This is a better place to do this than the Resupply activity.
2019-07-15 23:48:54 +01:00
reaperrr
f71912f337 Move movement to resupplier inside Resupply activity
From Repairable(Near).
2019-07-15 23:48:54 +01:00
reaperrr
a7fa372045 Fix Resupply regression
The work-around was originally written with ground units in mind
and caused issues with aircraft.
2019-07-15 23:48:54 +01:00
tovl
71a1060ecb Prevent carryalls picking up non-existent units. 2019-07-11 13:19:19 +02:00
tovl
0562814efa Prevent carryalls delivering non-existent units. 2019-07-11 13:19:19 +02:00
tovl
2912bff850 Fix location checks for queued deployment. 2019-07-07 00:40:38 +01:00
reaperrr
0ebeb30880 Replace various Aircraft fields with FlightDynamics
Replaces various booleans with a FlightDynamics flag list.
2019-07-05 00:03:36 +02:00
tovl
824db72a4c Prevent VisualMoveIntoTarget from overshooting when turning. 2019-07-03 20:42:19 +02: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
714b09ac4f Add default for Activity-Tick 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