]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't send awards to bots
authorMario <mario.mario@y7mail.com>
Wed, 4 Jun 2014 23:05:32 +0000 (09:05 +1000)
committerMario <mario.mario@y7mail.com>
Wed, 4 Jun 2014 23:05:32 +0000 (09:05 +1000)
qcsrc/server/mutators/gamemode_cts.qc
qcsrc/server/mutators/gamemode_race.qc

index 6bbd70dabfa9d6fd6bc8ce81e6a59146cab8ddda..ef4d53dad061c34511c4e8fc58e0715b755aa26a 100644 (file)
@@ -143,21 +143,23 @@ MUTATOR_HOOKFUNCTION(cts_ClientConnect)
        race_PreparePlayer();
        self.race_checkpoint = -1;
        
-       string rr = CTS_RECORD;
+       if(IS_REAL_CLIENT(self))
+       {
+               string rr = CTS_RECORD;
 
-       msg_entity = self;
-       race_send_recordtime(MSG_ONE);
-       race_send_speedaward(MSG_ONE);
+               msg_entity = self;
+               race_send_recordtime(MSG_ONE);
+               race_send_speedaward(MSG_ONE);
 
-       speedaward_alltimebest = stof(db_get(ServerProgsDB, strcat(GetMapname(), rr, "speed/speed")));
-       speedaward_alltimebest_holder = uid2name(db_get(ServerProgsDB, strcat(GetMapname(), rr, "speed/crypto_idfp")));
-       race_send_speedaward_alltimebest(MSG_ONE);
+               speedaward_alltimebest = stof(db_get(ServerProgsDB, strcat(GetMapname(), rr, "speed/speed")));
+               speedaward_alltimebest_holder = uid2name(db_get(ServerProgsDB, strcat(GetMapname(), rr, "speed/crypto_idfp")));
+               race_send_speedaward_alltimebest(MSG_ONE);
 
-       float i;
-       if(IS_REAL_CLIENT(self))
-       for (i = 1; i <= RANKINGS_CNT; ++i)
-       {
-               race_SendRankings(i, 0, 0, MSG_ONE);
+               float i;
+               for (i = 1; i <= RANKINGS_CNT; ++i)
+               {
+                       race_SendRankings(i, 0, 0, MSG_ONE);
+               }
        }
 
        return FALSE;
@@ -281,7 +283,7 @@ MUTATOR_DEFINITION(gamemode_cts)
        MUTATOR_HOOK(PlayerSpawn, cts_PlayerSpawn, CBC_ORDER_ANY);
        MUTATOR_HOOK(PutClientInServer, cts_PutClientInServer, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerDies, cts_PlayerDies, CBC_ORDER_ANY);
-       MUTATOR_HOOK(HavocBot_ChooseRule, cts_BotRoles, CBC_ORDER_ANY);
+       MUTATOR_HOOK(HavocBot_ChooseRole, cts_BotRoles, CBC_ORDER_ANY);
        MUTATOR_HOOK(GetPressedKeys, cts_PlayerPostThink, CBC_ORDER_ANY);
        MUTATOR_HOOK(ForbidThrowCurrentWeapon, cts_ForbidThrowing, CBC_ORDER_ANY);
        MUTATOR_HOOK(FilterItem, cts_FilterItem, CBC_ORDER_ANY);
index 20f3d4ffb189902e0b96a0bcf855df323ba4e487..fd438d8d9394a96bd5950116a1da9520f5fdd5bb 100644 (file)
@@ -277,7 +277,7 @@ MUTATOR_DEFINITION(gamemode_race)
        MUTATOR_HOOK(PlayerSpawn, race_PlayerSpawn, CBC_ORDER_ANY);
        MUTATOR_HOOK(PutClientInServer, race_PutClientInServer, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerDies, race_PlayerDies, CBC_ORDER_ANY);
-       MUTATOR_HOOK(HavocBot_ChooseRule, race_BotRoles, CBC_ORDER_ANY);
+       MUTATOR_HOOK(HavocBot_ChooseRole, race_BotRoles, CBC_ORDER_ANY);
        MUTATOR_HOOK(GetPressedKeys, race_PlayerPostThink, CBC_ORDER_ANY);
        MUTATOR_HOOK(ForbidPlayerScore_Clear, race_ForbidClearPlayerScore, CBC_ORDER_ANY);
        MUTATOR_HOOK(GetTeamCount, race_GetTeamCount, CBC_ORDER_ANY);