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;
}
WriteByte(MSG_ENTITY, mapvote_detail);
WriteCoord(MSG_ENTITY, mapvote_timeout);
- WriteByte(MSG_ENTITY, gametypevote);
-
- if(gametypevote)
+ if ( gametypevote )
+ {
+ // gametype vote
+ WriteByte(MSG_ENTITY, 1);
WriteString(MSG_ENTITY, autocvar_nextmap);
+ }
+ else if ( autocvar_sv_vote_gametype )
+ {
+ // map vote but gametype has been chosen via voting screen
+ WriteByte(MSG_ENTITY, 2);
+ WriteString(MSG_ENTITY, MapInfo_Type_ToText(MapInfo_CurrentGametype()));
+ }
+ else
+ WriteByte(MSG_ENTITY, 0); // map vote
MapVote_WriteMask();
void MapVote_Start()
{
- if(mapvote_run)
- return;
+ // if mapvote is already running, don't do this initialization again
+ if(mapvote_run) { return; }
- // wait for stats to be sent first
- if(!playerstats_waitforme)
- return;
+ // don't start mapvote until after playerstats gamereport is sent
+ if(PlayerStats_GameReport_DelayMapVote) { return; }
MapInfo_Enumerate();
if(MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1))