Spoiler:

I haven't tested it but I'm hoping this will fix any and all pitch problems. If someone is getting the opposite pitch, swap the toggle. One of them has to work since a number can only be positive or negative.

Edit: Come to think of it, I might be misremembering. It might've been that negative pitch values given to A_RailAttack aimed upwards in older versions while it aims downward in newer ones. If you find that the compat flag toggle is backwards with my above solution replace this line:

- Code: Select all • Expand view
`int result = (pitch + GetActorPitch(0)) * 360;`

with this:

- Code: Select all • Expand view
`int result = -(pitch + GetActorPitch(0)) * 360;`