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;
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, notworld ? -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, surfaceindex, decalsequence);
}
}
}
float *c4f;
float *t2f;
const int *e;
- const unsigned char *surfacevisible = r_refdef.viewcache.world_surfacevisible;
+ const unsigned char *surfacevisible = ent == r_refdef.scene.worldentity ? r_refdef.viewcache.world_surfacevisible : NULL;
int numtris = 0;
numdecals = decalsystem->numdecals;
if (!decal->color4ub[0][3])
continue;
- if (decal->surfaceindex >= 0 && !surfacevisible[decal->surfaceindex])
+ if (surfacevisible && !surfacevisible[decal->surfaceindex])
continue;
// update color values for fading decals