]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cgamevm.c
Someone has been programming QC too long. (At least it was QC related!)
[xonotic/darkplaces.git] / cgamevm.c
index 249185e2933cf87355cfb6bb2961e92bed1a0bdf..eb4f5e1ff27856498026edb96fea120c325ce8c2 100644 (file)
--- a/cgamevm.c
+++ b/cgamevm.c
@@ -1,6 +1,7 @@
 
 #include "quakedef.h"
 #include "cgame_api.h"
+#include "cl_collision.h"
 
 #define CGVM_RENDERENTITIES 1024
 
@@ -142,14 +143,7 @@ void CGVM_Draw_Entity(const cgdrawentity_t *e)
                Con_Printf("CGVM_Draw_Entity: invalid model index %i\n", e->model);
                return;
        }
-       r->model = cgvm_model[e->model]; //Mod_ForName(e->model, false, false, false);
-       /*
-       if (!r->model)
-       {
-               Con_Printf("CGVM_Draw_Entity: unable to find model \"%s\"");
-               return;
-       }
-       */
+       r->model = cgvm_model[e->model];
 
        r->frame = e->frame2;
        // FIXME: support colormapping?
@@ -202,10 +196,8 @@ 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 = TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, 0, true);
+       frac = CL_TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, 0, true);
        VectorSubtract(impactpos, middle, impactpos);
-       //VectorCopy(end, impactpos);
-       //VectorClear(impactnormal);
        *impactentnum = -1;
        return frac;
 }
@@ -272,3 +264,4 @@ void CGVM_Stain(const float *origin, float radius, int cr1, int cg1, int cb1, in
 {
        R_Stain((float *)origin, radius, cr1, cg1, cb1, ca1, cr2, cg2, cb2, ca2);
 }
+