+
+ // If match_gametype is set it means voted_gametype has just been applied (on game type vote end).
+ // In this case apply back match_gametype here so that the "restart" command, if called,
+ // properly restarts the map applying the current game type.
+ // Applying voted_gametype before map vote start is needed to properly initialize map vote.
+ string gametype_custom_string = "";
+ if (gametype_custom_enabled)
+ gametype_custom_string = loaded_gametype_custom_string;
+ if (match_gametype)
+ GameTypeVote_SetGametype(match_gametype, gametype_custom_string, true);