]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
CA: Give accuracy medals even if in loser team
authorz411 <z411@omaera.org>
Sat, 7 Nov 2020 20:06:14 +0000 (17:06 -0300)
committerz411 <z411@omaera.org>
Sat, 7 Nov 2020 20:07:53 +0000 (17:07 -0300)
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc

index 24d8781a12f060f2c99d5d60c17d670b7480a475..9f4091ec7760d63e3b3507adcf3d1977c252bc6c 100644 (file)
@@ -140,19 +140,16 @@ float CA_CheckWinner()
        FOREACH_CLIENT(IS_PLAYER(it), {
                nades_Clear(it);
                
-               if(it.team == winner_team)
-               {
-                       // Give perfect medal if everyone in the winner team is alive
-                       if(perfect) {
-                               Give_Medal(it, PERFECT);
-                       }
-                       
-                       // Give accuracy medal for each weapon above 50%
-                       entity ra = it.roundaccuracy;
-                       for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w) {
-                               if(ra.accuracy_fired[w] && (ra.accuracy_hit[w] / ra.accuracy_fired[w]) > 0.5) {
-                                       Give_Medal(it, ACCURACY);
-                               }
+               // Give perfect medal if everyone in the winner team is alive
+               if(perfect) {
+                       Give_Medal(it, PERFECT);
+               }
+               
+               // Give accuracy medal for each weapon above 50%
+               entity ra = it.roundaccuracy;
+               for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w) {
+                       if(ra.accuracy_fired[w] > 1 && (ra.accuracy_hit[w] / ra.accuracy_fired[w]) > 0.5) {
+                               Give_Medal(it, ACCURACY);
                        }
                }
        });