]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Draw: purge SELFPARAM
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index dfb1ef5afec13c3e18f3a4928f484f8b118cb16c..381ead7869362d94bc98025544a1af291efccaab 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "../common/constants.qh"
 #include "../common/mapinfo.qh"
-#include "../common/nades.qh"
+#include "../common/nades/all.qh"
 #include "../common/stats.qh"
 #include "../common/triggers/target/music.qh"
 #include "../common/teams.qh"
@@ -27,7 +27,7 @@
 
 entity porto;
 vector polyline[16];
-void Porto_Draw()
+void Porto_Draw(entity this)
 {
        vector p, dir, ang, q, nextdir;
        float portal_number, portal1_idx;
@@ -1468,7 +1468,7 @@ void CSQC_UpdateView(float w, float h)
         */
 
        for(entity e = NULL; (e = nextent(e)); ) if (e.draw) {
-               WITH(entity, self, e, e.draw());
+               WITH(entity, self, e, e.draw(e));
        }
 
        addentities(MASK_NORMAL | MASK_ENGINE | MASK_ENGINEVIEWMODELS);
@@ -1532,6 +1532,7 @@ void CSQC_UpdateView(float w, float h)
 
        if(autocvar_cl_reticle)
        {
+               Weapon wep = get_weaponinfo(activeweapon);
                // Draw the aiming reticle for weapons that use it
                // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use
                // It must be a persisted float for fading out to work properly (you let go of the zoom button for
@@ -1541,7 +1542,7 @@ void CSQC_UpdateView(float w, float h)
                        // no zoom reticle while dead
                        reticle_type = 0;
                }
-               else if(_WEP_ACTION(activeweapon, WR_ZOOMRETICLE) && autocvar_cl_reticle_weapon)
+               else if(wep.wr_zoomreticle(wep) && autocvar_cl_reticle_weapon)
                {
                        if(reticle_image != "") { reticle_type = 2; }
                        else { reticle_type = 0; }
@@ -1805,7 +1806,7 @@ void CSQC_UpdateView(float w, float h)
 
        // draw 2D entities
        for (entity e = NULL; (e = nextent(e)); ) if (e.draw2d) {
-               WITH(entity, self, e, e.draw2d());
+               WITH(entity, self, e, e.draw2d(e));
        }
        Draw_ShowNames_All();