]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cgamevm.c
reverse engineered md3 format and wrote struct declarations (this is *NOT* based...
[xonotic/darkplaces.git] / cgamevm.c
index eb4f5e1ff27856498026edb96fea120c325ce8c2..dfa6c9ec5bef55bc5f2d5c6082a13244a624da9b 100644 (file)
--- a/cgamevm.c
+++ b/cgamevm.c
@@ -130,7 +130,7 @@ void CGVM_Draw_Entity(const cgdrawentity_t *e)
                return;
 
        if (cgvm_renderentity >= CGVM_RENDERENTITIES
-        || r_refdef.numentities >= MAX_VISEDICTS)
+        || r_refdef.numentities >= r_refdef.maxentities)
                return;
 
        r = cgvm_renderentities + cgvm_renderentity;
@@ -196,7 +196,7 @@ float CGVM_TracePhysics(const float *start, const float *end, const float *world
        middle[2] = (worldmins[2] + worldmaxs[2]) * 0.5f;
        VectorAdd(start, middle, start2);
        VectorAdd(end, middle, end2);
-       frac = CL_TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, 0, true);
+       frac = CL_TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, 0, true, NULL);
        VectorSubtract(impactpos, middle, impactpos);
        *impactentnum = -1;
        return frac;
@@ -262,6 +262,7 @@ int CGVM_Model(const char *name)
 
 void CGVM_Stain(const float *origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2)
 {
-       R_Stain((float *)origin, radius, cr1, cg1, cb1, ca1, cr2, cg2, cb2, ca2);
+       if (cl_stainmaps.integer)
+               R_Stain((float *)origin, radius, cr1, cg1, cb1, ca1, cr2, cg2, cb2, ca2);
 }