X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator_touchexplode.qc;h=a45c64f5c5b03fa42513b3f342ed3cd056510e76;hb=046bea116835a7d137712f2f1d4e6fd62cce5769;hp=9e3023b7215496e3bce03026982b74b8f58d1df5;hpb=0ee74987765518ffed584a790f90607c3f3f8e71;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator_touchexplode.qc index 9e3023b72..a45c64f5c 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator_touchexplode.qc @@ -1,10 +1,14 @@ +#include "../_all.qh" + +#include "mutator.qh" + .float touchexplode_time; void PlayerTouchExplode(entity p1, entity p2) { vector org; org = (p1.origin + p2.origin) * 0.5; - org_z += (p1.mins_z + p2.mins_z) * 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); @@ -19,13 +23,15 @@ void PlayerTouchExplode(entity p1, entity p2) MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink) { if(time > self.touchexplode_time) - if (!gameover) + if(!gameover) + if(!self.frozen) if(IS_PLAYER(self)) if(self.deadflag == DEAD_NO) if (!IS_INDEPENDENT_PLAYER(self)) FOR_EACH_PLAYER(other) if(self != other) { if(time > other.touchexplode_time) + if(!other.frozen) if(other.deadflag == DEAD_NO) if (!IS_INDEPENDENT_PLAYER(other)) if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax)) @@ -35,12 +41,12 @@ MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink) } } - return FALSE; + return false; } MUTATOR_DEFINITION(mutator_touchexplode) { MUTATOR_HOOK(PlayerPreThink, touchexplode_PlayerThink, CBC_ORDER_ANY); - return FALSE; + return false; }