From: Mario Date: Thu, 18 Dec 2014 18:02:24 +0000 (+1100) Subject: Use polygons for beam instead of trailparticles X-Git-Tag: xonotic-v0.8.0~60^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9f070611d553a151a750db8ed52ee5947cb30629;p=xonotic%2Fxonotic-data.pk3dir.git Use polygons for beam instead of trailparticles --- diff --git a/effectinfo.txt b/effectinfo.txt index 63d808886..bb1dca51b 100644 --- a/effectinfo.txt +++ b/effectinfo.txt @@ -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 diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index d5f856425..80fcf5524 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -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 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 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");