]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
oops, remove some testing code I accidentally put in the previous commit
authorterencehill <piuntn@gmail.com>
Sun, 5 Feb 2023 00:12:58 +0000 (01:12 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 5 Feb 2023 00:12:58 +0000 (01:12 +0100)
qcsrc/server/command/vote.qc

index 9095bb43a2814826b5aedf126ec05cf14e631de2..a1675ba566f5a25e06569a8b9c201b2798f0c053 100644 (file)
@@ -877,29 +877,6 @@ void print_available_commands_to(entity caller)
        print_to(caller, strcat("You can call a vote for or execute these commands: ^3", autocvar_sv_vote_commands, "^7 and maybe further ^3arguments^7"));
 }
 
-bool VoteCommand_checkclients()
-{
-       float c = 0, nc = 0;
-       FOREACH_CLIENT(true,
-       {
-               //if(!IS_DISCONNECTED_CLIENT(it)) c++;
-               if(!IS_BOT_CLIENT(it)) c++; // test code, counts bots as unconnected
-               else nc++;
-       });
-       LOG_INFOF("^x8f0 %d / %d\n", c, nc);
-       if (!nc)
-               return false;
-       // if true vote is not allowed
-       // connessi 2 non connessi 1  false   allowed
-       // connessi 3 non connessi 1  false   allowed
-       // connessi 2 non connessi 2  true  not allowed
-       // connessi 3 non connessi 2  true  not allowed
-       // connessi 5 non connessi 3  true  not allowed
-       // connessi 5 non connessi 2  false   allowed
-       // if the not connected are half or less
-       return (c < nc * 2);
-}
-
 void VoteCommand_call(int request, entity caller, int argc, string vote_command)  // BOTH
 {
        switch (request)
@@ -919,10 +896,6 @@ void VoteCommand_call(int request, entity caller, int argc, string vote_command)
                        {
                                print_to(caller, "^1Vote calling is not allowed before the match has started.");
                        }
-                       else if (time < 10) // test, change to 4 or somthing
-                       {
-                               print_to(caller, "^1Vote calling is not allowed in the very first seconds of the game.");
-                       }
                        else if (vote_called)
                        {
                                print_to(caller, "^1There is already a vote called.");
@@ -931,10 +904,6 @@ void VoteCommand_call(int request, entity caller, int argc, string vote_command)
                        {
                                print_to(caller, "^1Only players can call a vote.");
                        }
-                       else if (VoteCommand_checkclients())
-                       {
-                               print_to(caller, "^1Too many unconnected clients.");
-                       }
                        else if (caller && !IS_CLIENT(caller))
                        {
                                print_to(caller, "^1Only connected clients can vote.");