From: Samual Lenks Date: Tue, 18 Feb 2014 23:36:55 +0000 (-0500) Subject: Also network maxangle and returnspeed X-Git-Tag: xonotic-v0.8.0~152^2~85 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0f6b35d5b6c652db43c1f7473f0260cd0a9e6392;p=xonotic%2Fxonotic-data.pk3dir.git Also network maxangle and returnspeed --- diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index 394491261..5558d8b94 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -364,7 +364,9 @@ void Net_ReadShockwaveParticle() .float beam_usevieworigin; .float beam_initialized; +.float beam_maxangle; .float beam_range; +.float beam_returnspeed; .vector beam_shotorigin; .vector beam_dir; void Draw_ArcBeam() @@ -431,10 +433,10 @@ void Draw_ArcBeam() { float angle = ceil(vlen(wantdir - self.beam_dir) * RAD2DEG); float anglelimit; - if(angle && (angle > cvar("g_balance_arc_beam_maxangle"))) + if(angle && (angle > self.beam_maxangle)) { // if the angle is greater than maxangle, force the blendfactor to make this the maximum factor - anglelimit = min(cvar("g_balance_arc_beam_maxangle") / angle, 1); + anglelimit = min(self.beam_maxangle / angle, 1); } else { @@ -443,7 +445,7 @@ void Draw_ArcBeam() } // calculate how much we're going to move the end of the beam to the want position - float blendfactor = bound(0, anglelimit * (1 - (cvar("g_balance_arc_beam_returnspeed") * frametime)), 1); + float blendfactor = bound(0, anglelimit * (1 - (self.beam_returnspeed * frametime)), 1); self.beam_dir = normalize((wantdir * (1 - blendfactor)) + (self.beam_dir * blendfactor)); } @@ -604,7 +606,9 @@ void Ent_ReadArcBeam(float isnew) if(sf & 1) // settings information { + self.beam_maxangle = ReadShort(); self.beam_range = ReadCoord(); + self.beam_returnspeed = ReadShort(); } if(sf & 2) // starting location diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index a47f1c57b..a8b0e08da 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -92,7 +92,9 @@ float W_Arc_Beam_Send(entity to, float sf) if(sf & 1) // settings information { + WriteShort(MSG_ENTITY, WEP_CVAR(arc, beam_maxangle)); WriteCoord(MSG_ENTITY, WEP_CVAR(arc, beam_range)); + WriteShort(MSG_ENTITY, WEP_CVAR(arc, beam_returnspeed)); } if(sf & 2) // starting location {