From: Rudolf Polzer Date: Tue, 19 Nov 2013 10:18:27 +0000 (+0100) Subject: Kill zcurveparticles due to 0 users. X-Git-Tag: xonotic-v0.8.0~190^2~4^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=94ebeb7c875fb0273f3936153662885508101d55;p=xonotic%2Fxonotic-data.pk3dir.git Kill zcurveparticles due to 0 users. --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index a06eb5e65..6423c16e5 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -1216,10 +1216,6 @@ float CSQC_Parse_TempEntity() Net_ReadRace(); bHandled = true; break; - case TE_CSQC_ZCURVEPARTICLES: - Net_ReadZCurveParticles(); - bHandled = true; - break; case TE_CSQC_NEXGUNBEAMPARTICLE: Net_ReadNexgunBeamParticle(); bHandled = true; diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index ce8b6dd7f..8751cc0c5 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -225,64 +225,6 @@ void Ent_RainOrSnow() self.draw = Draw_Snow; } -entity zcurve; -void zcurveparticles(float effectnum, vector start, vector end, float end_dz, float speed, float depth) -{ - // end_dz: - // IF IT WERE A STRAIGHT LINE, it'd end end_dz above end - - vector mid; - mid = (start + end) * 0.5; - - end_dz *= 0.25; - mid_z += end_dz; - - --depth; - if(depth < 0 || normalize(mid - start) * normalize(end - start) > 0.999999) - // TODO make this a variable threshold - // currently: 0.081 degrees - // 0.99999 would be 0.256 degrees and is visible - { - zcurve.velocity = speed * normalize(end - start); - trailparticles(zcurve, effectnum, start, end); - } - else - { - zcurveparticles(effectnum, start, mid, end_dz, speed, depth); - zcurveparticles(effectnum, mid, end, end_dz, speed, depth); - } -} - -void Net_ReadZCurveParticles() -{ - vector start, end; - float end_dz; - float effectnum, speed; - - if(!zcurve) - { - zcurve = spawn(); - zcurve.classname = "zcurve"; - } - - effectnum = ReadShort(); - - start_x = ReadCoord(); - start_y = ReadCoord(); - start_z = ReadCoord(); - - do - { - end_x = ReadCoord(); - end_y = ReadCoord(); - end_z = ReadCoord(); - end_dz = ReadCoord(); - speed = ReadShort(); - zcurveparticles(effectnum, start, end, end_dz, 16 * (speed & 0x7FFF), 5); // at most 32 segments - } - while(!(speed & 0x8000)); -} - void Net_ReadNexgunBeamParticle() { vector shotorg, endpos; diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 55d16953f..8ae465e54 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -30,7 +30,6 @@ const float AS_FLOAT = 8; const float TE_CSQC_PICTURE = 100; const float TE_CSQC_RACE = 101; -const float TE_CSQC_ZCURVEPARTICLES = 102; const float TE_CSQC_NEXGUNBEAMPARTICLE = 103; const float TE_CSQC_LIGHTNINGARC = 104; const float TE_CSQC_TEAMNAGGER = 105; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 947a6b92a..68ca7666b 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -2011,65 +2011,6 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f return FALSE; } -float zcurveparticles_effectno; -vector zcurveparticles_start; -float zcurveparticles_spd; - -void endzcurveparticles() -{ - if(zcurveparticles_effectno) - { - // terminator - WriteShort(MSG_BROADCAST, zcurveparticles_spd | 0x8000); - } - zcurveparticles_effectno = 0; -} - -void zcurveparticles(float effectno, vector start, vector end, float end_dz, float spd) -{ - spd = bound(0, floor(spd / 16), 32767); - if(effectno != zcurveparticles_effectno || start != zcurveparticles_start) - { - endzcurveparticles(); - WriteByte(MSG_BROADCAST, SVC_TEMPENTITY); - WriteByte(MSG_BROADCAST, TE_CSQC_ZCURVEPARTICLES); - WriteShort(MSG_BROADCAST, effectno); - WriteCoord(MSG_BROADCAST, start_x); - WriteCoord(MSG_BROADCAST, start_y); - WriteCoord(MSG_BROADCAST, start_z); - zcurveparticles_effectno = effectno; - zcurveparticles_start = start; - } - else - WriteShort(MSG_BROADCAST, zcurveparticles_spd); - WriteCoord(MSG_BROADCAST, end_x); - WriteCoord(MSG_BROADCAST, end_y); - WriteCoord(MSG_BROADCAST, end_z); - WriteCoord(MSG_BROADCAST, end_dz); - zcurveparticles_spd = spd; -} - -void zcurveparticles_from_tracetoss(float effectno, vector start, vector end, vector vel) -{ - float end_dz; - vector vecxy, velxy; - - vecxy = end - start; - vecxy_z = 0; - velxy = vel; - velxy_z = 0; - - if (vlen(velxy) < 0.000001 * fabs(vel_z)) - { - endzcurveparticles(); - trailparticles(world, effectno, start, end); - return; - } - - end_dz = vlen(vecxy) / vlen(velxy) * vel_z - (end_z - start_z); - zcurveparticles(effectno, start, end, end_dz, vlen(vel)); -} - void write_recordmarker(entity pl, float tstart, float dt) { GameLogEcho(strcat(":recordset:", ftos(pl.playerid), ":", ftos(dt)));