From: Rudolf Polzer Date: Sun, 24 Oct 2010 15:57:30 +0000 (+0200) Subject: remove the traceline at the end of CSQC_UpdateView as the engine cleans up these... X-Git-Tag: xonotic-v0.1.0preview~202^2~15^2 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=0ac1c629d686db49fe7b04700d358aa6588f74f8 remove the traceline at the end of CSQC_UpdateView as the engine cleans up these globals now; split up PolyDrawModel function in CSQC (unused) --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 215aa524eb..5ac1f965e3 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -950,11 +950,6 @@ void CSQC_UpdateView(float w, float h) // let's reset the view back to normal for the end R_SetView(VF_MIN, '0 0 0'); R_SetView(VF_SIZE, '1 0 0' * w + '0 1 0' * h); - - // be safe against triggerbots until everyone has the fixed engine - // this call is meant to overwrite the trace globals by something - // unsuspicious - traceline('0 0 0', '0 0 0', MOVE_WORLDONLY, world); } #define spider_h "gfx/vehicles/hud_bg.tga" diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 5c377bffad..049368c163 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -627,28 +627,33 @@ void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, f } // this draws the triangles of a model DIRECTLY. Don't expect high performance, really... -void PolyDrawModel(entity e) +float PolyDrawModelSurface(entity e, float i_s) { - float i_s, i_t; + float i_t; float n_t; vector tri; string tex; - for(i_s = 0; ; ++i_s) + tex = getsurfacetexture(e, i_s); + if not(tex) + return 0; // this is beyond the last one + n_t = getsurfacenumtriangles(e, i_s); + for(i_t = 0; i_t < n_t; ++i_t) { - tex = getsurfacetexture(e, i_s); - if not(tex) - break; // this is beyond the last one - n_t = getsurfacenumtriangles(e, i_s); - for(i_t = 0; i_t < n_t; ++i_t) - { - tri = getsurfacetriangle(e, i_s, i_t); - R_BeginPolygon(tex, 0); - R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1); - R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1); - R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1); - R_EndPolygon(); - } + tri = getsurfacetriangle(e, i_s, i_t); + R_BeginPolygon(tex, 0); + R_PolygonVertex(getsurfacepoint(e, i_s, tri_x), getsurfacepointattribute(e, i_s, tri_x, SPA_TEXCOORDS0), '1 1 1', 1); + R_PolygonVertex(getsurfacepoint(e, i_s, tri_y), getsurfacepointattribute(e, i_s, tri_y, SPA_TEXCOORDS0), '1 1 1', 1); + R_PolygonVertex(getsurfacepoint(e, i_s, tri_z), getsurfacepointattribute(e, i_s, tri_z, SPA_TEXCOORDS0), '1 1 1', 1); + R_EndPolygon(); } + return 1; +} +void PolyDrawModel(entity e) +{ + float i_s; + for(i_s = 0; ; ++i_s) + if(!PolyDrawModelSurface(e, i_s)) + break; } void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag)