]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/accuracy.qc
Merge branch 'sev/lumaIcons' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / accuracy.qc
index c0441ca162a375e20daa917385a118539f12e18b..8cd7ab66c346f5bc2041c747f116c8d15b412664 100644 (file)
@@ -1,6 +1,6 @@
 #include "accuracy.qh"
 
-#include "../mutators/_mod.qh"
+#include <server/mutators/_mod.qh>
 #include <common/constants.qh>
 #include <common/net_linked.qh>
 #include <common/teams.qh>
@@ -67,6 +67,7 @@ void accuracy_add(entity this, int w, int fired, int hit)
        entity a = CS(this).accuracy;
        if (!a) return;
        if (!hit && !fired) return;
+       if (w == WEP_Null.m_id) return;
        w -= WEP_FIRST;
        int b = accuracy_byte(a.accuracy_hit[w], a.accuracy_fired[w]);
        if (hit)    a.accuracy_hit  [w] += hit;
@@ -93,6 +94,7 @@ bool accuracy_isgooddamage(entity attacker, entity targ)
        int mutator_check = MUTATOR_CALLHOOK(AccuracyTargetValid, attacker, targ);
 
        if (warmup_stage) return false;
+       if (game_stopped) return false;
 
        // damage to dead/frozen players is good only if it happens in the frame they get killed / frozen
        // so that stats for weapons that shoot multiple projectiles per shot are properly counted