From: black Date: Sun, 6 Jan 2008 01:05:25 +0000 (+0000) Subject: Fix two bugs (everything should behave as usual now, when you're not using menu rende... X-Git-Tag: xonotic-v0.1.0preview~2580 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1054caa4476ed724b1dd867f1113f32161b8c077;p=xonotic%2Fdarkplaces.git Fix two bugs (everything should behave as usual now, when you're not using menu rendering). git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7925 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/clvm_cmds.c b/clvm_cmds.c index 0f1e5be4..45a0a49e 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -2367,11 +2367,16 @@ static void VM_CL_AddPolygonTo2DScene (vm_polygon_t *p) DrawQ_Mesh (&mesh, (p->flags&0x0f)); } +// TODO: move this into the client code and clean-up everything else, too! [1/6/2008 Black] void VM_CL_AddPolygonsToMeshQueue (void) { int i; vmpolygons_t* polys = vmpolygons + PRVM_GetProgNr(); + // only add polygons of the currently active prog to the queue - if there is none, we're done + if( !prog ) + return; + if(!polys->drawpolygons_num) return; R_Mesh_Matrix(&identitymatrix); diff --git a/menu.c b/menu.c index ec465305..8e99c532 100644 --- a/menu.c +++ b/menu.c @@ -5079,7 +5079,9 @@ void MP_Draw (void) // reset the temp entities each frame r_refdef.numtempentities = 0; + // TODO: fix these evil hacks! [1/6/2008 Black] R_UpdateVariables(); + R_ResetViewRendering2D(); PRVM_Begin; PRVM_SetProg(PRVM_MENUPROG); diff --git a/mvm_cmds.c b/mvm_cmds.c index 1509c1b9..899d141c 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -1452,7 +1452,7 @@ void VM_M_Cmd_Init(void) menu_refdef.view.colormask[2] = true; menu_refdef.view.colormask[3] = true; - menu_refdef.view.useperspective = true; + menu_refdef.view.useperspective = false; menu_refdef.view.frustum_y = tan(scr_fov.value * M_PI / 360.0) * (3.0/4.0); menu_refdef.view.frustum_x = menu_refdef.view.frustum_y * (float)menu_refdef.view.width / (float)menu_refdef.view.height / vid_pixelheight.value; }