%fvec = %obj.getForwardVector();
%fX = getWord(%fvec,0);
%fY = getWord(%fvec,1);
%evec = %obj.getEyeVector();
%eX = getWord(%evec,0);
%eY = getWord(%evec,1);
%eZ = getWord(%evec,2);
%eXY = mSqrt(%eX*%eX+%eY*%eY);
%aimVec = %fX*%eXY SPC %fY*%eXY SPC %eZ;
This code should get the proper vector direction you're aiming in, up or down, without being affected by Free Look and looking left or right. If you use this for the knockback (%aimVec instead of just %obj.getEyeVector()) then it won't cause the problem described earlier.