X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Ftouchexplode%2Ftouchexplode.qc;h=56fc4573673eeac551f5b49d4cca1ed5e467b824;hb=0f91a71ce7434276a96bcb5fec24bf5702369749;hp=ec439489d0de383c50681330fc4225a56c62c600;hpb=c741e6b3f012aa525f23e1df30d1d933b383fbc5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc index ec439489d..56fc45736 100644 --- a/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc +++ b/qcsrc/common/mutators/mutator/touchexplode/touchexplode.qc @@ -26,22 +26,21 @@ MUTATOR_HOOKFUNCTION(touchexplode, PlayerPreThink) {SELFPARAM(); if(time > self.touchexplode_time) if(!gameover) - if(!self.frozen) + if(!STAT(FROZEN, self)) 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)) - { - PlayerTouchExplode(self, other); - self.touchexplode_time = other.touchexplode_time = time + 0.2; - } - } + if(!IS_DEAD(self)) + if(!IS_INDEPENDENT_PLAYER(self)) + FOREACH_CLIENT(IS_PLAYER(it) && it != self, LAMBDA( + if(time > it.touchexplode_time) + if(!STAT(FROZEN, it)) + if(!IS_DEAD(it)) + if (!IS_INDEPENDENT_PLAYER(it)) + if(boxesoverlap(self.absmin, self.absmax, it.absmin, it.absmax)) + { + PlayerTouchExplode(self, it); + self.touchexplode_time = it.touchexplode_time = time + 0.2; + } + )); return false; }