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 6bbd70d..ef4d53d 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 20f3d4f..fd438d8 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);