X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fshockwave.qc;h=6b357968a7c8ac993ac234b82b622a3d55314d39;hb=bda29da7c83e61ef45bce71d9a0c53115cd56752;hp=f38c34b19791182d9127b58a6459d12d8cc332db;hpb=18762ba5730e68b8ecfc075e218ae9d719978383;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index f38c34b19..6b357968a 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -3,18 +3,6 @@ REGISTER_NET_TEMP(TE_CSQC_SHOCKWAVEPARTICLE) #ifdef SVQC -// enable when shockwave replaces shotgun -#if 0 -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; -} -#endif const float MAX_SHOCKWAVE_HITS = 10; //#define DEBUG_SHOCKWAVE @@ -311,7 +299,7 @@ void W_Shockwave_Attack(Weapon thiswep, entity actor, .entity weaponentity) ); 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) @@ -479,7 +467,7 @@ void W_Shockwave_Attack(Weapon thiswep, entity actor, .entity weaponentity) // 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 @@ -759,8 +747,7 @@ NET_HANDLE(TE_CSQC_SHOCKWAVEPARTICLE, bool isNew) void Net_ReadShockwaveParticle() { - entity shockwave; - shockwave = spawn(); + entity shockwave = new(shockwave_cone); shockwave.draw = Draw_Shockwave; IL_PUSH(g_drawables, shockwave);