]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
r_fullbright 1 now works properly with r_shadow_realtime_world 1 (why anyone would...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Sep 2004 13:11:04 +0000 (13:11 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 26 Sep 2004 13:11:04 +0000 (13:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4541 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
gl_rsurf.c
r_shadow.c

index 88151231be0e70853d265a5d6b69e7ef58b8cc1b..307851cada0756de918c4cd199616808132a9ef2 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -889,6 +889,9 @@ void CL_RelinkWorld(void)
        Matrix4x4_CreateIdentity(&ent->render.matrix);
        Matrix4x4_CreateIdentity(&ent->render.inversematrix);
        CL_BoundingBoxForEntity(&ent->render);
+       ent->render.flags = RENDER_SHADOW;
+       if (!r_fullbright.integer)
+               ent->render.flags |= RENDER_LIGHT;
 }
 
 static void CL_RelinkStaticEntities(void)
index 06dd1dfbf96e3444849718479c48407999722418..9abcc652fd0d9892974c53c0295aecb346dab8a3 100644 (file)
@@ -1039,7 +1039,10 @@ static void RSurfShader_OpaqueWall_Pass_BaseTexture(const entity_render_t *ent,
        GL_DepthTest(true);
        GL_BlendFunc(GL_ONE, GL_ZERO);
        m.tex[0] = R_GetTexture(texture->skin.base);
-       GL_Color(r_lightmapintensity, r_lightmapintensity, r_lightmapintensity, 1);
+       if (ent->flags & RENDER_LIGHT)
+               GL_Color(r_lightmapintensity, r_lightmapintensity, r_lightmapintensity, 1);
+       else
+               GL_Color(1, 1, 1, 1);
        while((surf = *surfchain++) != NULL)
        {
                if (surf->visframe == r_framecount)
index 9ed419d54979febeb6d7971f031a9f5f441bbb81..22156eea91a1d8ebdbd16a1d34cf48254f0e7250 100644 (file)
@@ -2171,7 +2171,7 @@ void R_DrawRTLight(rtlight_t *rtlight, int visiblevolumes)
                R_Shadow_Stage_Light(shadow && gl_stencil);
 
                ent = &cl_entities[0].render;
-               if (ent->model && ent->model->DrawLight)
+               if (ent->model && ent->model->DrawLight && (ent->flags & RENDER_LIGHT))
                {
                        Matrix4x4_Transform(&ent->inversematrix, rtlight->shadoworigin, relativelightorigin);
                        Matrix4x4_Transform(&ent->inversematrix, r_vieworigin, relativeeyeorigin);