]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
no acc for independent players (CTS)
authorRudolf Polzer <divverent@alientrap.org>
Tue, 21 Feb 2012 14:52:07 +0000 (15:52 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 21 Feb 2012 14:52:07 +0000 (15:52 +0100)
qcsrc/server/accuracy.qc
qcsrc/server/accuracy.qh

index de6b52752b95b358503e9fdd1a846377bd4f6bc6..f17593af95c8cb54fc85ccb33073ddef8ce193d2 100644 (file)
@@ -62,32 +62,6 @@ void accuracy_resend(entity e)
 }
 
 // update accuracy stats
-void accuracy_set(entity e, float w, float fired, float hit)
-{
-       entity a;
-       float b;
-       a = e.accuracy;
-       if(!a)
-               return;
-       w -= WEP_FIRST;
-       b = accuracy_byte(a.(accuracy_hit[w]), a.(accuracy_fired[w]));
-       a.(accuracy_hit[w]) = hit;
-       a.(accuracy_fired[w]) = fired;
-
-    if(hit)
-        a.(accuracy_cnt_hit[w]) = 1;
-    a.(accuracy_cnt_fired[w]) = 1;
-
-       if(b == accuracy_byte(hit, fired))
-               return;
-       w = pow(2, w);
-       a.SendFlags |= w;
-       FOR_EACH_CLIENT(a)
-               if(a.classname == "spectator")
-                       if(a.enemy == e)
-                               a.SendFlags |= w;
-}
-
 .float hit_time;
 .float fired_time;
 
@@ -95,6 +69,8 @@ void accuracy_add(entity e, float w, float fired, float hit)
 {
        entity a;
        float b;
+       if(IS_INDEPENDENT_PLAYER(e))
+               return;
        a = e.accuracy;
        if(!a || !(hit || fired))
                return;
index 84488fc7796954883c6e484342945b597b5bc6eb..90dbb663ded8fd2645213eb80a9022143f8571ea 100644 (file)
@@ -8,7 +8,6 @@ void accuracy_free(entity e);
 void accuracy_resend(entity e);
 
 // update accuracy stats
-void accuracy_set(entity e, float w, float fired, float hit);
 void accuracy_add(entity e, float w, float fired, float hit);
 
 // helper