official-antistasi-community / A3-Antistasi

Antistasi Community Version - work in progress - Discord https://discord.com/invite/TYDwCRKnKX
https://antistasi.de
Other
217 stars 156 forks source link

Improve CUP and IFA plane turn rates when flown by AI #3335

Open jaj22 opened 4 days ago

jaj22 commented 4 days ago

What type of PR is this.

  1. [ ] Bug
  2. [X] Change
  3. [ ] Enhancement

What have you changed and why?

Most planes with "airplane" simulation have absolutely horrible turn rates when flown by AIs. A major reason for this seems to be that the planes gain too much altitude while banked, causing the AI to back off the elevators until it levels out.

We can't improve this behaviour directly, but it turns out that increasing the value that causes the nose of the plane to dip when banked helps a lot. This is the time in seconds for a 180 degree waypoint turn at normal speed before and after the changes:

           before    after
CUP A-10     48       16
CUP AV-8B    37       17
CUP F-35B    33       17
CUP LZ-39    40        9
CUP SU-25    50       16
CUP SU-34    54       19

IFA FW-190   26       13
IFA P39      18       13
IFA Pe2      31       15

As a minor added benefit, it feels a bit more like flying a plane for player flight.

I didn't check the transport planes as it takes ages and their turn rate isn't as important. Planes with maxSpeed below ~450 seem to use a different AI anyway, and don't benefit from the change as they only bank to 45 degrees in a turn.

I don't know of any other supported mods that use aircraft with airplane (as against airplanex) simulation. Let me know if there are any others that need fixing.

Please specify which Issue this PR Resolves.

Maybe a partial fix for #3302. Probably need to look at the missiles used too.

Please verify the following and ensure all checks are completed.

  1. [X] Have you loaded the mission in LAN host?
  2. [ ] Have you loaded the mission on a dedicated server?

Is further testing or are further changes required?

  1. [X] No
  2. [ ] Yes (Please provide further detail below.)