]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/accuracy.qc
Merge branch 'master' into terencehill/accuracy_shotgun
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / accuracy.qc
index 05a46f1968ead9a1da68ba85eb3dafb35083d9a1..879dd88327bdf17824d08dfd85c7a819ceb4010b 100644 (file)
@@ -85,7 +85,7 @@ void accuracy_add(entity this, int w, int fired, int hit)
        if (b == accuracy_byte(a.accuracy_hit[w], a.accuracy_fired[w])) return; // no change
        int sf = 1 << (w % 24);
        a.SendFlags |= sf;
-       FOREACH_CLIENT(IS_SPEC(it) && it.enemy == this, LAMBDA(CS(it).accuracy.SendFlags |= sf));
+       FOREACH_CLIENT(IS_SPEC(it) && it.enemy == this, { CS(it).accuracy.SendFlags |= sf; });
 }
 
 bool accuracy_isgooddamage(entity attacker, entity targ)
@@ -93,8 +93,8 @@ bool accuracy_isgooddamage(entity attacker, entity targ)
        int mutator_check = MUTATOR_CALLHOOK(AccuracyTargetValid, attacker, targ);
 
        if (warmup_stage) return false;
-       if (IS_DEAD(targ)) return false;
-       if (STAT(FROZEN, targ)) return false;
+       if (IS_DEAD(targ) && time > targ.death_time) return false;
+       if (STAT(FROZEN, targ) && time > targ.freeze_time) return false;
        if (SAME_TEAM(attacker, targ)) return false;
 
        if (mutator_check == MUT_ACCADD_INVALID) return true;