You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Aircraft will now be able to use waypoints.
- When a `guard` command (`[G]` by default) is issued, the aircraft will
search for targets around the current location and return immediately
when target is not found, target is destroyed or ammos are depleted.
- If the target is destroyed but ammos are not depleted yet, it will
also return because the aircraft's command is one-time.
- When an `attack move` command (`[Ctrl]+[Shift]`) is issued, the
aircraft will move towards the destination and search for nearby targets
on the route for attack. Once ammo is depleted or the destination is
reached, it will return.
- If the automatically selected target is destroyed but ammo is not
depleted yet during the process, the aircraft will continue flying to
the destination.
- In addition, the actions of aircraft are also changed.
- `ExtendedAircraftMissions.SmoothMoving` controls whether the aircraft
will return to the airport when the distance to the destination is less
than half of `SlowdownDistance` or its turning radius.
- `ExtendedAircraftMissions.EarlyDescend` controls whether the aircraft
not have to fly directly above the airport before starting to descend
when the distance between the aircraft and the landing point is less
than `SlowdownDistance` (also work for aircraft spawned by aircraft
carriers).
- `ExtendedAircraftMissions.RearApproach` controls whether the aircraft
should start landing at the airport from the opposite direction of
`LandingDir`.
In `rulesmd.ini`:
```ini
[General]
ExtendedAircraftMissions=false ; boolean
[SOMEAIRCRAFT] ; AircraftType
ExtendedAircraftMissions.SmoothMoving= ; boolean, default to [General] -> ExtendedAircraftMissions
ExtendedAircraftMissions.EarlyDescend= ; boolean, default to [General] -> ExtendedAircraftMissions
ExtendedAircraftMissions.RearApproach= ; boolean, default to [General] -> ExtendedAircraftMissions
```
---

- Aircraft can fly at a certain speed as much as possible, when the distance to the destination is less than half of `SlowdownDistance` or 8 cell distances divided by `ROT`, it will return to the airport. And now aircraft not have to fly directly above the airport before starting to descend.
279
278
- When a `guard` command (`[G]` by default) is issued, the aircraft will search for targets around the current location and return immediately when target is not found, target is destroyed or ammos are depleted.
280
279
- If the target is destroyed but ammos are not depleted yet, it will also return because the aircraft's command is one-time.
281
280
- When an `attack move` command (`[Ctrl]+[Shift]`) is issued, the aircraft will move towards the destination and search for nearby targets on the route for attack. Once ammo is depleted or the destination is reached, it will return.
282
281
- If the automatically selected target is destroyed but ammo is not depleted yet during the process, the aircraft will continue flying to the destination.
282
+
- In addition, the actions of aircraft are also changed.
283
+
-`ExtendedAircraftMissions.SmoothMoving` controls whether the aircraft will return to the airport when the distance to the destination is less than half of `SlowdownDistance` or its turning radius.
284
+
-`ExtendedAircraftMissions.EarlyDescend` controls whether the aircraft not have to fly directly above the airport before starting to descend when the distance between the aircraft and the landing point is less than `SlowdownDistance` (also work for aircraft spawned by aircraft carriers).
285
+
-`ExtendedAircraftMissions.RearApproach` controls whether the aircraft should start landing at the airport from the opposite direction of `LandingDir`.
283
286
284
287
In `rulesmd.ini`:
285
288
```ini
286
289
[General]
287
-
ExtendedAircraftMissions=false ; boolean
290
+
ExtendedAircraftMissions=false ; boolean
291
+
292
+
[SOMEAIRCRAFT]; AircraftType
293
+
ExtendedAircraftMissions.SmoothMoving= ; boolean, default to [General] -> ExtendedAircraftMissions
294
+
ExtendedAircraftMissions.EarlyDescend= ; boolean, default to [General] -> ExtendedAircraftMissions
295
+
ExtendedAircraftMissions.RearApproach= ; boolean, default to [General] -> ExtendedAircraftMissions
// Try next planning waypoint first, then return to air base if it does not exist or cannot be taken
418
-
if (!pThis->TryNextPlanningTokenNode())
434
+
if (!extendedMissions || !pThis->TryNextPlanningTokenNode())
419
435
pThis->EnterIdleMode(false, true);
420
436
421
437
return EnterIdleAndReturn;
@@ -436,14 +452,142 @@ DEFINE_HOOK(0x4DDD66, FootClass_IsLandZoneClear_ReplaceHardcode, 0x6) // To avoi
436
452
return SkipGameCode;
437
453
}
438
454
439
-
DEFINE_HOOK(0x4CF408, FlyLocomotionClass_FlightUpdate_SetFlightLevel, 0x6) // Make aircraft not have to fly directly above the airport before starting to descend
455
+
DEFINE_HOOK(0x4CF190, FlyLocomotionClass_FlightUpdate_SetPrimaryFacing, 0x6) // Make aircraft not to fly directly to the airport before starting to land
if (!pAircraft || !TechnoTypeExt::ExtMap.Find(pAircraft->Type)->ExtendedAircraftMissions_RearApproach.Get(RulesExt::Global()->ExtendedAircraftMissions))
DEFINE_HOOK(0x4CF3D0, FlyLocomotionClass_FlightUpdate_SetFlightLevel, 0x7) // Make aircraft not have to fly directly above the airport before starting to descend
0 commit comments