From 7a6a99082ee23af6093f1d73a5df4452da221d86 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 20 Dec 2009 12:07:18 +0000 Subject: [PATCH] fix bug with cl_decals_newsystem where submodels and other static models would not render decals git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9603 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index eae23642..f2fbc511 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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); } } } -- 2.39.2