]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix two bugs (everything should behave as usual now, when you're not using menu rende...
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Jan 2008 01:05:25 +0000 (01:05 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Jan 2008 01:05:25 +0000 (01:05 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7925 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
menu.c
mvm_cmds.c

index 0f1e5be4c6b0df264ee14785116fd7f0212c9802..45a0a49e1b7390a5e83792d956e401a639a9408b 100644 (file)
@@ -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 ec4653051323ecdde645c98a9f512497281c6b12..8e99c532d6b2b0243dc0e8638919dca03bc534cd 100644 (file)
--- 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);
index 1509c1b9e7998babfd86c7f09f06f88524724a15..899d141c700fcfa79258f83f1738237850011493 100644 (file)
@@ -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;
 }