]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't call sv_hook_gamestart if we want to restart
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 31 Mar 2016 11:55:37 +0000 (22:55 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 31 Mar 2016 11:55:37 +0000 (22:55 +1100)
qcsrc/server/g_world.qc

index 24c81a27666d7bad59504c9070ca74f9c6a40ce8..5714393b73217214796202d0b05c28d61684d59c 100644 (file)
@@ -584,9 +584,8 @@ spawnfunc(worldspawn)
 {
        server_is_dedicated = boolean(stof(cvar_defstring("is_dedicated")));
 
+    bool wantrestart = false;
        {
-               bool wantrestart = false;
-
                if (!server_is_dedicated)
                {
                        // force unloading of server pk3 files when starting a listen server
@@ -867,7 +866,7 @@ spawnfunc(worldspawn)
 
        CheatInit();
 
-       localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n");
+       if (!wantrestart) localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n");
 
        // fill sv_curl_serverpackages from .serverpackage files
        if (autocvar_sv_curl_serverpackages_auto)