oh, sorry I didn't see that you use the crosshair as the mouse map

but when i look at your code again, i see many many mistakes!


first: not VECTOR bullet_pos[3] because you don't need an vector array!

--> VECTOT bullet_pos;

second: while(mouse_mode = 1) that is no comparision

--> while(mouse_mode == 1)
but why do you need that?
if you want an endless loop use while(1)

third: you turn your guard, not the bullet!
--> vec_to_angle(your_bullet.pan, mouse_dir3d);

now to your problem:

use this:
VECTOR temp;
temp.x = mouse_pos.x - bmap_width(mouse_map)/2;
temp.y = mouse_pos.y - bmap_height(mouse_map)/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);


i hope i understand you right laugh