cvar_t gl_printcheckerror = {0, "gl_printcheckerror", "0"};
cvar_t r_render = {0, "r_render", "1"};
+cvar_t r_waterwarp = {CVAR_SAVE, "r_waterwarp", "1"};
cvar_t gl_dither = {CVAR_SAVE, "gl_dither", "1"}; // whether or not to use dithering
cvar_t gl_lockarrays = {0, "gl_lockarrays", "1"};
}
Cvar_RegisterVariable(&r_render);
+ Cvar_RegisterVariable(&r_waterwarp);
Cvar_RegisterVariable(&gl_dither);
Cvar_RegisterVariable(&gl_lockarrays);
Cvar_RegisterVariable(&gl_delayfinish);
// LordHavoc: viewzoom (zoom in for sniper rifles, etc)
r_refdef.fov_x = scr_fov.value * cl.viewzoom;
r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.width, r_refdef.height);
-
- if (cl.worldmodel)
+
+ if (r_waterwarp.value > 0)
{
- Mod_CheckLoaded(cl.worldmodel);
- contents = CL_PointSuperContents(r_vieworigin);
- if (contents & SUPERCONTENTS_LIQUIDSMASK)
+ if (cl.worldmodel)
{
- r_refdef.fov_x *= (sin(cl.time * 4.7) * 0.015 + 0.985);
- r_refdef.fov_y *= (sin(cl.time * 3.0) * 0.015 + 0.985);
+ Mod_CheckLoaded(cl.worldmodel);
+ contents = CL_PointSuperContents(r_vieworigin);
+ if (contents & SUPERCONTENTS_LIQUIDSMASK)
+ {
+ r_refdef.fov_x *= 1 - (((sin(cl.time * 4.7) + 1) * 0.015) * r_waterwarp.value);
+ r_refdef.fov_y *= 1 - (((sin(cl.time * 3.0) + 1) * 0.015) * r_waterwarp.value);
+ }
}
}
}
}
-#define OPTIONS_EFFECTS_ITEMS 22
+#define OPTIONS_EFFECTS_ITEMS 23
int options_effects_cursor;
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&cl_particles_blood_bloodhack, !cl_particles_blood_bloodhack.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lerpmodels, !r_lerpmodels.integer);
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_lerpsprites, !r_lerpsprites.integer);
+ else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_waterwarp, bound(0, r_waterwarp.value + dir * 0.1, 1));
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_wateralpha, bound(0, r_wateralpha.value + dir * 0.1, 1));
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_waterscroll, bound(0, r_waterscroll.value + dir * 0.5, 10));
else if (options_effects_cursor == optnum++) Cvar_SetValueQuick (&r_watershader, bound(0, r_watershader.value + dir * 0.25, 10));
M_Options_PrintCheckbox("Force New Blood Effect", true, cl_particles_blood_bloodhack.integer);
M_Options_PrintCheckbox(" Model Interpolation", true, r_lerpmodels.integer);
M_Options_PrintCheckbox(" Sprite Interpolation", true, r_lerpsprites.integer);
+ M_Options_PrintSlider( " Underwater View Warp", true, r_waterwarp.value, 0, 1);
M_Options_PrintSlider( " Water Alpha (opacity)", true, r_wateralpha.value, 0, 1);
M_Options_PrintSlider( " Water Movement", true, r_waterscroll.value, 0, 10);
M_Options_PrintSlider( " GeForce3 Water Shader", true, r_watershader.value, 0, 10);