]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
Don't give accuracy for shooting frozen players
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index cc0cb773ab2b1adbf480ed5c80c5ec2ed8fd23b4..03081ff4b1526e5f3cc0a486aec68f50c874ee23 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);
+                       }
                }
        }
 
@@ -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?