]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Merge branch 'master' into fruitiex/ctsfix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 8e052e8377a0688a3b143abaf181375b6090274b..7eb10de0f736c0e974b3dd20def2a09203027c1e 100644 (file)
@@ -880,8 +880,10 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns)
                        t = (weaponinfo.spawnflags & WEP_FLAG_NORMAL);
                else if(t < -1)
                        t = 0;
-               else if (g_race || g_cts)
-                       t = (i == WEP_LASER);
+               else if (g_race)
+                       t = (i == WEP_LASER || i == WEP_SHOTGUN);
+               else if (g_cts)
+                       t = (i == WEP_SHOTGUN);
                else if (g_nexball)
                        t = 0; // weapon is set a few lines later
                else
@@ -1295,6 +1297,9 @@ void readlevelcvars(void)
        if (!g_weapon_stay && (cvar("deathmatch") == 2))
                g_weapon_stay = 1;
 
+       if (!g_weapon_stay && g_cts)
+               g_weapon_stay = 1;
+
        g_ghost_items = cvar("g_ghost_items");
 
        if(g_ghost_items >= 1)
@@ -1810,7 +1815,13 @@ void InitializeEntitiesRun()
             self = e_old;
         }
         //dprint("Delayed initialization: ", self.classname, "\n");
-        func();
+        if(func != func_null)
+            func();
+        else
+        {
+            eprint(self);
+            backtrace(strcat("Null function in: ", self.classname, "\n"));
+        }
         self = e;
     }
 }