]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/vote.qc
Merge branch 'master' into bones_was_here/q3compat
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qc
index 1869a15a898dc51a15ccbe25f8abe9d0714fee64..16b636c85158ebac30f50159f4d9b1141f7c0119 100644 (file)
@@ -1,15 +1,18 @@
 #include "vote.qh"
 
-#include <server/defs.qh>
-#include <server/miscfunctions.qh>
+#include <server/client.qh>
+#include <common/weapons/_all.qh>
+#include <common/stats.qh>
+#include <server/gamelog.qh>
 
 #include <common/command/_mod.qh>
 #include "vote.qh"
 
 #include "common.qh"
 
-#include "../g_damage.qh"
-#include "../g_world.qh"
+#include "../damage.qh"
+#include <server/intermission.qh>
+#include <server/world.qh>
 #include "../teamplay.qh"
 #include "../race.qh"
 #include "../round_handler.qh"
@@ -116,7 +119,7 @@ void Nagger_ReadyCounted()
 // If the vote_caller is still here, return their name, otherwise vote_caller_name
 string OriginalCallerName()
 {
-       if (IS_REAL_CLIENT(vote_caller)) return playername(vote_caller, false);
+       if (IS_REAL_CLIENT(vote_caller)) return playername(vote_caller.netname, vote_caller.team, false);
        return vote_caller_name;
 }
 
@@ -476,7 +479,7 @@ void ReadyRestart_force()
 
 void ReadyRestart()
 {
-       if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || game_stopped || race_completing) localcmd("restart\n");
+       if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || intermission_running || race_completing) localcmd("restart\n");
        else localcmd("\nsv_hook_readyrestart\n");
 
        // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
@@ -835,7 +838,7 @@ void VoteCommand_call(int request, entity caller, int argc, string vote_command)
                        {
                                print_to(caller, "^1Only connected clients can vote.");
                        }
-                       else if (timeout_status)
+                       else if (timeout_status && vote_command != "timein")
                        {
                                print_to(caller, "^1You can not call a vote while a timeout is active.");
                        }