REGISTER_NET_TEMP(TE_CSQC_SHOCKWAVEPARTICLE)
#ifdef SVQC
-METHOD(Shockwave, m_spawnfunc_hookreplace, Weapon(Shockwave this, entity e))
-{
- //if(autocvar_sv_q3acompat_machineshockwaveswap) // WEAPONTODO
- if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e))
- {
- return WEP_MACHINEGUN;
- }
- return this;
-}
const float MAX_SHOCKWAVE_HITS = 10;
//#define DEBUG_SHOCKWAVE
);
float lag = ((IS_REAL_CLIENT(actor)) ? ANTILAG_LATENCY(actor) : 0);
- bool noantilag = ((IS_CLIENT(actor)) ? CS(actor).cvar_cl_noantilag : false);
+ bool noantilag = ((IS_CLIENT(actor)) ? CS_CVAR(actor).cvar_cl_noantilag : false);
if(lag < 0.001)
lag = 0;
if(autocvar_g_antilag == 0 || noantilag)
// BLAST CONE CALCULATION
// ========================
- // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc)
+ // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in damage.qc)
center = CENTER_OR_VIEWOFS(head);
// find the closest point on the enemy to the center of the attack
// WEAPONTODO: trace to find what we actually hit
vector endpos = (this.sw_shotorg + (this.sw_shotdir * this.sw_distance));
- VECTOR_VECTORS_NEW(this.sw_shotdir, _forward, right, up);
+ vector _forward, right, up;
+ VECTOR_VECTORS(this.sw_shotdir, _forward, right, up);
// WEAPONTODO: combine and simplify these calculations
vector min_end = ((this.sw_shotorg + (this.sw_shotdir * SW_DISTTOMIN)) + (up * this.sw_spread_min));
if(counter >= 1)
{
// draw from shot origin to min spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(this.sw_shotorg, '0 0 0', sw_color, a);
R_EndPolygon();
// draw from min spread radius to max spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
if((counter + 1) == divisions)
{
// draw from shot origin to min spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(this.sw_shotorg, '0 0 0', sw_color, a);
R_EndPolygon();
// draw from min spread radius to max spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
void Net_ReadShockwaveParticle()
{
- entity shockwave;
- shockwave = spawn();
+ entity shockwave = new(shockwave_cone);
shockwave.draw = Draw_Shockwave;
IL_PUSH(g_drawables, shockwave);