]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/vote.qc
Merge branch 'master' into TimePath/combined_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qc
index 01ecd78979b35922b2bd302e85ec7ab0a059f685..214083eaee9f32c080ad221512e3dfe39a28ba58 100644 (file)
@@ -326,9 +326,7 @@ void reset_map(float dorespawn)
        if(time <= game_starttime && round_handler_IsActive())
                round_handler_Reset(game_starttime);
 
-       if(g_race || g_cts)
-               race_ReadyRestart();
-       else MUTATOR_CALLHOOK(reset_map_global);
+       MUTATOR_CALLHOOK(reset_map_global);
 
        for(self = world; (self = nextent(self)); )
        if(IS_NOT_A_CLIENT(self))
@@ -357,6 +355,10 @@ void reset_map(float dorespawn)
                }
        }
 
+       FOR_EACH_PLAYER(self)
+       if(self.frozen)
+               Unfreeze(self);
+
        // Moving the player reset code here since the player-reset depends
        // on spawnpoint entities which have to be reset first --blub
        if(dorespawn)
@@ -423,7 +425,7 @@ void ReadyRestart_force()
        {
                tmp_player.alivetime = 0;
                tmp_player.killcount = 0;
-               PlayerStats_Event(tmp_player, PLAYERSTATS_ALIVETIME, -PlayerStats_Event(tmp_player, PLAYERSTATS_ALIVETIME, 0));
+               PS_GR_P_ADDVAL(tmp_player, PLAYERSTATS_ALIVETIME, -PS_GR_P_ADDVAL(tmp_player, PLAYERSTATS_ALIVETIME, 0));
        }
 
        restart_mapalreadyrestarted = 0; // reset this var, needed when cvar sv_ready_restart_repeatable is in use
@@ -463,7 +465,7 @@ void ReadyRestart_force()
 void ReadyRestart()
 {
        // no arena, assault support yet...
-       if(g_arena | g_assault | gameover | intermission_running | race_completing)
+       if(g_assault | gameover | intermission_running | race_completing)
                localcmd("restart\n");
        else
                localcmd("\nsv_hook_gamerestart\n");
@@ -668,10 +670,10 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl
 
        first_command = argv(startpos);
 
-       /*dprint(sprintf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
+       /*printf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
                substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos)),
                strlen(substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos)))
-       ));*/
+       );*/
 
        if(
                (autocvar_sv_vote_limit > 0)
@@ -1013,7 +1015,7 @@ void VoteCommand_yes(float request, entity caller) // CLIENT ONLY
                case CMD_REQUEST_COMMAND:
                {
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
-                       else if(caller.vote_selection != VOTE_SELECT_NULL && autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
+                       else if(caller.vote_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
 
                        else // everything went okay, continue changing vote
                        {