4 .float touchexplode_time;
6 void PlayerTouchExplode(entity p1, entity p2)
9 org = (p1.origin + p2.origin) * 0.5;
10 org.z += (p1.mins.z + p2.mins.z) * 0.5;
12 sound(self, CH_TRIGGER, SND_GRENADE_IMPACT, VOL_BASE, ATTEN_NORM);
13 Send_Effect(EFFECT_EXPLOSION_SMALL, org, '0 0 0', 1);
18 RadiusDamage(e, world, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, world, world, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE, world);
22 MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink)
24 if(time > self.touchexplode_time)
28 if(self.deadflag == DEAD_NO)
29 if (!IS_INDEPENDENT_PLAYER(self))
30 FOR_EACH_PLAYER(other) if(self != other)
32 if(time > other.touchexplode_time)
34 if(other.deadflag == DEAD_NO)
35 if (!IS_INDEPENDENT_PLAYER(other))
36 if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax))
38 PlayerTouchExplode(self, other);
39 self.touchexplode_time = other.touchexplode_time = time + 0.2;
46 MUTATOR_DEFINITION(mutator_touchexplode)
48 MUTATOR_HOOK(PlayerPreThink, touchexplode_PlayerThink, CBC_ORDER_ANY);