From: Rudolf Polzer Date: Wed, 20 Jul 2011 11:44:55 +0000 (+0200) Subject: ignore suggested maps if they are in the wrong game type X-Git-Tag: xonotic-v0.5.0~148^2~47 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=949f089b02939aed58f6d1018021d10d0ae8099e;p=xonotic%2Fxonotic-data.pk3dir.git ignore suggested maps if they are in the wrong game type --- diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 9a3533f4c..4e56c0272 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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);