]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
only send prydoncursor related buttons, if cl_prydoncursor is 1
[xonotic/darkplaces.git] / gl_rsurf.c
index 374d8587ba364075a5b4360cd8630699c61670c1..bd084c162aba448d2def27aadf258cc24435e1a4 100644 (file)
@@ -737,7 +737,7 @@ static void R_Q1BSP_RecursiveGetLightInfo(r_q1bsp_getlightinfo_t *info, mnode_t
                        if (SVBSP_AddPolygon(&r_svbsp, portal->numpoints, points[0], false, NULL, NULL, 0) & 2)
                                break;
                }
-               if (portal == NULL)
+               if (leaf->portals && portal == NULL)
                        return; // no portals of this leaf visible
        }
        if (info->svbsp_insertoccluder)
@@ -1084,10 +1084,9 @@ void R_Q1BSP_DrawShadowVolume(entity_render_t *ent, const vec3_t relativelightor
                        rsurface.texture = R_GetCurrentTexture(surface->texture);
                        if (rsurface.texture->currentmaterialflags & MATERIALFLAG_NOSHADOW)
                                continue;
-                       RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX, 1, &surface);
-                       R_Shadow_MarkVolumeFromBox(surface->num_firsttriangle, surface->num_triangles, rsurface.batchvertex3f, rsurface.modelelement3i, relativelightorigin, relativelightdirection, lightmins, lightmaxs, surface->mins, surface->maxs);
+                       R_Shadow_MarkVolumeFromBox(surface->num_firsttriangle, surface->num_triangles, rsurface.modelvertex3f, rsurface.modelelement3i, relativelightorigin, relativelightdirection, lightmins, lightmaxs, surface->mins, surface->maxs);
                }
-               R_Shadow_VolumeFromList(model->surfmesh.num_vertices, model->surfmesh.num_triangles, rsurface.batchvertex3f, model->surfmesh.data_element3i, model->surfmesh.data_neighbor3i, relativelightorigin, relativelightdirection, projectdistance, numshadowmark, shadowmarklist, ent->mins, ent->maxs);
+               R_Shadow_VolumeFromList(model->surfmesh.num_vertices, model->surfmesh.num_triangles, rsurface.modelvertex3f, model->surfmesh.data_element3i, model->surfmesh.data_neighbor3i, relativelightorigin, relativelightdirection, projectdistance, numshadowmark, shadowmarklist, ent->mins, ent->maxs);
        }
        if (ent->model->brush.submodel)
                GL_PolygonOffset(r_refdef.shadowpolygonfactor, r_refdef.shadowpolygonoffset);
@@ -1271,8 +1270,7 @@ void R_ReplaceWorldTexture (void)
        skinframe_t *skinframe;
        if (!r_refdef.scene.worldmodel)
        {
-               if (gamemode != GAME_BLOODOMNICIDE)
-                       Con_Printf("There is no worldmodel\n");
+               Con_Printf("There is no worldmodel\n");
                return;
        }
        m = r_refdef.scene.worldmodel;
@@ -1285,8 +1283,7 @@ void R_ReplaceWorldTexture (void)
        }
        if(!cl.islocalgame || !cl.worldmodel)
        {
-               if (gamemode != GAME_BLOODOMNICIDE)
-                       Con_Print("This command works only in singleplayer\n");
+               Con_Print("This command works only in singleplayer\n");
                return;
        }
        r = Cmd_Argv(1);
@@ -1302,13 +1299,11 @@ void R_ReplaceWorldTexture (void)
 //                             t->skinframes[0] = skinframe;
                                t->currentskinframe = skinframe;
                                t->currentskinframe = skinframe;
-                               if (gamemode != GAME_BLOODOMNICIDE)
-                                       Con_Printf("%s replaced with %s\n", r, newt);
+                               Con_Printf("%s replaced with %s\n", r, newt);
                        }
                        else
                        {
-                               if (gamemode != GAME_BLOODOMNICIDE)
-                                       Con_Printf("%s was not found\n", newt);
+                               Con_Printf("%s was not found\n", newt);
                                return;
                        }
                }