From d3ad6bb968f84b2aa2269d3b9951e733f0f7b903 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 17 Jun 2014 16:05:37 +1000 Subject: [PATCH] Fix some issues mentioned by divVerent and add Melanosuchus to credits --- qcsrc/common/mapinfo.qc | 3 +-- qcsrc/server/mapvoting.qc | 8 ++++++-- xonotic-credits.txt | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 3d0685457..b060b375f 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -1145,8 +1145,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype { if(!(MapInfo_Map_supportedGametypes & pGametypeToSet)) { - //error("Can't select the requested game type. This should never happen as the caller should prevent it!\n"); - return 0; + error("Can't select the requested game type. This should never happen as the caller should prevent it!\n"); //_MapInfo_Map_ApplyGametypeEx("", pGametypeToSet, MAPINFO_TYPE_DEATHMATCH); //return; } diff --git a/qcsrc/server/mapvoting.qc b/qcsrc/server/mapvoting.qc index 7a016fd4b..c5e32c4d8 100644 --- a/qcsrc/server/mapvoting.qc +++ b/qcsrc/server/mapvoting.qc @@ -5,8 +5,12 @@ float GameTypeVote_AvailabilityStatus(string gtname) return GTV_FORBIDDEN; if ( autocvar_nextmap != "" ) - if ( !MapInfo_Get_ByName(autocvar_nextmap, FALSE, type) ) - return GTV_FORBIDDEN; + { + if ( !MapInfo_Get_ByName(autocvar_nextmap, FALSE, 0) ) + return GTV_FORBIDDEN; + if (!(MapInfo_Map_supportedGametypes & type)) + return GTV_FORBIDDEN; + } return GTV_AVAILABLE; } diff --git a/xonotic-credits.txt b/xonotic-credits.txt index 9fe937716..2fcdf98ce 100644 --- a/xonotic-credits.txt +++ b/xonotic-credits.txt @@ -113,6 +113,7 @@ Oleh "BlaXpirit" Prypin Przemysław "atheros" Grzywacz Robert "ai" Kuroto The player with the unnecessarily long name +Mattia "Melanosuchus" Basaglia **Translators -- 2.39.2