Very useful contribution, I try to create a bone turret but fail, because the turret can't look at target when change its tilt or roll. Now look at your code I found this is the magic.
Code:
		vec_rotate(vec_to_ent, vector(-my.pan,0,0));
vec_rotate(vec_to_ent, vector(0,-my.tilt,0));
vec_rotate(vec_to_ent, vector(0,0,-my.roll));


And I modified my tank from 3 entities to a single entity now. Without your code I can't achieve it.
Many Thanks