vec3_t r_viewup;
int r_view_x;
int r_view_y;
+int r_view_z;
int r_view_width;
int r_view_height;
+int r_view_depth;
float r_view_fov_x;
float r_view_fov_y;
matrix4x4_t r_view_matrix;
}
// don't allow cheats in multiplayer
- if (!cl.islocalgame)
+ if (!cl.islocalgame && cl.worldmodel)
{
if (r_fullbright.integer != 0)
Cvar_Set ("r_fullbright", "0");
r_view_width = bound(0, r_refdef.width, vid.realwidth);
r_view_height = bound(0, r_refdef.height, vid.realheight);
+ r_view_depth = 1;
r_view_x = bound(0, r_refdef.x, vid.realwidth - r_refdef.width);
r_view_y = bound(0, r_refdef.y, vid.realheight - r_refdef.height);
+ r_view_z = 0;
r_view_fov_x = bound(1, r_refdef.fov_x, 170);
r_view_fov_y = bound(1, r_refdef.fov_y, 170);
r_view_matrix = r_refdef.viewentitymatrix;
R_SetFrustum();
r_farclip = R_FarClip(r_vieworigin, r_viewforward, 768.0f) + 256.0f;
- if (gl_stencil && ((r_shadow_realtime_world.integer && r_shadow_worldshadows.integer) || ((r_shadow_realtime_world.integer || r_shadow_realtime_dlight.integer) && r_shadow_dlightshadows.integer)))
+ if (gl_stencil && (r_shadow_realtime_world.integer || (r_shadow_realtime_dlight.integer && r_shadow_realtime_dlight_shadows.integer)))
GL_SetupView_Mode_PerspectiveInfiniteFarClip(r_view_fov_x, r_view_fov_y, 1.0f);
else
GL_SetupView_Mode_Perspective(r_view_fov_x, r_view_fov_y, 1.0f, r_farclip);