actualy better than that in the debug key prosesing(process_debug_keys() in keycontrol.cpp) add this
case KEY_DEBUGGED + KEY_ALTED + KEY_EQUAL:
case KEY_DEBUGGED1 + KEY_ALTED + KEY_EQUAL:
{
Viewer_zoom += 0.1f;
g3_set_view_matrix(&Eye_position, &Eye_matrix, Viewer_zoom);
HUD_sourced_printf(HUD_SOURCE_HIDDEN, "viewer zoom raised to %0.2f" , Viewer_zoom);
}
break;
case KEY_DEBUGGED + KEY_ALTED + KEY_MINUS:
case KEY_DEBUGGED1 + KEY_ALTED + KEY_MINUS:
{
Viewer_zoom -= 0.1f;
g3_set_view_matrix(&Eye_position, &Eye_matrix, Viewer_zoom);
HUD_sourced_printf(HUD_SOURCE_HIDDEN, "viewer zoom lowered to %0.2f" , Viewer_zoom);
}
break;
remember to add these declairations before the function def or it won't know what to do
extern float Viewer_zoom;
extern vector Eye_position;
extern matrix Eye_matrix;
extern void g3_set_view_matrix(vector *view_pos,matrix *view_matrix,float zoom);
this will alow you to change the zoom in and out at will with the debug console ('~' + 'alt' + ('+' || '-')), I think .35-.25 looks the best
I think I can adapt this to have a sniper scope effect realy easy