cg_fov (now cheat-protected) is taken into account when computing fov.

This commit is contained in:
Andrei Drexler 2009-06-23 21:28:57 +00:00
parent 333b400ca0
commit f72c202364
2 changed files with 5 additions and 1 deletions

View file

@ -743,7 +743,7 @@ static cvarTable_t cvarTable[] = { // bk001129
{&cg_ignore, "cg_ignore", "0", 0}, // used for debugging {&cg_ignore, "cg_ignore", "0", 0}, // used for debugging
{&cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE}, {&cg_autoswitch, "cg_autoswitch", "1", CVAR_ARCHIVE},
{&cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE}, {&cg_drawGun, "cg_drawGun", "1", CVAR_ARCHIVE},
{&cg_fov, "cg_fov", "90", CVAR_ARCHIVE}, {&cg_fov, "cg_fov", "90", CVAR_ARCHIVE | CVAR_CHEAT },
{&cg_viewsize, "cg_viewsize", "100", CVAR_ARCHIVE}, {&cg_viewsize, "cg_viewsize", "100", CVAR_ARCHIVE},
{&cg_stereoSeparation, "cg_stereoSeparation", "0.4", CVAR_ARCHIVE}, {&cg_stereoSeparation, "cg_stereoSeparation", "0.4", CVAR_ARCHIVE},
{&cg_shadows, "cg_shadows", "1", CVAR_ARCHIVE}, {&cg_shadows, "cg_shadows", "1", CVAR_ARCHIVE},

View file

@ -854,6 +854,9 @@ static int CG_CalcFov(void)
cg.zoomSensLock = qfalse; cg.zoomSensLock = qfalse;
} }
// Makro - adjust for cg_fov
fov_x *= cg_fov.value / 90.f;
// Makro - adjust for wide screen // Makro - adjust for wide screen
// We first determine fov_y corresponding to the previously computed fov_x, // We first determine fov_y corresponding to the previously computed fov_x,
// if the screen had been 4:3. Then, given that fov_y, we determine fov_x // if the screen had been 4:3. Then, given that fov_y, we determine fov_x
@ -877,6 +880,7 @@ static int CG_CalcFov(void)
// set it // set it
cg.refdef.fov_x = fov_x; cg.refdef.fov_x = fov_x;
cg.refdef.fov_y = fov_y; cg.refdef.fov_y = fov_y;
//Slicer: Don't calculate new values for the zoomSensitivity when doing the firing sequence //Slicer: Don't calculate new values for the zoomSensitivity when doing the firing sequence
if(!cg.zoomSensLock) { if(!cg.zoomSensLock) {
if (!cg.zoomed ) { if (!cg.zoomed ) {