]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/world.qc
Merge branch 'terencehill/custom_gametype_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qc
index 90ddd1a9902f4d5a95b65ef640d04ae98244a622..ad40a389543bcb5698d2abc2a0ddd1068e1f0557 100644 (file)
@@ -736,7 +736,8 @@ void InitGameplayMode()
 
        MapInfo_ClearTemps();
 
-       gamemode_name = MapInfo_Type_ToText(MapInfo_LoadedGametype);
+       strcpy(gametype_custom_string, autocvar__sv_vote_gametype_custom);
+       cvar_set("_sv_vote_gametype_custom", ""); // clear it immediately so it can't get stuck
 
        cache_mutatormsg = strzone("");
        cache_lastmutatormsg = strzone("");
@@ -2644,6 +2645,7 @@ void Shutdown()
                MapInfo_Shutdown();
 
                strfree(sv_termsofservice_url_escaped);
+               strfree(gametype_custom_string);
        }
        else if(world_initialized == 0)
        {