That's the exact same formula I use to put a crosshair in the center of the screen, and mine works fine. What's going wrong, specifically?

EDIT: oops, saw it right after I posted...Try this:
Code:
muzzle_pan.pos_x = (screen_size.x - bmap_width(muzzle_pan.bmap) * tmpx) / 2;
muzzle_pan.pos_y = (screen_size.y - bmap_height(muzzle_pan.bmap) * tmpx) / 2;


bmap_width and _height always give the size of the original image, not the scaled panel.

Last edited by Futurulus; 01/09/08 04:30.