]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Call the gametype vote hooks before updating the map list, allows influencing the...
authorMario <mario.mario@y7mail.com>
Sat, 23 May 2020 15:22:31 +0000 (01:22 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 23 May 2020 15:22:31 +0000 (01:22 +1000)
qcsrc/server/mapvoting.qc

index acac831d76a181940782c1b074d7b5e0ef0b3d61..523d32bbcc4f3bcef9f22210e42c10fa5cec38ff 100644 (file)
@@ -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;