]> 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)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 18 Oct 2010 07:31:15 +0000 (09:31 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10545 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6ce1bf66db6a9a49886ce9b929bedbb89841cebd

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)