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;
if (l >= 0 && !strcmp(entname + l, ".bsp"))
{
strcpy(entname + l, ".ent");
- if ((entities = FS_LoadFile(entname, true)))
+ if ((entities = FS_LoadFile(entname, tempmempool, true)))
{
CL_ParseEntityLump(entities);
Mem_Free(entities);
}
// 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);
if (!intimerefresh && !r_speeds.integer)
S_ExtraUpdate ();
+ GL_ShowTrisColor(0.025, 0.025, 0, 1);
+ if (world->model && world->model->DrawSky)
+ {
+ world->model->DrawSky(world);
+ R_TimeReport("worldsky");
+ }
+
if (R_DrawBrushModelsSky())
R_TimeReport("bmodelsky");
- // must occur early because it can draw sky
- R_DrawWorld(world);
- R_TimeReport("world");
+ GL_ShowTrisColor(0.05, 0.05, 0.05, 1);
+ if (world->model && world->model->Draw)
+ {
+ world->model->Draw(world);
+ R_TimeReport("world");
+ }
// don't let sound skip if going slow
if (!intimerefresh && !r_speeds.integer)