]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
Merge branch 'master' into Mario/notifications
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index cc0cb773ab2b1adbf480ed5c80c5ec2ed8fd23b4..8d705b363f8c72c84c20ce3d4a3b81f70608d4bf 100644 (file)
@@ -588,7 +588,10 @@ float Item_GiveTo(entity item, entity player)
                        pickedup = TRUE;
                        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                        if(it & WepSet_FromWeapon(i))
+                       {
+                               W_DropEvent(WR_PICKUP, player, i, item);
                                W_GiveWeapon(player, i);
+                       }
                }
        }
 
@@ -596,7 +599,7 @@ float Item_GiveTo(entity item, entity player)
        {
                pickedup = TRUE;
                player.items |= it;
-               sprint (player, strcat("You got the ^2", item.netname, "\n"));
+               Send_Notification(NOTIF_ONE, player, MSG_INFO, INFO_ITEM_WEAPON_GOT, item.netname);
        }
 
        if (item.strength_finished)
@@ -647,6 +650,8 @@ void Item_Touch (void)
 
        if (!IS_PLAYER(other))
                return;
+       if (other.frozen)
+               return;
        if (other.deadflag)
                return;
        if (self.solid != SOLID_TRIGGER)
@@ -850,7 +855,7 @@ float commodity_pickupevalfunc(entity player, entity item)
                else if(wi.items & IT_PLASMA)
                        need_plasma = TRUE;
                else if(wi.items & IT_FUEL)
-                       need_cells = TRUE;
+                       need_fuel = TRUE;
        }
 
        // TODO: figure out if the player even has the weapon this ammo is for?