X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=cgamevm.c;h=d921b7520184a4dce648b7b5461d4225168abe49;hp=57f53dc84b58facfd3389bdbb556ec28307a1036;hb=a76b746a4cd4e319c9629348ad2fb6563ef49393;hpb=1019743b2072b60aa1a2897b04c7cbb8f94454d1 diff --git a/cgamevm.c b/cgamevm.c index 57f53dc8..d921b752 100644 --- 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; @@ -143,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? @@ -205,8 +198,6 @@ float CGVM_TracePhysics(const float *start, const float *end, const float *world VectorAdd(end, middle, end2); frac = CL_TraceLine((float *)start2, (float *)end2, impactpos, impactnormal, 0, true); VectorSubtract(impactpos, middle, impactpos); - //VectorCopy(end, impactpos); - //VectorClear(impactnormal); *impactentnum = -1; return frac; } @@ -271,5 +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); } +