]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Fix the weapon stay bug
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 23:40:07 +0000 (02:40 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 5 Sep 2010 23:40:07 +0000 (02:40 +0300)
Todo & known bugs.txt
data/qcsrc/server/t_items.qc

index bee3ce88375b70dd0c5d16ef256ef7e868b33a15..e2dde4793d40b1ba9b475c9e86710a1a1f47c957 100644 (file)
@@ -8,8 +8,6 @@ Todo:
 \r
 Known bugs:\r
 \r
 \r
 Known bugs:\r
 \r
-- Weapon stay mutator: When picking up a weapon, it gets picked up infinitely until your ammo is full, rather than only once\r
-\r
 - Prey bots don't kick in the stomach in Arena and Clan Arena gametypes\r
 \r
 - If you go spectating with someone in your belly, they are released at the spawnpoint you are teleported to once you become an observer
\ No newline at end of file
 - Prey bots don't kick in the stomach in Arena and Clan Arena gametypes\r
 \r
 - If you go spectating with someone in your belly, they are released at the spawnpoint you are teleported to once you become an observer
\ No newline at end of file
index 18c74be311d08a2ca7561c5345dcda9c0ba9ea0a..db0e5a6215a13ebd009067e0f8eced54c917e9cb 100644 (file)
@@ -814,6 +814,13 @@ void weapon_defaultspawnfunc(float wpn)
        if(self.team)\r
                self.flags |= FL_NO_WEAPON_STAY;\r
 \r
        if(self.team)\r
                self.flags |= FL_NO_WEAPON_STAY;\r
 \r
+       if(g_weapon_stay == 2 && self.classname != "droppedweapon")\r
+       {\r
+               self.ammo_fuel = 0;\r
+               // weapon stay 2: don't use ammo on weapon pickups; instead\r
+               // initialize all ammo types to the pickup ammo unless set by g_start_ammo_*\r
+       }\r
+\r
        StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, e.bot_pickupbasevalue);\r
        if (self.modelindex) // don't precache if self was removed\r
                weapon_action(e.weapon, WR_PRECACHE);\r
        StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, e.bot_pickupbasevalue);\r
        if (self.modelindex) // don't precache if self was removed\r
                weapon_action(e.weapon, WR_PRECACHE);\r