]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More robustly prevent http://dev.xonotic.org/issues/1237
authorJakob MG <jakob_mg@hotmail.com>
Mon, 11 Jun 2012 10:44:21 +0000 (12:44 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Mon, 11 Jun 2012 10:44:21 +0000 (12:44 +0200)
qcsrc/server/cl_weapons.qc
qcsrc/server/t_items.qc

index 59efb74d5458508fab560ddb0f5338fa12013372..236c0923fdc330834469234bc9eb2285a1f6bb26 100644 (file)
@@ -318,7 +318,9 @@ float W_IsWeaponThrowable(float w)
                return 0;
        if (g_nexball && w == WEP_GRENADE_LAUNCHER)
                return 0;
-
+    if(w == 0)
+        return 0;
+       
        wa = W_AmmoItemCode(w);
        if(WEPSET_CONTAINS_AW(start_weapons, w))
        {
index 530e5cf1b679f79bca151a8cb636f2bfce02e6b6..2e7b9bfbaf11bdf64403edfe663838d465cd2b2b 100644 (file)
@@ -155,7 +155,7 @@ void ItemRead(float _IsNew)
         
         
         if(self.mdl == "")
-            dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
+            dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, " tell tZork aboute this!\n");
         
         precache_model(self.mdl);
         setmodel(self, self.mdl);
@@ -967,11 +967,10 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
        
        if(self.model == "")
     {
-        dprint("^1Tried to spawn ", itemname, " with no model!\n");
+        error(strcat("^1Tried to spawn ", itemname, " with no model!\n"));
         return;
     }
         
-       
        if(self.item_pickupsound == "")
                self.item_pickupsound = pickupsound;