]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix sprites whose name begins from ! (assumed lit sprites) to be actually lit with...
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 Oct 2010 22:26:24 +0000 (22:26 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 Oct 2010 22:26:24 +0000 (22:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10545 d7cf8633-e32d-0410-b094-e92efae38249

r_sprites.c

index 64401e404f60562cb3924cddfaada224c172f6c9..fbcd8b36d4b4b504ea6422090c49c1973b2444b6 100644 (file)
@@ -384,6 +384,10 @@ void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, const r
                        frame = model->sprite.sprdata_frames + ent->frameblend[i].subframe;
                        texture = R_GetCurrentTexture(model->data_textures + ent->frameblend[i].subframe);
 
+                       // lit sprite by lightgrid if it is not fullbright, lit only ambient
+                       if (!(texture->currentmaterialflags & MATERIALFLAG_FULLBRIGHT))
+                               VectorAdd(ent->modellight_ambient, ent->modellight_diffuse, rsurface.modellight_ambient);
+
                        // SPR_LABEL should not use depth test AT ALL
                        if(model->sprite.sprnum_type == SPR_LABEL || model->sprite.sprnum_type == SPR_LABEL_SCALE)
                                if(texture->currentmaterialflags & MATERIALFLAG_SHORTDEPTHRANGE)