X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator_touchexplode.qc;h=fb58b3955cbbbcae1913b3628bce8e354a521dff;hp=f2d47a5ed1d31a8b732a8fd5cca06c7e50e62ae7;hb=bb80a6aba067167c6ef8d5f3465f03bd34142fa2;hpb=265b681e0fb49239df1bfc431a903f66244a3172 diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator_touchexplode.qc index f2d47a5ed..fb58b3955 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator_touchexplode.qc @@ -4,7 +4,7 @@ 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); @@ -12,22 +12,24 @@ void PlayerTouchExplode(entity p1, entity p2) entity e; e = spawn(); setorigin(e, org); - RadiusDamage(e, world, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, world, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE, world); + RadiusDamage(e, world, autocvar_g_touchexplode_damage, autocvar_g_touchexplode_edgedamage, autocvar_g_touchexplode_radius, world, world, autocvar_g_touchexplode_force, DEATH_TOUCHEXPLODE, world); remove(e); } MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink) { if(time > self.touchexplode_time) - if not(gameover) + if(!gameover) + if(!self.frozen) if(IS_PLAYER(self)) if(self.deadflag == DEAD_NO) - if not(IS_INDEPENDENT_PLAYER(self)) + 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 not(IS_INDEPENDENT_PLAYER(other)) + if (!IS_INDEPENDENT_PLAYER(other)) if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax)) { PlayerTouchExplode(self, other); @@ -35,12 +37,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; }