X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=cgamevm.c;h=721c339212d61246b8258e6f4c2ffceca0bea580;hb=d2878a072b9a0399379741b3e19536b7327cb388;hp=dfa6c9ec5bef55bc5f2d5c6082a13244a624da9b;hpb=7653d161643a1e8ed9640d445a5a13d9248d4939;p=xonotic%2Fdarkplaces.git diff --git a/cgamevm.c b/cgamevm.c index dfa6c9ec..721c3392 100644 --- 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;