Don't count non-client attackers as valid for accuracy
authorMario <mario@smbclan.net>
Tue, 16 Oct 2018 20:18:31 +0000 (06:18 +1000)
committerMario <mario@smbclan.net>
Tue, 16 Oct 2018 20:18:31 +0000 (06:18 +1000)
qcsrc/server/weapons/accuracy.qc

index 8a7bac1b9f6dd0c22b5a1f79b822aef19298b127..0dc71ddcc01c1faa40be8307487b75a378d23067 100644 (file)
@@ -106,12 +106,12 @@ bool accuracy_isgooddamage(entity attacker, entity targ)
        if (mutator_check == MUT_ACCADD_INVALID) return true;
 
        if (mutator_check != MUT_ACCADD_VALID) return false;
-       if (!IS_CLIENT(targ)) return false;
+       if (!IS_CLIENT(targ) || !IS_CLIENT(attacker)) return false;
 
        return true;
 }
 
 bool accuracy_canbegooddamage(entity attacker)
 {
-       return !warmup_stage;
+       return !warmup_stage && IS_CLIENT(attacker);
 }