X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ft_items.qc;h=cb76f97f9a9a730cd9f750a3889a68d388ead5e4;hb=8283cec24d38987c03b3a86fa1a9246d7e65842e;hp=a640cce105a46f39b95d18b90fd6adedc0f860e5;hpb=83568cdea02638d5234aa0fe9c7de3d1e9e6c9e7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index a640cce10..cb76f97f9 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -7,7 +7,7 @@ #include "bot/bot.qh" #include "bot/waypoints.qh" - #include "mutators/mutators_include.qh" + #include "mutators/all.qh" #include "weapons/common.qh" #include "weapons/selection.qh" @@ -574,7 +574,7 @@ float Item_GiveAmmoTo(entity item, entity player, .float ammotype, float ammomax if (item.spawnshieldtime) { - if ((player.(ammotype) < ammomax) || item.pickup_anyway) + if ((player.(ammotype) < ammomax) || item.pickup_anyway > 0) { player.(ammotype) = bound(player.(ammotype), ammomax, player.(ammotype) + item.(ammotype)); goto YEAH; @@ -645,7 +645,7 @@ float Item_GiveTo(entity item, entity player) it = item.weapons; it &= ~player.weapons; - if (it || (item.spawnshieldtime && item.pickup_anyway)) + if (it || (item.spawnshieldtime && item.pickup_anyway > 0)) { pickedup = true; for(i = WEP_FIRST; i <= WEP_LAST; ++i) @@ -1070,12 +1070,12 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, // it's a level item if(self.spawnflags & 1) self.noalign = 1; - if (self.noalign) + if (self.noalign > 0) self.movetype = MOVETYPE_NONE; else self.movetype = MOVETYPE_TOSS; // do item filtering according to game mode and other things - if (!self.noalign) + if (self.noalign <= 0) { // first nudge it off the floor a little bit to avoid math errors setorigin(self, self.origin + '0 0 1'); @@ -1086,7 +1086,8 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, setsize (self, '-16 -16 0', '16 16 32'); self.SendFlags |= ISF_SIZE; // note droptofloor returns false if stuck/or would fall too far - droptofloor(); + if(!self.noalign) + droptofloor(); waypoint_spawnforitem(self); } @@ -1154,11 +1155,14 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, self.SendFlags |= ISF_SIZE; - if(itemflags & FL_POWERUP) - self.ItemStatus |= ITS_ANIMATE1; + if(!(self.spawnflags & 1024)) + { + if(itemflags & FL_POWERUP) + self.ItemStatus |= ITS_ANIMATE1; - if(self.armorvalue || self.health) - self.ItemStatus |= ITS_ANIMATE2; + if(self.armorvalue || self.health) + self.ItemStatus |= ITS_ANIMATE2; + } if(itemflags & FL_WEAPON) { @@ -1167,7 +1171,8 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime, else self.gravity = 1; - self.ItemStatus |= ITS_ANIMATE1; + if(!(self.spawnflags & 1024)) + self.ItemStatus |= ITS_ANIMATE1; self.ItemStatus |= ISF_COLORMAP; }