]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug with cl_decals_newsystem where submodels and other static models
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 Dec 2009 12:07:18 +0000 (12:07 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 Dec 2009 12:07:18 +0000 (12:07 +0000)
would not render decals

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9603 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index eae236425fe65604aca27db9a8dc69c6e1bf2a45..f2fbc5114f8c61af30ca1281f0640a6c006f5725 100644 (file)
@@ -8676,6 +8676,7 @@ static void R_DecalSystem_SplatEntity(entity_render_t *ent, const vec3_t worldor
        matrix4x4_t projection;
        decalsystem_t *decalsystem;
        qboolean dynamic;
+       qboolean notworld = ent != r_refdef.scene.worldentity;
        dp_model_t *model;
        const float *vertex3f;
        const msurface_t *surface;
@@ -8867,7 +8868,7 @@ static void R_DecalSystem_SplatEntity(entity_render_t *ent, const vec3_t worldor
                                R_DecalSystem_SpawnTriangle(decalsystem, v[0], v[1], v[2], tc[0], tc[1], tc[2], c[0], c[1], c[2], triangleindex+surface->num_firsttriangle, surfaceindex, decalsequence);
                        else
                                for (cornerindex = 0;cornerindex < numpoints-2;cornerindex++)
-                                       R_DecalSystem_SpawnTriangle(decalsystem, v[0], v[cornerindex+1], v[cornerindex+2], tc[0], tc[cornerindex+1], tc[cornerindex+2], c[0], c[cornerindex+1], c[cornerindex+2], -1, surfaceindex, decalsequence);
+                                       R_DecalSystem_SpawnTriangle(decalsystem, v[0], v[cornerindex+1], v[cornerindex+2], tc[0], tc[cornerindex+1], tc[cornerindex+2], c[0], c[cornerindex+1], c[cornerindex+2], -1, notworld ? -1 : surfaceindex, decalsequence);
                }
        }
 }