X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fvortex.qc;h=c0c434561736764acd3231140665e0152774b647;hb=3bdee6303ce762a39c2ad67a70745668ba298043;hp=0faccbbb73eec00d61f717dd45cb5da2b56851ea;hpb=35ded46b934755480248ac4ffe5d9ca4cc5dcc4e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 0faccbbb7..c0c434561 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -144,14 +144,14 @@ REGISTER_MUTATOR(vortex_charge, true); MUTATOR_HOOKFUNCTION(vortex_charge, GetPressedKeys) {SELFPARAM(); // WEAPONTODO - float xyspeed = vlen(vec2(self.velocity)); - if (PS(self).m_weapon == WEP_VORTEX && WEP_CVAR(vortex, charge) && WEP_CVAR(vortex, charge_velocity_rate) && xyspeed > WEP_CVAR(vortex, charge_minspeed)) + float xyspeed = vlen(vec2(this.velocity)); + if (PS(this).m_weapon == WEP_VORTEX && WEP_CVAR(vortex, charge) && WEP_CVAR(vortex, charge_velocity_rate) && xyspeed > WEP_CVAR(vortex, charge_minspeed)) { // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed xyspeed = min(xyspeed, WEP_CVAR(vortex, charge_maxspeed)); float f = (xyspeed - WEP_CVAR(vortex, charge_minspeed)) / (WEP_CVAR(vortex, charge_maxspeed) - WEP_CVAR(vortex, charge_minspeed)); // add the extra charge - self.vortex_charge = min(1, self.vortex_charge + WEP_CVAR(vortex, charge_velocity_rate) * f * PHYS_INPUT_TIMELENGTH); + this.vortex_charge = min(1, this.vortex_charge + WEP_CVAR(vortex, charge_velocity_rate) * f * PHYS_INPUT_TIMELENGTH); } } @@ -382,7 +382,7 @@ METHOD(Vortex, wr_impacteffect, void(entity thiswep)) vector org2 = w_org + w_backoff * 6; pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1); if(!w_issilent) - sound(self, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); + sound(this, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); } METHOD(Vortex, wr_init, void(entity thiswep)) {