X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fnades%2Fnades.qc;h=1a82c28a6e421e0abf2e1f8980245f6600ec324f;hb=02f618451f5c061d2b1e407fac81fed18a636726;hp=720a8f0e80ee8618744a1eb7bd7e90aaec03426c;hpb=f9f74c9ba063af4c5369300e3be7ec5e565dbe83;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 720a8f0e8..1a82c28a6 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -696,6 +696,7 @@ void nade_touch() if(autocvar_g_nades_pickup) if(time >= self.spawnshieldtime) if(!other.nade && self.health == self.max_health) // no boosted shot pickups, thank you very much + if(!other.frozen) if(CanThrowNade(other)) // prevent some obvious things, like dead players if(IS_REAL_CLIENT(other)) // above checks for IS_PLAYER, don't need to do it here { @@ -819,9 +820,9 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time) makevectors(e.v_angle); - W_SetupShot(e, false, false, "", CH_WEAPON_A, 0); + W_SetupShot(e, false, false, SND_Null, CH_WEAPON_A, 0); - Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES); + Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER, CPID_NADES); vector offset = (v_forward * autocvar_g_nades_throw_offset.x) + (v_right * autocvar_g_nades_throw_offset.y) @@ -843,7 +844,7 @@ void toss_nade(entity e, bool set_owner, vector _velocity, float _time) if (trace_startsolid) setorigin(_nade, e.origin); - if(self.v_angle.x >= 70 && self.v_angle.x <= 110 && self.BUTTON_CROUCH) + if(self.v_angle.x >= 70 && self.v_angle.x <= 110 && PHYS_INPUT_BUTTON_CROUCH(self)) _nade.velocity = '0 0 100'; else if(autocvar_g_nades_nade_newton_style == 1) _nade.velocity = e.velocity + _velocity; @@ -1348,13 +1349,8 @@ MUTATOR_HOOKFUNCTION(nades, SpectateCopy) return false; } -MUTATOR_HOOKFUNCTION(nades, GetCvars) -{ - GetCvars_handleFloat(get_cvars_s, get_cvars_f, cvar_cl_nade_type, "cl_nade_type"); - GetCvars_handleString(get_cvars_s, get_cvars_f, cvar_cl_pokenade_type, "cl_pokenade_type"); - - return false; -} +REPLICATE(cvar_cl_nade_type, int, "cl_nade_type"); +REPLICATE(cvar_cl_pokenade_type, string, "cl_pokenade_type"); MUTATOR_HOOKFUNCTION(nades, BuildMutatorsString) {