]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make the score comparison result quicker by checking the .playerid of the clientstate...
authorMario <mario@smbclan.net>
Tue, 19 Jun 2018 07:01:29 +0000 (17:01 +1000)
committerMario <mario@smbclan.net>
Tue, 19 Jun 2018 07:01:29 +0000 (17:01 +1000)
qcsrc/server/scores.qc

index 2cb40a83492d88f454622f2c6dc9a6a47b7a7d15..af2f4b574f43a57f0c098d19c47b5fe2754428ac 100644 (file)
@@ -402,7 +402,7 @@ float PlayerScore_Compare(entity t1, entity t2, float strict)
        });
 
        if (result.x == 0 && strict)
-               result.x = etof(t1.owner) - etof(t2.owner);
+               result.x = t1.owner.playerid - t2.owner.playerid;
 
        return result.x;
 }