]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
don't store a record if the player does not have a UID
authorFruitieX <fruitiex@gmail.com>
Tue, 9 Nov 2010 19:14:32 +0000 (21:14 +0200)
committerFruitieX <fruitiex@gmail.com>
Tue, 9 Nov 2010 19:14:32 +0000 (21:14 +0200)
qcsrc/server/race.qc

index 3786edbe5137d25c431da79d37036f9ea7b97361..27f32be8388637c28aedb6dc25f53d088d349b06 100644 (file)
@@ -167,6 +167,13 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
 
        // if we didn't hit a return yet, we have a new record!
 
+       // if the player does not have a UID we can unfortunately not store the record, as the rankings system relies on UIDs
+       if(myuid == "")
+       {
+               bprint(mynetname, "^1 scored a new record with ^7", TIME_ENCODED_TOSTRING(t), "^1, but lacks a UID, so the record will unfortunately be lost.\n");
+               return;
+       }
+
        oldrec = race_readTime(GetMapname(), newpos);
        oldrec_holder = race_readName(GetMapname(), newpos);