siextern float r_avertexnormals[NUMVERTEXNORMALS][3];
#define m_bytenormals r_avertexnormals
#define VectorNormalizeFast VectorNormalize
-#define Mod_PointContents(v,m) (Mod_PointInLeaf(v,m)->contents)
+#define CL_PointContents(v) (Mod_PointInLeaf(v,cl.worldmodel)->contents)
typedef unsigned char qbyte;
#define cl_stainmaps.integer 0
void R_Stain (vec3_t origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2)
trace.fraction = 1;
VectorCopy (end, trace.endpos);
#if QW
- PM_RecursiveHullCheck (cl.model_precache[1]->hulls, 0, 0, 1, start, end, &trace);
+ PM_RecursiveHullCheck (cl.model_precache[1]->brushq1.hulls, 0, 0, 1, start, end, &trace);
#else
- RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace);
+ RecursiveHullCheck (cl.worldmodel->brushq1.hulls, 0, 0, 1, start, end, &trace);
#endif
VectorCopy(trace.endpos, impact);
VectorCopy(trace.plane.normal, normal);
if (cl_stainmaps.integer)
R_Stain(org, 96, 80, 80, 80, 64, 176, 176, 176, 64);
- i = cl.worldmodel ? cl.worldmodel->PointContents(cl.worldmodel, org) : CONTENTS_EMPTY;
+ i = CL_PointContents(org);
if ((i == CONTENTS_SLIME || i == CONTENTS_WATER) && cl_particles.integer && cl_particles_bubbles.integer)
{
for (i = 0;i < 128;i++)
VectorMA(start, dec, vec, pos);
len -= dec;
- contents = cl.worldmodel ? cl.worldmodel->PointContents(cl.worldmodel, pos) : CONTENTS_EMPTY;
+ contents = CL_PointContents(pos);
if (contents == CONTENTS_SKY || contents == CONTENTS_LAVA)
return;
{
f = p->friction * frametime;
if (!content)
- content = cl.worldmodel ? cl.worldmodel->PointContents(cl.worldmodel, p->org) : CONTENTS_EMPTY;
+ content = CL_PointContents(p->org);
if (content != CONTENTS_EMPTY)
f *= 4;
f = 1.0f - f;
{
case pt_blood:
if (!content)
- content = cl.worldmodel ? cl.worldmodel->PointContents(cl.worldmodel, p->org) : CONTENTS_EMPTY;
+ content = CL_PointContents(p->org);
a = content;
if (a != CONTENTS_EMPTY)
{
break;
case pt_bubble:
if (!content)
- content = cl.worldmodel ? cl.worldmodel->PointContents(cl.worldmodel, p->org) : CONTENTS_EMPTY;
+ content = CL_PointContents(p->org);
if (content != CONTENTS_WATER && content != CONTENTS_SLIME)
{
p->die = -1;
p->vel[2] = /*lhrandom(-32, 32) +*/ p->vel2[2];
}
if (!content)
- content = cl.worldmodel ? cl.worldmodel->PointContents(cl.worldmodel, p->org) : CONTENTS_EMPTY;
+ content = CL_PointContents(p->org);
a = content;
if (a != CONTENTS_EMPTY && a != CONTENTS_SKY)
p->die = -1;