From adf1d968c3e639033f42136fdc3dcaf987ebf7d6 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 24 May 2020 01:22:31 +1000 Subject: [PATCH] Call the gametype vote hooks before updating the map list, allows influencing the map selection via gametype votes --- qcsrc/server/mapvoting.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index acac831d7..523d32bbc 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -726,14 +726,14 @@ bool GameTypeVote_Finished(int pos) if(!gametypevote || gametypevote_finished) return false; + localcmd("sv_vote_gametype_hook_all\n"); + localcmd("sv_vote_gametype_hook_", mapvote_maps[pos], "\n"); + if ( !GameTypeVote_SetGametype(GameTypeVote_Type_FromString(mapvote_maps[pos])) ) { LOG_TRACE("Selected gametype is not supported by any map"); } - localcmd("sv_vote_gametype_hook_all\n"); - localcmd("sv_vote_gametype_hook_", mapvote_maps[pos], "\n"); - gametypevote_finished = true; return true; -- 2.39.2