client.cpp
anywhere add this: Code:
void handleContinuousZoom()
{
const char PROC_NAME[50] = "handleContinuousZoom\0";
if( cvar.czoom == 1000 ) // leave zoom
{
// reset zoom
iCurrentFOV = 90;
fCurrentFOV = 90.0;
(*SetFOVOrg)("SetFOV", 1, &iCurrentFOV);
// prevent further zooming
cvar.czoom = 0;
} else {
// advance/decrease zoom level
iCurrentFOV -= cvar.czoom;
BOUND_VALUE(iCurrentFOV,10,90);
fCurrentFOV = iCurrentFOV;
(*SetFOVOrg)("SetFOV", 1, &iCurrentFOV);
}
}
then find this: Code:
int HUD_Redraw
under line: Code:
hudDrawInfoTexts();
add this: Code:
if (cvar.czoom) { handleContinuousZoom(); }
cvar.pp Code:
REGISTER_CVAR_INT( czoom ,0)
cvar.h Code:
int czoom;