]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
MOTD moved to notif system by mario
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index bd6b9962cc2d623b81a13db5e3733c3b562e5a17..2ff925ca53d9fbf2ac2c05c103b85e4a0402e263 100644 (file)
@@ -639,7 +639,7 @@ float Item_GiveTo(entity item, entity player)
                        //      AnnounceTo(player, "ammo");
 
                        if (WEPSET_CONTAINS_EW(item, WEP_MINSTANEX))
-                               W_GiveWeapon (player, WEP_MINSTANEX, item.netname);
+                               W_GiveWeapon (player, WEP_MINSTANEX);
                        player.health = 100;
                }
 
@@ -709,7 +709,7 @@ float Item_GiveTo(entity item, entity player)
                                pickedup = TRUE;
                                for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                                        if(WEPSET_CONTAINS_AW(it, i))
-                                               W_GiveWeapon (player, i, item.netname);
+                                               W_GiveWeapon(player, i);
                        }
                }
 
@@ -1214,6 +1214,14 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
                Item_Reset();
         
     Net_LinkEntity(self, FALSE, 0, ItemSend);
+
+       // call this hook after everything else has been done
+       if(MUTATOR_CALLHOOK(Item_Spawn))
+       {
+               startitem_failed = TRUE;
+               remove(self);
+               return;
+       }
 }
 
 /* replace items in minstagib