X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator_touchexplode.qc;h=e78b0d78fc09ab1153eb74b5c65c78e98b594a0d;hb=2ce2f533321210bef1f49b1245a8ea1fda15eea4;hp=a45c64f5c5b03fa42513b3f342ed3cd056510e76;hpb=6e12e42c14caa13f188ad12ce1fce1358428bee4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator_touchexplode.qc index a45c64f5c..e78b0d78f 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator_touchexplode.qc @@ -1,17 +1,16 @@ -#include "../_all.qh" #include "mutator.qh" .float touchexplode_time; void PlayerTouchExplode(entity p1, entity p2) -{ +{SELFPARAM(); vector org; org = (p1.origin + p2.origin) * 0.5; org.z += (p1.mins.z + p2.mins.z) * 0.5; - sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTEN_NORM); - pointparticles(particleeffectnum("explosion_small"), org, '0 0 0', 1); + sound(self, CH_TRIGGER, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM); + Send_Effect(EFFECT_EXPLOSION_SMALL, org, '0 0 0', 1); entity e; e = spawn(); @@ -21,7 +20,7 @@ void PlayerTouchExplode(entity p1, entity p2) } MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink) -{ +{SELFPARAM(); if(time > self.touchexplode_time) if(!gameover) if(!self.frozen)