int index;
float v[9][3];
const float *vertex3f;
+ const float *normal3f;
int numpoints;
float points[2][9][3];
float temp[3];
e = rsurface.modelelement3i + 3*triangleindex;
vertex3f = rsurface.modelvertex3f;
+ normal3f = rsurface.modelnormal3f;
for (cornerindex = 0;cornerindex < 3;cornerindex++)
{
index = 3*e[cornerindex];
- VectorCopy(vertex3f + index, v[cornerindex]);
+ VectorMA(vertex3f + index, cl_decals_bias.value, normal3f + index, v[cornerindex]);
}
// cull backfaces
//TriangleNormal(v[0], v[1], v[2], normal);
R_DecalSystem_Reset(decalsystem);
decalsystem->model = model;
- RSurf_ActiveModelEntity(ent, false, false, false);
+ RSurf_ActiveModelEntity(ent, true, false, false);
Matrix4x4_Transform(&rsurface.inversematrix, worldorigin, localorigin);
Matrix4x4_Transform3x3(&rsurface.inversematrix, worldnormal, localnormal);