]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use polygons for beam instead of trailparticles
authorMario <zacjardine@y7mail.com>
Thu, 18 Dec 2014 18:02:24 +0000 (05:02 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 18 Dec 2014 18:02:24 +0000 (05:02 +1100)
effectinfo.txt
qcsrc/common/weapons/w_arc.qc

index 63d80888653cb105ad63b72d61d2c409d8fffb28..bb1dca51b9db71e5d96c978c4c4d0c52b00e123a 100644 (file)
@@ -9041,15 +9041,6 @@ effect arc_lightning // impact sparks (underwater)
        airfriction 5
        liquidfriction 5
 
-effect arc_beam // beam core
-       type beam
-       countabsolute 1
-       tex 200 200
-       color 0xFFFFFF 0xFFFFFF
-       size 4 4
-       alpha 512 512 0
-       time 0.005 0.005
-
 effect arc_beam // sparks on beam
        type spark
        stretchfactor 1
index d5f856425c192b4568620fdff402bfc516884840..80fcf5524b15afed5294ed374eac22bfa73bef48 100644 (file)
@@ -811,8 +811,8 @@ void Draw_ArcBeam_callback(vector start, vector hit, vector end)
        vector top    = hitorigin + (thickdir * thickness);
        vector bottom = hitorigin - (thickdir * thickness);
        
-       //vector last_top = WarpZone_TransformOrigin(WarpZone_trace_transform, Draw_ArcBeam_callback_last_top);
-       //vector last_bottom = WarpZone_TransformOrigin(WarpZone_trace_transform, Draw_ArcBeam_callback_last_bottom);
+       vector last_top = WarpZone_TransformOrigin(WarpZone_trace_transform, Draw_ArcBeam_callback_last_top);
+       vector last_bottom = WarpZone_TransformOrigin(WarpZone_trace_transform, Draw_ArcBeam_callback_last_bottom);
 
        R_BeginPolygon(beam.beam_image, DRAWFLAG_NORMAL); // DRAWFLAG_ADDITIVE
        R_PolygonVertex(
@@ -821,7 +821,7 @@ void Draw_ArcBeam_callback(vector start, vector hit, vector end)
                beam.beam_color,
                beam.beam_alpha
        );
-       /*R_PolygonVertex(
+       R_PolygonVertex(
                last_top,
                '0 0.5 0' + ('0 0.5 0' * (Draw_ArcBeam_callback_last_thickness / beam.beam_thickness)),
                beam.beam_color,
@@ -838,7 +838,7 @@ void Draw_ArcBeam_callback(vector start, vector hit, vector end)
                '0 0.5 0' * (1 - (thickness / beam.beam_thickness)),
                beam.beam_color,
                beam.beam_alpha
-       );*/
+       );
        R_EndPolygon();
 
        // draw trailing particles
@@ -1276,7 +1276,7 @@ void Ent_ReadArcBeam(float isnew)
                {
                        case ARC_BT_MISS:
                        {
-                               self.beam_color = '-1 -1 1';
+                               self.beam_color = '1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
                                self.beam_traileffect = particleeffectnum("arc_beam");
@@ -1301,7 +1301,7 @@ void Ent_ReadArcBeam(float isnew)
                        }
                        case ARC_BT_WALL: // grenadelauncher_muzzleflash healray_muzzleflash
                        {
-                               self.beam_color = '0.5 0.5 1';
+                               self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
                                self.beam_traileffect = particleeffectnum("arc_beam");
@@ -1327,7 +1327,7 @@ void Ent_ReadArcBeam(float isnew)
                        }
                        case ARC_BT_HEAL:
                        {
-                               self.beam_color = '0 1 0';
+                               self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
                                self.beam_traileffect = particleeffectnum("arc_beam_heal");
@@ -1353,7 +1353,7 @@ void Ent_ReadArcBeam(float isnew)
                        }
                        case ARC_BT_HIT:
                        {
-                               self.beam_color = '1 0 1';
+                               self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 8;
                                self.beam_traileffect = particleeffectnum("arc_beam");
@@ -1379,7 +1379,7 @@ void Ent_ReadArcBeam(float isnew)
                        }
                        case ARC_BT_BURST_MISS:
                        {
-                               self.beam_color = '-1 -1 1';
+                               self.beam_color = '1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
                                self.beam_traileffect = particleeffectnum("arc_beam");
@@ -1405,7 +1405,7 @@ void Ent_ReadArcBeam(float isnew)
                        }
                        case ARC_BT_BURST_WALL:
                        {
-                               self.beam_color = '0.5 0.5 1';
+                               self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
                                self.beam_traileffect = particleeffectnum("arc_beam");
@@ -1431,7 +1431,7 @@ void Ent_ReadArcBeam(float isnew)
                        }
                        case ARC_BT_BURST_HEAL:
                        {
-                               self.beam_color = '0 1 0';
+                               self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
                                self.beam_traileffect = particleeffectnum("arc_beam_heal");
@@ -1457,7 +1457,7 @@ void Ent_ReadArcBeam(float isnew)
                        }
                        case ARC_BT_BURST_HIT:
                        {
-                               self.beam_color = '1 0 1';
+                               self.beam_color = '1 1 1';
                                self.beam_alpha = 0.5;
                                self.beam_thickness = 14;
                                self.beam_traileffect = particleeffectnum("arc_beam");