From: Samual Lenks Date: Wed, 19 Feb 2014 01:46:04 +0000 (-0500) Subject: Set maxthickness based on beam type X-Git-Tag: xonotic-v0.8.0~152^2~81 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5334de88dd193ebc4376bf9cad1de2a8a6e952e2;p=xonotic%2Fxonotic-data.pk3dir.git Set maxthickness based on beam type --- diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index eb449cab1..7fac7f9d0 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -473,7 +473,7 @@ void Draw_ArcBeam() vector beam_endpos_estimate = (start_pos + (beamdir * self.beam_range)); float segments = 20; // todo: calculate this in a similar way to server does - float maxthickness = 8; + float maxthickness = self.beam_thickness; vector thickdir = normalize(cross(beamdir, view_origin - start_pos)); @@ -528,7 +528,7 @@ void Draw_ArcBeam() vector top = hitorigin + (thickdir * self.beam_thickness); vector bottom = hitorigin - (thickdir * self.beam_thickness); - R_BeginPolygon(self.beam_image, DRAWFLAG_NORMAL); + R_BeginPolygon(self.beam_image, DRAWFLAG_NORMAL); // DRAWFLAG_ADDITIVE R_PolygonVertex(top, '0 0.5 0' + ('0 0.5 0' * (self.beam_thickness / maxthickness)), self.beam_rgb, self.beam_alpha); R_PolygonVertex(last_top, '0 0.5 0' + ('0 0.5 0' * (lastthickness / maxthickness)), self.beam_rgb, self.beam_alpha); R_PolygonVertex(last_bottom, '0 0.5 0' * (1 - (lastthickness / maxthickness)), self.beam_rgb, self.beam_alpha);