X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator_touchexplode.qc;h=4f49d550d9704aa1d44a4959288db4dae0168770;hb=c89dfaa4d0342b98c320621557973a65114fbdf4;hp=fb58b3955cbbbcae1913b3628bce8e354a521dff;hpb=bb80a6aba067167c6ef8d5f3465f03bd34142fa2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator_touchexplode.qc index fb58b3955..4f49d550d 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator_touchexplode.qc @@ -1,13 +1,17 @@ +#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, W_Sound("grenade_impact"), VOL_BASE, ATTEN_NORM); + Send_Effect(EFFECT_EXPLOSION_SMALL, org, '0 0 0', 1); entity e; e = spawn(); @@ -17,7 +21,7 @@ void PlayerTouchExplode(entity p1, entity p2) } MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink) -{ +{SELFPARAM(); if(time > self.touchexplode_time) if(!gameover) if(!self.frozen)