]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix OBJ models not getting any lighting
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 5 Nov 2011 18:10:14 +0000 (18:10 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 5 Nov 2011 18:10:14 +0000 (18:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11529 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 98b5621c642188a036dcfc6729947021eead6e3b..cdcadf37da309130d04feddef29399592c584909 100644 (file)
@@ -4741,7 +4741,7 @@ static void R_View_UpdateEntityLighting (void)
                        continue;
 
                // skip bsp models
-               if (ent->model && ent->model->brush.num_leafs)
+               if (ent->model && (ent->model == cl.worldmodel || ent->model->brush.parentmodel == cl.worldmodel))
                {
                        // TODO: use modellight for r_ambient settings on world?
                        VectorSet(ent->modellight_ambient, 0, 0, 0);