]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
if sv_vote_gametype_options has no valid gametypes, default to current one
authordrjaska <drjaska83@gmail.com>
Sun, 4 Jun 2023 14:11:32 +0000 (17:11 +0300)
committerdrjaska <drjaska83@gmail.com>
Sun, 4 Jun 2023 14:11:32 +0000 (17:11 +0300)
qcsrc/server/mapvoting.qc

index caa7a3c502b98854997fed6dea4fb202eea6c3ab..d29927234070968cb86242140367de60c28fc0ce 100644 (file)
@@ -89,6 +89,10 @@ int GameTypeVote_GetMask()
        gametype_mask = 0;
        for(j = 0; j < n; ++j)
                gametype_mask |= GameTypeVote_Type_FromString(argv(j)).m_flags;
+
+       if (gametype_mask == 0)
+               gametype_mask |= MapInfo_CurrentGametype().m_flags;
+
        return gametype_mask;
 }