Commit Graph

40 Commits

Author SHA1 Message Date
Matthias Mailänder
d3a8b07f05 Remove unread private member (IDE0052) 2022-09-13 10:36:57 +03:00
RoosterDragon
d2a3659078 Fix landed aircraft above ground level not removing influence on take off.
When the Land activity is run, the aircraft adds influence to the cell so it cannot be used by other actors. When the TakeOff activity runs, it removes the influence so the cell can be used by other actors.

However, when a Carryall picks up a unit, it is told to Land with a vertical offset - it never reaches ground level. When the TakeOff activity runs, it saw the aircraft was above ground level and bailed out. The means the influence is never removed. The cell is now unusable despite the fact the Carryall has left.

To fix this, TakeOff now checks if influence was applied instead of checking if the aircraft is above ground level. If so, we know the Land activity had decided that influence was required, even if the aircraft has not made it to ground level. When TakeOff runs, it will treat it as a proper take off event even though the aircraft is already above ground level. This means influence will be removed and the cell will become accessible as intended.

In ActorMap, we also fix a design flaw where disposed actors where excluded from queries. This caused cache inconsistencies with clients using ActorMap.CellUpdated event to rely on updates. This event will not get called when the actor was disposed, so the downsteam client may have cached the actors at that location, only for them to "change" when the actor is later disposed. This could cause the Locomotor and HierarchicalPathFInder to have inconsistent views of the actors on the map, causing crashes if the inconsistent state broken some internal invariants. The only reason to exclude disposed actors would be to cover up for the actors not being removed properly from the map, which is fixed now aircraft are handled correctly. If ever an actor isn't removed from the actor map, then the caller needs fixing rather than having the actor map exclude it.
2022-09-11 20:04:12 +03:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Matthias Mailänder
0e7ad43425 Remove unused parameters. 2022-04-01 23:30:26 +02:00
Mustafa Alperen Seki
d149624b84 Add Lua Scripting for Carryall. 2022-01-12 14:24:13 +01:00
penev92
8ba6d13b2f Removed unused using directives 2021-10-15 13:12:33 +02:00
abcdefg30
dc11b82fc9 Fix a NRE in DeliverUnit.ReleaseUnit.OnFirstRun 2021-10-02 22:01:24 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
tovl
84eb3c54ef Expose targetline colors to yaml.
All targetlines can now be set to a custom color in yaml or set to be invisible.
All automated behaviours including scripted activities now have no visible target lines.
2020-11-14 12:04:19 +00:00
teinarss
13581c030d Use in parameter for Target 2020-11-06 22:02:24 +01:00
Paul Chote
75cb5c2166 Convert turret facings to WAngle relative to the body. 2020-08-09 19:43:53 +02:00
Paul Chote
6adf45bcb4 Convert IFacing.Facing and TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
reaperrr
804d61a6a1 Fix DeliverUnit-related crash 2020-01-01 20:42:36 +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
0562814efa Prevent carryalls delivering non-existent units. 2019-07-11 13:19: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
tovl
5920de1384 Airborne transports only land to (un)load. 2019-06-30 18:04:43 +02:00
tovl
8e5875453a Improve Carryall behaviour and integration with Aircraft. 2019-06-30 18:04:43 +02:00
reaperrr
4f8f8cfb9d Merge HeliFly into Fly 2019-06-07 22:18:33 +01:00
reaperrr
0c2666b97e Streamline Land activity
Removed some redundant parameters, some redundant overloads
and made Land always consider LandAltitude relative to target.
2019-05-17 18:51:21 +01:00
reaperrr
14bd5ada1a Merge HeliLand into Land activity 2019-05-17 18:51:21 +01:00
Paul Chote
6f1aaab3e3 Remove CallFunc. 2019-05-12 19:06:52 +02:00
Paul Chote
e57e881662 Use Target in DeliverUnit 2019-05-12 19:06:52 +02:00
tovl
0b747ba927 Rework Carryall drop-off queueing and ordering. 2019-05-12 19:06:52 +02:00
tovl
cc7e758b27 Replace pseudo-childactivities in carryall logic. 2019-04-14 19:05:06 +01:00
tovl
705795abde Activity.Cancel returns void instead of bool. 2019-03-09 21:47:43 +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
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Oliver Brakmann
f9951f76ca Allow cancelling an activity without aborting the entire queue 2017-04-30 19:07:50 +01:00
Oliver Brakmann
683d3e747b Rename existing activity states 2017-01-20 22:16:25 +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
c3c6af018a Set carried turret facing on delivery. 2016-08-27 17:08:33 +01:00
Paul Chote
1ae86f34f8 Overhaul Carryall behaviour, adding support for manual control. 2016-08-27 15:42:18 +01:00
Paul Chote
2355ad9dd1 Move carryall code to Mods.Common. 2016-06-21 21:38:19 +01:00