]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cgamevm.c
Fixed the "-path" option. A couple of FS variables were never initialized explicitly
[xonotic/darkplaces.git] / cgamevm.c
index dfa6c9ec5bef55bc5f2d5c6082a13244a624da9b..721c339212d61246b8258e6f4c2ffceca0bea580 100644 (file)
--- a/cgamevm.c
+++ b/cgamevm.c
@@ -167,7 +167,9 @@ void CGVM_Draw_Entity(const cgdrawentity_t *e)
 
 void CGVM_Draw_Light(const cgdrawlight_t *l)
 {
-       CL_AllocDlight(NULL, (float *) l->origin, 1, l->light[0], l->light[1], l->light[2], 0, 0);
+       matrix4x4_t matrix;
+       Matrix4x4_CreateTranslate(&matrix, l->origin[0], l->origin[1], l->origin[2]);
+       CL_AllocDlight(NULL, &matrix, l->radius, l->color[0], l->color[1], l->color[2], 0, 0, 0, 0, true, 1);
 }
 
 void *CGVM_Malloc(const int size)
@@ -196,7 +198,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, NULL);
+       frac = CL_TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, true, NULL, SUPERCONTENTS_SOLID);
        VectorSubtract(impactpos, middle, impactpos);
        *impactentnum = -1;
        return frac;