]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
remove g_weapon_stay 1 and 2 modes, they did enough damage. Only keep 3, renumbered...
authorRudolf Polzer <divverent@alientrap.org>
Fri, 16 Dec 2011 17:07:12 +0000 (18:07 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 16 Dec 2011 17:08:28 +0000 (18:08 +0100)
defaultXonotic.cfg
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/server/cl_weapons.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/t_items.qc

index 2db0a55347eea89b13bddb09a34a245dd4bf0284..f42c508f55514f4857ec012aa94fc8b00eca6b50 100644 (file)
@@ -498,7 +498,7 @@ set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun positi
 set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
 set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used"
 set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed"
-set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type and they can not be dropped, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)"
+set g_weapon_stay 0 "1: ghost weapons can be picked up too but give no ammo"
 set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
 set g_powerups -1 "if set to 0 the strength and shield (invincibility) will not spawn on the map, if 1 they will spawn in all game modes, -1 is game mode default"
 set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
index 7133eb67f1ec601a80c555ab2f75d48c5d7ca6d5..ac2d71e4811aed58b51f6954b6e6e04afd29b8e0 100644 (file)
@@ -216,7 +216,7 @@ void XonoticMutatorsDialog_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_pinata", _("PiƱata")));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "g_weapon_stay", _("Weapons stay")));
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_weapon_stay", _("Weapons stay")));
        me.TR(me);
 
        me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
index edf5b1f5e5c697d07087509075ef53edc2af5bd0..c16be3748aca0bb6388b6555b28a347037c177b9 100644 (file)
@@ -297,8 +297,6 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce)
                return;
        if(!autocvar_g_weapon_throwable)
                return;
-       if(autocvar_g_weapon_stay == 1)
-               return;
        if(self.weaponentity.state != WS_READY)
                return;
        if(!W_IsWeaponThrowable(w))
index 0c47526a581ac46da23dbf2bcc393686bd1a6c3d..2fa2b6705d9ad66b8a583fd4d0246ed7280a7d7b 100644 (file)
@@ -1005,20 +1005,6 @@ void readplayerstartcvars()
        if (g_jetpack)
                start_items |= IT_JETPACK;
 
-       if (g_weapon_stay == 2)
-       {
-               if (!start_ammo_shells) start_ammo_shells = g_pickup_shells;
-               if (!start_ammo_nails) start_ammo_nails = g_pickup_nails;
-               if (!start_ammo_cells) start_ammo_cells = g_pickup_cells;
-               if (!start_ammo_rockets) start_ammo_rockets = g_pickup_rockets;
-               if (!start_ammo_fuel) start_ammo_fuel = g_pickup_fuel;
-               if (!warmup_start_ammo_shells) warmup_start_ammo_shells = g_pickup_shells;
-               if (!warmup_start_ammo_nails) warmup_start_ammo_nails = g_pickup_nails;
-               if (!warmup_start_ammo_cells) warmup_start_ammo_cells = g_pickup_cells;
-               if (!warmup_start_ammo_rockets) warmup_start_ammo_rockets = g_pickup_rockets;
-               if (!warmup_start_ammo_fuel) warmup_start_ammo_fuel = g_pickup_fuel;
-       }
-
        MUTATOR_CALLHOOK(SetStartItems);
 
        for (i = WEP_FIRST; i <= WEP_LAST; ++i)
index 9a8ac71239ba807cfe8019022aae7d7473a9e605..a96bc50bc6ff22c9446c58f463c106598c83f775 100644 (file)
@@ -131,7 +131,7 @@ void Item_Show (entity e, float mode)
 
                e.spawnshieldtime = 1;
        }
-       else if((e.flags & FL_WEAPON) && (g_weapon_stay == 3))
+       else if((e.flags & FL_WEAPON) && g_weapon_stay)
        {
                // make the item translucent and not touchable
                e.model = e.mdl;
@@ -365,22 +365,6 @@ float Item_GiveTo(entity item, entity player)
        }
        else
        {
-               if (g_weapon_stay == 1)
-               if not(item.flags & FL_NO_WEAPON_STAY)
-               if (item.flags & FL_WEAPON)
-               {
-                       if(item.classname == "droppedweapon")
-                       {
-                               if (player.weapons & item.weapons)      // don't let players stack ammo by tossing weapons
-                                       goto skip;
-                       }
-                       else
-                       {
-                               if (player.weapons & item.weapons)
-                                       goto skip;
-                       }
-               }
-
                // in case the player has autoswitch enabled do the following:
                // if the player is using their best weapon before items are given, they
                // probably want to switch to an even better weapon after items are given
@@ -427,7 +411,7 @@ float Item_GiveTo(entity item, entity player)
                }
 
                if (item.flags & FL_WEAPON)
-                       if ((it = item.weapons - (item.weapons & player.weapons)) || (g_pickup_weapons_anyway && g_weapon_stay == 0))
+               if ((it = item.weapons - (item.weapons & player.weapons)) || (g_pickup_weapons_anyway))
                {
                        pickedup = TRUE;
                        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
@@ -521,8 +505,6 @@ void Item_Touch (void)
                remove (self);
        else if not(self.spawnshieldtime)
                return;
-       else if((self.flags & FL_WEAPON) && !(self.flags & FL_NO_WEAPON_STAY) && (g_weapon_stay == 1 || g_weapon_stay == 2))
-               return;
        else
        {
                if(self.team)
@@ -606,7 +588,7 @@ float weapon_pickupevalfunc(entity player, entity item)
        if(player.weapons & item.weapons == item.weapons)
        {
                // If I can pick it up
-               if(g_weapon_stay == 1 || g_weapon_stay == 2 || !item.spawnshieldtime)
+               if(!item.spawnshieldtime)
                        c = 0;
                else if(player.ammo_cells || player.ammo_shells || player.ammo_nails || player.ammo_rockets)
                {
@@ -1039,16 +1021,6 @@ void weapon_defaultspawnfunc(float wpn)
        if(self.team)
                self.flags |= FL_NO_WEAPON_STAY;
 
-       if(g_weapon_stay == 2 && self.classname != "droppedweapon")
-       {
-               self.ammo_shells = 0;
-               self.ammo_nails = 0;
-               self.ammo_cells = 0;
-               self.ammo_rockets = 0;
-               // weapon stay 2: don't use ammo on weapon pickups; instead
-               // initialize all ammo types to the pickup ammo unless set by g_start_ammo_*
-       }
-
        StartItem(e.model, "weapons/weaponpickup.wav", self.respawntime, self.respawntimejitter, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, e.bot_pickupbasevalue);
        if (self.modelindex) // don't precache if self was removed
                weapon_action(e.weapon, WR_PRECACHE);