#include "mapvoting.qh"
#include "modeleffects.qh"
#include "mutators/events.qh"
-#include "particles.qh"
#include "quickmenu.qh"
#include "scoreboard.qh"
#include "shownames.qh"
return false;
}
-vector rotate(vector v, float a)
-{
- vector w = '0 0 0';
- // FTEQCC SUCKS AGAIN
- w.x = v.x * cos(a) + v.y * sin(a);
- w.y = -1 * v.x * sin(a) + v.y * cos(a);
- return w;
-}
-
// decolorizes and team colors the player name when needed
string playername(string thename, float teamid)
{
return vec;
}
-void dummyfunction(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8)
-{
-}
-
float expandingbox_sizefactor_from_fadelerp(float fadelerp)
{
return 1.2 / (1.2 - fadelerp);
sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
drawfontscale = sz * '1 1 0';
- dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
drawstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, false, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), rgb, theAlpha * (1 - fadelerp), flag);
// width parameter:
// (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
drawfontscale = sz * '1 1 0';
- dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, true, theScale * (sz / drawfontscale.x)) / (theScale.x * sz)), text, theScale * (sz / drawfontscale.x), theAlpha * (1 - fadelerp), flag);
drawfontscale = '1 1 0';
}
return false;
}
+/** engine callback */
void URI_Get_Callback(int id, float status, string data)
{
if(url_URI_Get_Callback(id, status, data))
}
}
-void draw_beginBoldFont()
-{
- drawfont = FONT_USER+2;
-}
-
-void draw_endBoldFont()
-{
- drawfont = FONT_USER+1;
-}
-
void Accuracy_LoadLevels()
{
if(autocvar_accuracy_color_levels != acc_color_levels)
vector project_3d_to_2d(vector vec);
-void dummyfunction(float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8);
+#define draw_beginBoldFont() do { drawfont = FONT_USER + 2; } while (0)
+#define draw_endBoldFont() do { drawfont = FONT_USER + 1; } while (0)
float expandingbox_sizefactor_from_fadelerp(float fadelerp);
float getplayerisdead(float pl);
-void URI_Get_Callback(int id, float status, string data);
-
-void draw_beginBoldFont();
-
-void draw_endBoldFont();
-
-
const int MAX_ACCURACY_LEVELS = 10;
float acc_lev[MAX_ACCURACY_LEVELS];
vector acc_col[MAX_ACCURACY_LEVELS];
+++ /dev/null
-#include "particles.qh"
-
-#include "../common/stats.qh"
-
-#include "../lib/warpzone/common.qh"
-
-void Net_ReadVortexBeamParticle()
-{
- vector shotorg, endpos;
- float charge;
- shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
- endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
- charge = ReadByte() / 255.0;
-
- pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
-
- //draw either the old v2.3 beam or the new beam
- charge = sqrt(charge); // divide evenly among trail spacing and alpha
- particles_alphamin = particles_alphamax = particles_fade = charge;
-
- if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
- WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
- else
- WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
-}
-NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
-{
- Net_ReadVortexBeamParticle();
- return true;
-}
+++ /dev/null
-#ifndef CLIENT_PARTICLES_H
-#define CLIENT_PARTICLES_H
-.int dphitcontentsmask;
-
-entityclass(PointParticles);
-class(PointParticles) .int cnt; // effect number
-class(PointParticles) .vector velocity; // particle velocity
-class(PointParticles) .float waterlevel; // direction jitter
-class(PointParticles) .int count; // count multiplier
-class(PointParticles) .int impulse; // density
-class(PointParticles) .string noise; // sound
-class(PointParticles) .float atten;
-class(PointParticles) .float volume;
-class(PointParticles) .float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
-class(PointParticles) .vector movedir; // trace direction
-
-void Draw_PointParticles(entity this);
-
-void Ent_PointParticles_Remove();
-
-class(PointParticles) .float glow_color; // palette index
-
-void Net_ReadVortexBeamParticle();
-#endif
#include "miscfunctions.qc"
#include "modeleffects.qc"
#include "movelib.qc"
-#include "particles.qc"
#include "player_skeleton.qc"
#include "rubble.qc"
#include "scoreboard.qc"
return out;
}
-vector yinvert(vector v)
-{
- v.y = 1 - v.y;
- return v;
-}
-
void draw_teamradar_background(float fg)
{
float fga;
vector teamradar_texcoord_to_3dcoord(vector in,float z);
-vector yinvert(vector v);
-
void draw_teamradar_background(float fg);
void draw_teamradar_player(vector coord3d, vector pangles, vector rgb);
void PM_multijump();
.float watertype;
+ .float waterlevel;
.int items;
.vector movement;
-#ifdef CSQC
- #include "../../../client/particles.qh"
-#endif
-
#ifdef SVQC
// NOTE: also contains func_sparks
}
#elif defined(CSQC)
+.int dphitcontentsmask;
+
+entityclass(PointParticles);
+class(PointParticles) .int cnt; // effect number
+class(PointParticles) .vector velocity; // particle velocity
+class(PointParticles) .float waterlevel; // direction jitter
+class(PointParticles) .int count; // count multiplier
+class(PointParticles) .int impulse; // density
+class(PointParticles) .string noise; // sound
+class(PointParticles) .float atten;
+class(PointParticles) .float volume;
+class(PointParticles) .float absolute; // 1 = count per second is absolute, 2 = only spawn at toggle
+class(PointParticles) .vector movedir; // trace direction
+class(PointParticles) .float glow_color; // palette index
+
void Draw_PointParticles(entity this)
{
float n, i, fail;
#endif
#endif
#ifdef IMPLEMENTATION
-#ifdef SVQC
-spawnfunc(weapon_vortex) { weapon_defaultspawnfunc(this, WEP_VORTEX); }
-spawnfunc(weapon_nex) { spawnfunc_weapon_vortex(this); }
+#if defined(SVQC)
void SendCSQCVortexBeamParticle(float charge) {
vector v;
v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
WriteCoord(MSG_BROADCAST, v.z);
WriteByte(MSG_BROADCAST, bound(0, 255 * charge, 255));
}
+#elif defined(CSQC)
+NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
+{
+ vector shotorg, endpos;
+ float charge;
+ shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
+ endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
+ charge = ReadByte() / 255.0;
+
+ pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
+
+ //draw either the old v2.3 beam or the new beam
+ charge = sqrt(charge); // divide evenly among trail spacing and alpha
+ particles_alphamin = particles_alphamax = particles_fade = charge;
+
+ if (autocvar_cl_particles_oldvortexbeam && (getstati(STAT_ALLOW_OLDVORTEXBEAM) || isdemo()))
+ WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+ else
+ WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
+ return true;
+}
+#endif
+
+#ifdef SVQC
+spawnfunc(weapon_vortex) { weapon_defaultspawnfunc(this, WEP_VORTEX); }
+spawnfunc(weapon_nex) { spawnfunc_weapon_vortex(this); }
void W_Vortex_Attack(Weapon thiswep, float issecondary)
{SELFPARAM();
return v;
}
+vector rotate(vector v, float a)
+{
+ float a_sin = sin(a), a_cos = cos(a);
+ vector r = '0 0 0';
+ r.x = v.x * a_cos + v.y * a_sin;
+ r.y = -1 * v.x * a_sin + v.y * a_cos;
+ return r;
+}
+
+vector yinvert(vector v)
+{
+ v.y = 1 - v.y;
+ return v;
+}
+
#ifndef MENUQC
vector get_corner_position(entity box, int corner)
{
string _Nex_ExtResponseSystem_Packs;
float _Nex_ExtResponseSystem_PacksStep;
+/** engine callback */
void URI_Get_Callback(float id, float status, string data)
{
if(url_URI_Get_Callback(id, status, data))
void UpdateNotification_URI_Get_Callback(float id, float status, string data);
-void URI_Get_Callback(float id, float status, string data);
-
// game type list box stuff (does not NEED to contain all game types, other
// types stay available via console)
int GameType_GetID(int cnt);
return false;
}
-
+/** engine callback */
void URI_Get_Callback(float id, float status, string data)
{
if(url_URI_Get_Callback(id, status, data))