g_utils.c

G_ProjectSource(vec3_t point, vec3_t distance, vec3_t forward, vec3_t right, vec3_t result)

This function uses distance as three scale factors. The first is applied to forward, the second to right and the third is simply an offset on the z component.

Result is point + forward * distance[0] + right * distance[1] + {0,0,distance[2]}

Mostly used to project an entity's origin relative to its view angles. Once you have used AngleVectors to convert the view angles into a forward and right-vector you can translate a point in the box spanned by the forward and right vector.