From: havoc Date: Sun, 20 Dec 2009 12:07:18 +0000 (+0000) Subject: fix bug with cl_decals_newsystem where submodels and other static models X-Git-Tag: xonotic-v0.1.0preview~1044 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7a6a99082ee23af6093f1d73a5df4452da221d86;p=xonotic%2Fdarkplaces.git 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 --- 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); } } }