]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix accuracy board always showing 0% average accuracy, long time bug present since...
authorterencehill <piuntn@gmail.com>
Tue, 5 Feb 2013 15:37:35 +0000 (16:37 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 5 Feb 2013 15:37:35 +0000 (16:37 +0100)
qcsrc/client/scoreboard.qc

index a576ae4937e5c40e683cafc752c5094920f50e76..1aa1b6a435ac5d015e5c27f0d4cd24cbbfdc61bf 100644 (file)
@@ -1044,7 +1044,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        }
 
        if(weapons_with_stats)
-               average_accuracy = floor(average_accuracy / weapons_with_stats);
+               average_accuracy = floor((average_accuracy * 100 / weapons_with_stats) + 0.5);
 
        if(rows == 2)
                pos_x -= weapon_width / 2;