The pitch_offset works as intended with the FAF_NODISTFACTOR, but without it, it's grossly wrong. I'm working to fix it now but its proving more difficult than I thought...
All I can tell is, in p_enemy.cpp,
Code: Select all
if (!(flags & FAF_NODISTFACTOR))
target_z += pitch_offset; Code: Select all
double dist_z = target_z - source_z;
double dist = sqrt(dist_x*dist_x + dist_y*dist_y + dist_z*dist_z);
int other_pitch = (int)rad2bam(asin(dist_z / dist));The point behind it was to make it factor distance with pitch offset, and if possible, angle too. (Unfortunately I didn't know how to deal with the angle.)

