X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fvote.qc;h=d79c2418d7adec421473ee7534ea01b9fe553c8c;hb=19794b31e782cca0f5a0d916bc5fd4dc6156eeaf;hp=6d9b4d76e115b8189700c35fb0201d6369b99bca;hpb=677328b0b1e53bdd5868d5020d2f7e52cf8c2d42;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 6d9b4d76e..d79c2418d 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -345,6 +345,11 @@ void reset_map(bool dorespawn) round_handler_Reset(game_starttime); } + if (shuffleteams_on_reset_map) + { + shuffleteams(); + shuffleteams_on_reset_map = false; + } MUTATOR_CALLHOOK(reset_map_global); FOREACH_ENTITY_FLOAT_ORDERED(pure_data, false, @@ -365,7 +370,7 @@ void reset_map(bool dorespawn) if (it.reset2) it.reset2(it); }); - FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), { Unfreeze(it); }); + FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), { Unfreeze(it, false); }); // Moving the player reset code here since the player-reset depends // on spawnpoint entities which have to be reset first --blub @@ -714,6 +719,16 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa break; } + case "restart": + { + // add a delay so that vote result can be seen and announcer can be heard + // if the vote is accepted + vote_parsed_command = strcat("defer 1 ", vote_command); + vote_parsed_display = strzone(strcat("^1", vote_command)); + + break; + } + default: { vote_parsed_command = vote_command; @@ -825,14 +840,15 @@ void VoteCommand_call(int request, entity caller, int argc, string vote_command) } FOREACH_CLIENT(IS_REAL_CLIENT(it), { ++tmp_playercount; }); - if (tmp_playercount > 1) - Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_VOTE_CALL); bprint("\{1}^2* ^3", OriginalCallerName(), "^2 calls a vote for ", vote_called_display, "\n"); if (autocvar_sv_eventlog) GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); Nagger_VoteChanged(); VoteCount(true); // needed if you are the only one + + if (tmp_playercount > 1 && vote_called != VOTE_NULL) + Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_VOTE_CALL); } return;