]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/lightningarc.qc
effects: remove IMPLEMENTATION
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / lightningarc.qc
index 8a16a1dc3122c2d5d04507175328e52d5db25902..6388575b72cb09a5baa576a0e8c3882fdeff8ffb 100644 (file)
@@ -1,6 +1,5 @@
 #include "lightningarc.qh"
 
-#ifdef IMPLEMENTATION
 REGISTER_NET_TEMP(TE_CSQC_ARC)
 
 #if defined(SVQC)
@@ -28,8 +27,8 @@ REGISTER_NET_TEMP(TE_CSQC_ARC)
 
 void b_draw()
 {
-    //Draw_CylindricLine(self.fx_start, self.fx_end, self.fx_with, self.fx_texture, 0, time * 3, '1 1 1', 0.7, DRAWFLAG_ADDITIVE, view_origin);
-    Draw_CylindricLine(self.fx_start, self.fx_end, self.fx_with, self.fx_texture, (self.fx_with/256), 0, '1 1 1', 1, DRAWFLAG_ADDITIVE, view_origin);
+    //Draw_CylindricLine(this.fx_start, this.fx_end, this.fx_with, this.fx_texture, 0, time * 3, '1 1 1', 0.7, DRAWFLAG_ADDITIVE, view_origin);
+    Draw_CylindricLine(this.fx_start, this.fx_end, this.fx_with, this.fx_texture, (this.fx_with/256), 0, '1 1 1', 1, DRAWFLAG_ADDITIVE, view_origin);
 
 }
 void b_make(vector s,vector e, string t,float l,float z)
@@ -59,7 +58,7 @@ void b_make(vector s,vector e, string t,float l,float z)
                int steps = min(16, floor(length / seglength));
                if (steps < 1)
                {
-                       te_lightning1(world, from, to);
+                       te_lightning1(NULL, from, to);
                        return;
                }
 
@@ -73,18 +72,18 @@ void b_make(vector s,vector e, string t,float l,float z)
                                float drift = drifts * (1 - (i / steps)) + drifte * (i / steps);
                                vector dirnew = normalize(direction * (1 - drift) + randomvec() * drift);
                                vector pos = pos_l +  dirnew * steplength;
-                               te_lightning1(world, pos_l, pos);
+                               te_lightning1(NULL, pos_l, pos);
                                // WTF endless recursion if branchfactor is 1.0 (possibly due to adding branchfactor_add). FIXME
                                // if(random() < branchfactor)
                                //     cl_effects_lightningarc(pos, pos + (dirnew * length * 0.25),seglength,drifts,drifte,min(branchfactor + branchfactor_add,1),branchfactor_add);
 
                                pos_l = pos;
                        }
-                       te_lightning1(world, pos_l, to);
+                       te_lightning1(NULL, pos_l, to);
                }
                else
                {
-                       te_lightning1(world, from, to);
+                       te_lightning1(NULL, from, to);
                }
        }
 
@@ -102,7 +101,7 @@ void b_make(vector s,vector e, string t,float l,float z)
 
                if (autocvar_cl_effects_lightningarc_simple)
                {
-                       te_lightning1(world, from, to);
+                       te_lightning1(NULL, from, to);
                }
                else
                {
@@ -117,5 +116,3 @@ void b_make(vector s,vector e, string t,float l,float z)
        }
 
 #endif
-
-#endif