VECTOR temp;
function fire_bullets()
{
VECTOR bullet_pos;
mouse_spot.x = bmap_width(arrow_pcx)/2; // hot spot in the bmap center
mouse_spot.y = bmap_height(arrow_pcx)/2;
vec_to_angle(temp,mouse_dir3d);
vec_for_vertex(bullet_pos, guard, 6);
ent_create("bullet.mdl", bullet_pos, move_bullets);
//while(1)
//{
//VECTOR temp;
//temp.x = mouse_pos.x - bmap_width(crosshair_pcx)/2;
//temp.y = mouse_pos.y - bmap_height(crosshair_pcx)/2;
//temp.z = 5000;
//vec_to_screen(temp, camera);
//c_trace(guard.x, temp, 0);
//vec_set(temp, target.x);
//vec_sub(temp, guard.x);
//vec_to_angle(guard.pan, temp);
// vec_to_angle(guard.pan,mouse_dir3d);
//wait(1);
//}
}
and in move bullets use
my.pan =temp;
my.pan tilt and roll is set to vector temp