]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
remove the traceline at the end of CSQC_UpdateView as the engine cleans up these...
authorRudolf Polzer <divverent@alientrap.org>
Sun, 24 Oct 2010 15:57:30 +0000 (17:57 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 24 Oct 2010 15:57:30 +0000 (17:57 +0200)
split up PolyDrawModel function in CSQC (unused)

qcsrc/client/View.qc
qcsrc/client/miscfunctions.qc

index 215aa524eb52fbf3d1fbb3b464e1abe84e4fdc68..5ac1f965e3a1d8714da30cd5ebdea66916917257 100644 (file)
@@ -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);
        // 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"
 }
 
 #define spider_h "gfx/vehicles/hud_bg.tga"
index 5c377bffadb8ade59c381071def85021d3181ba8..049368c1636b07944ae7de43de10008dfbbd9da2 100644 (file)
@@ -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...
 }
 
 // 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;
        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)
 }
 
 void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vector rgb, float a, float drawflag)