]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
ignore suggested maps if they are in the wrong game type
authorRudolf Polzer <divVerent@xonotic.org>
Wed, 20 Jul 2011 11:44:55 +0000 (13:44 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Wed, 20 Jul 2011 11:44:55 +0000 (13:44 +0200)
qcsrc/server/g_world.qc

index 9a3533f4cdd6ca514433d2cba6f9c00bbc01413e..4e56c0272c303825fbff734a226e907b8aadce1a 100644 (file)
@@ -2361,6 +2361,10 @@ void MapVote_AddVotable(string nextMap, float isSuggestion)
        for(j = 0; j < mapvote_count; ++j)
                if(mapvote_maps[j] == nextMap)
                        return;
+       // suggestions might be no longer valid/allowed after gametype switch!
+       if(isSuggestion)
+               if(!MapInfo_CheckMap(nextMap))
+                       return;
        if(strlen(nextMap) > mapvote_maxlen)
                mapvote_maxlen = strlen(nextMap);
        mapvote_maps[mapvote_count] = strzone(nextMap);