]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
items: clean up pickup respawntime cvars
authorbones_was_here <bones_was_here@xonotic.au>
Mon, 24 Feb 2025 17:01:42 +0000 (03:01 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 14 Mar 2025 18:10:33 +0000 (04:10 +1000)
- uses autocvars instead of copying in worldspawn
- removes unnecessary funcs
- moves declarations from pickup.qh to specific files
- removes now-redundant macros from misc.qh

12 files changed:
qcsrc/common/items/item/ammo.qh
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh
qcsrc/common/items/item/pickup.qh
qcsrc/common/mutators/mutator/instagib/items.qh
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/mutators/mutator/powerups/powerups.qh
qcsrc/lib/misc.qh
qcsrc/server/items/items.qc
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/spawning.qh
qcsrc/server/world.qc

index 096f5551a07e19ef92f959da86d633f390cf34fb..9b9d4470cae60b30048992c8baa852b570d9c6ae 100644 (file)
 
 #ifdef SVQC
 bool autocvar_g_pickup_ammo_anyway;
+float autocvar_g_pickup_respawntime_ammo;
+float autocvar_g_pickup_respawntimejitter_ammo;
 #endif
 
 CLASS(Ammo, Pickup)
 #ifdef SVQC
     ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), ammo_pickupevalfunc);
-    ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo));
-    ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo));
+    ATTRIB(Ammo, m_respawntime, float, autocvar_g_pickup_respawntime_ammo);
+    ATTRIB(Ammo, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_ammo);
     ATTRIB(Ammo, m_pickupanyway, bool, autocvar_g_pickup_ammo_anyway);
 #endif
 ENDCLASS(Ammo)
index 8e99c4ca4050f5cc4da650ac8a0d388e8f735ab6..c723f69f47c3d43eb1eca617e3c199fb96a40b4e 100644 (file)
@@ -20,6 +20,8 @@ SOUND(ArmorSmall, Item_Sound("armor1"));
 bool autocvar_g_pickup_armorsmall_anyway;
 int autocvar_g_pickup_armorsmall;
 int autocvar_g_pickup_armorsmall_max;
+float autocvar_g_pickup_respawntime_armor_small;
+float autocvar_g_pickup_respawntimejitter_armor_small;
 void item_armorsmall_init(Pickup this, entity item)
 {
     if(!item.max_armorvalue)
@@ -51,8 +53,8 @@ CLASS(ArmorSmall, Armor)
 /* minsize      */ ATTRIB(ArmorSmall, m_mins, vector, ITEM_S_MINS);
 /* maxsize      */ ATTRIB(ArmorSmall, m_maxs, vector, ITEM_S_MAXS);
 /* itemid       */ ATTRIB(ArmorSmall, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(ArmorSmall, m_respawntime, float(), GET(g_pickup_respawntime_armor_small));
-/*              */ ATTRIB(ArmorSmall, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_armor_small));
+/* respawntime  */ ATTRIB(ArmorSmall, m_respawntime, float, autocvar_g_pickup_respawntime_armor_small);
+/*              */ ATTRIB(ArmorSmall, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_armor_small);
 /* pickupanyway */ ATTRIB(ArmorSmall, m_pickupanyway, bool, autocvar_g_pickup_armorsmall_anyway);
 /* iteminit     */ ATTRIB(ArmorSmall, m_iteminit, void(Pickup this, entity item), item_armorsmall_init);
 #endif
@@ -69,6 +71,8 @@ SOUND(ArmorMedium, Item_Sound("armor10"));
 bool autocvar_g_pickup_armormedium_anyway;
 int autocvar_g_pickup_armormedium;
 int autocvar_g_pickup_armormedium_max;
+float autocvar_g_pickup_respawntime_armor_medium;
+float autocvar_g_pickup_respawntimejitter_armor_medium;
 void item_armormedium_init(Pickup this, entity item)
 {
     if(!item.max_armorvalue)
@@ -100,8 +104,8 @@ CLASS(ArmorMedium, Armor)
 /* minsize      */ ATTRIB(ArmorMedium, m_mins, vector, ITEM_S_MINS);
 /* maxsize      */ ATTRIB(ArmorMedium, m_maxs, vector, ITEM_S_MAXS);
 /* itemid       */ ATTRIB(ArmorMedium, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(ArmorMedium, m_respawntime, float(), GET(g_pickup_respawntime_armor_medium));
-/*              */ ATTRIB(ArmorMedium, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_armor_medium));
+/* respawntime  */ ATTRIB(ArmorMedium, m_respawntime, float, autocvar_g_pickup_respawntime_armor_medium);
+/*              */ ATTRIB(ArmorMedium, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_armor_medium);
 /* pickupanyway */ ATTRIB(ArmorMedium, m_pickupanyway, bool, autocvar_g_pickup_armormedium_anyway);
 /* iteminit     */ ATTRIB(ArmorMedium, m_iteminit, void(Pickup this, entity item), item_armormedium_init);
 #endif
@@ -118,6 +122,8 @@ SOUND(ArmorBig, Item_Sound("armor17_5"));
 bool autocvar_g_pickup_armorbig_anyway;
 int autocvar_g_pickup_armorbig;
 int autocvar_g_pickup_armorbig_max;
+float autocvar_g_pickup_respawntime_armor_big;
+float autocvar_g_pickup_respawntimejitter_armor_big;
 void item_armorbig_init(Pickup this, entity item)
 {
     if(!item.max_armorvalue)
@@ -149,8 +155,8 @@ CLASS(ArmorBig, Armor)
 /* wptext       */ ATTRIB(ArmorBig, m_waypoint, string, _("Big armor"));
 #ifdef SVQC
 /* itemid       */ ATTRIB(ArmorBig, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(ArmorBig, m_respawntime, float(), GET(g_pickup_respawntime_armor_big));
-/*              */ ATTRIB(ArmorBig, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_armor_big));
+/* respawntime  */ ATTRIB(ArmorBig, m_respawntime, float, autocvar_g_pickup_respawntime_armor_big);
+/*              */ ATTRIB(ArmorBig, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_armor_big);
 /* pickupanyway */ ATTRIB(ArmorBig, m_pickupanyway, bool, autocvar_g_pickup_armorbig_anyway);
 /* iteminit     */ ATTRIB(ArmorBig, m_iteminit, void(Pickup this, entity item), item_armorbig_init);
 #endif
@@ -167,6 +173,8 @@ SOUND(ArmorMega, Item_Sound("armor25"));
 bool autocvar_g_pickup_armormega_anyway;
 int autocvar_g_pickup_armormega;
 int autocvar_g_pickup_armormega_max;
+float autocvar_g_pickup_respawntime_armor_mega;
+float autocvar_g_pickup_respawntimejitter_armor_mega;
 void item_armormega_init(Pickup this, entity item)
 {
     if(!item.max_armorvalue)
@@ -200,8 +208,8 @@ CLASS(ArmorMega, Armor)
 #ifdef SVQC
 /* maxsize      */ ATTRIB(ArmorMega, m_maxs, vector, ITEM_L_MAXS);
 /* itemid       */ ATTRIB(ArmorMega, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(ArmorMega, m_respawntime, float(), GET(g_pickup_respawntime_armor_mega));
-/*              */ ATTRIB(ArmorMega, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_armor_mega));
+/* respawntime  */ ATTRIB(ArmorMega, m_respawntime, float, autocvar_g_pickup_respawntime_armor_mega);
+/*              */ ATTRIB(ArmorMega, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_armor_mega);
 /* pickupanyway */ ATTRIB(ArmorMega, m_pickupanyway, bool, autocvar_g_pickup_armormega_anyway);
 /* iteminit     */ ATTRIB(ArmorMega, m_iteminit, void(Pickup this, entity item), item_armormega_init);
 #endif
index 4edb9873379651efd7bd550deac76ba63a572833..1334006268ee76523f867a4eb1dc6d9b62c3706e 100644 (file)
@@ -20,6 +20,8 @@ SOUND(HealthSmall, Item_Sound("minihealth"));
 bool autocvar_g_pickup_healthsmall_anyway;
 int autocvar_g_pickup_healthsmall;
 int autocvar_g_pickup_healthsmall_max;
+float autocvar_g_pickup_respawntime_health_small;
+float autocvar_g_pickup_respawntimejitter_health_small;
 void item_healthsmall_init(Pickup this, entity item)
 {
     if(!item.max_health)
@@ -51,8 +53,8 @@ CLASS(HealthSmall, Health)
 /* minsize      */ ATTRIB(HealthSmall, m_mins, vector, ITEM_S_MINS);
 /* maxsize      */ ATTRIB(HealthSmall, m_maxs, vector, ITEM_S_MAXS);
 /* itemid       */ ATTRIB(HealthSmall, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(HealthSmall, m_respawntime, float(), GET(g_pickup_respawntime_health_small));
-/*              */ ATTRIB(HealthSmall, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_health_small));
+/* respawntime  */ ATTRIB(HealthSmall, m_respawntime, float, autocvar_g_pickup_respawntime_health_small);
+/*              */ ATTRIB(HealthSmall, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_health_small);
 /* pickupanyway */ ATTRIB(HealthSmall, m_pickupanyway, bool, autocvar_g_pickup_healthsmall_anyway);
 /* iteminit     */ ATTRIB(HealthSmall, m_iteminit, void(Pickup this, entity item), item_healthsmall_init);
 #endif
@@ -69,6 +71,8 @@ SOUND(HealthMedium, Item_Sound("mediumhealth"));
 bool autocvar_g_pickup_healthmedium_anyway;
 int autocvar_g_pickup_healthmedium;
 int autocvar_g_pickup_healthmedium_max;
+float autocvar_g_pickup_respawntime_health_medium;
+float autocvar_g_pickup_respawntimejitter_health_medium;
 void item_healthmedium_init(Pickup this, entity item)
 {
     if(!item.max_health)
@@ -100,8 +104,8 @@ CLASS(HealthMedium, Health)
 /* minsize      */ ATTRIB(HealthMedium, m_mins, vector, ITEM_S_MINS);
 /* maxsize      */ ATTRIB(HealthMedium, m_maxs, vector, ITEM_S_MAXS);
 /* itemid       */ ATTRIB(HealthMedium, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(HealthMedium, m_respawntime, float(), GET(g_pickup_respawntime_health_medium));
-/*              */ ATTRIB(HealthMedium, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_health_medium));
+/* respawntime  */ ATTRIB(HealthMedium, m_respawntime, float, autocvar_g_pickup_respawntime_health_medium);
+/*              */ ATTRIB(HealthMedium, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_health_medium);
 /* pickupanyway */ ATTRIB(HealthMedium, m_pickupanyway, bool, autocvar_g_pickup_healthmedium_anyway);
 /* iteminit     */ ATTRIB(HealthMedium, m_iteminit, void(Pickup this, entity item), item_healthmedium_init);
 #endif
@@ -118,6 +122,8 @@ SOUND(HealthBig, Item_Sound("mediumhealth"));
 bool autocvar_g_pickup_healthbig_anyway;
 int autocvar_g_pickup_healthbig;
 int autocvar_g_pickup_healthbig_max;
+float autocvar_g_pickup_respawntime_health_big;
+float autocvar_g_pickup_respawntimejitter_health_big;
 void item_healthbig_init(Pickup this, entity item)
 {
     if(!item.max_health)
@@ -149,8 +155,8 @@ CLASS(HealthBig, Health)
 /* wptext       */ ATTRIB(HealthBig, m_waypoint, string, _("Big health"));
 #ifdef SVQC
 /* itemid       */ ATTRIB(HealthBig, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(HealthBig, m_respawntime, float(), GET(g_pickup_respawntime_health_big));
-/*              */ ATTRIB(HealthBig, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_health_big));
+/* respawntime  */ ATTRIB(HealthBig, m_respawntime, float, autocvar_g_pickup_respawntime_health_big);
+/*              */ ATTRIB(HealthBig, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_health_big);
 /* pickupanyway */ ATTRIB(HealthBig, m_pickupanyway, bool, autocvar_g_pickup_healthbig_anyway);
 /* iteminit     */ ATTRIB(HealthBig, m_iteminit, void(Pickup this, entity item), item_healthbig_init);
 #endif
@@ -167,6 +173,8 @@ SOUND(HealthMega, Item_Sound("megahealth"));
 bool autocvar_g_pickup_healthmega_anyway;
 int autocvar_g_pickup_healthmega;
 int autocvar_g_pickup_healthmega_max;
+float autocvar_g_pickup_respawntime_health_mega;
+float autocvar_g_pickup_respawntimejitter_health_mega;
 void item_healthmega_init(Pickup this, entity item)
 {
     if(!item.max_health)
@@ -200,8 +208,8 @@ CLASS(HealthMega, Health)
 #ifdef SVQC
 /* maxsize      */ ATTRIB(HealthMega, m_maxs, vector, ITEM_L_MAXS);
 /* itemid       */ ATTRIB(HealthMega, m_itemid, int, IT_RESOURCE);
-/* respawntime  */ ATTRIB(HealthMega, m_respawntime, float(), GET(g_pickup_respawntime_health_mega));
-/*              */ ATTRIB(HealthMega, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_health_mega));
+/* respawntime  */ ATTRIB(HealthMega, m_respawntime, float, autocvar_g_pickup_respawntime_health_mega);
+/*              */ ATTRIB(HealthMega, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_health_mega);
 /* pickupanyway */ ATTRIB(HealthMega, m_pickupanyway, bool, autocvar_g_pickup_healthmega_anyway);
 /* iteminit     */ ATTRIB(HealthMega, m_iteminit, void(Pickup this, entity item), item_healthmega_init);
 #endif
index 87f421056886b17b5b126f2460cc3204bf987587..4190505efdfcb326b29c5fbaa4b95da4cbc13a3e 100644 (file)
@@ -1,32 +1,5 @@
 #pragma once
 
-#ifdef SVQC
-PROPERTY(float, g_pickup_respawntime_weapon)
-PROPERTY(float, g_pickup_respawntime_superweapon)
-PROPERTY(float, g_pickup_respawntime_ammo)
-PROPERTY(float, g_pickup_respawntime_armor_small)
-PROPERTY(float, g_pickup_respawntime_armor_medium)
-PROPERTY(float, g_pickup_respawntime_armor_big)
-PROPERTY(float, g_pickup_respawntime_armor_mega)
-PROPERTY(float, g_pickup_respawntime_health_small)
-PROPERTY(float, g_pickup_respawntime_health_medium)
-PROPERTY(float, g_pickup_respawntime_health_big)
-PROPERTY(float, g_pickup_respawntime_health_mega)
-PROPERTY(float, g_pickup_respawntime_powerup)
-PROPERTY(float, g_pickup_respawntimejitter_weapon)
-PROPERTY(float, g_pickup_respawntimejitter_superweapon)
-PROPERTY(float, g_pickup_respawntimejitter_ammo)
-PROPERTY(float, g_pickup_respawntimejitter_health_small)
-PROPERTY(float, g_pickup_respawntimejitter_health_medium)
-PROPERTY(float, g_pickup_respawntimejitter_health_big)
-PROPERTY(float, g_pickup_respawntimejitter_health_mega)
-PROPERTY(float, g_pickup_respawntimejitter_armor_small)
-PROPERTY(float, g_pickup_respawntimejitter_armor_medium)
-PROPERTY(float, g_pickup_respawntimejitter_armor_big)
-PROPERTY(float, g_pickup_respawntimejitter_armor_mega)
-PROPERTY(float, g_pickup_respawntimejitter_powerup)
-#endif
-
 #include <common/items/item.qh>
 
 CLASS(Pickup, GameItem)
@@ -51,8 +24,8 @@ CLASS(Pickup, GameItem)
     ATTRIB(Pickup, m_itemflags, int, 0);
     float generic_pickupevalfunc(entity player, entity item);
     ATTRIB(Pickup, m_pickupevalfunc, float(entity player, entity item), generic_pickupevalfunc);
-    ATTRIB(Pickup, m_respawntime, float());
-    ATTRIB(Pickup, m_respawntimejitter, float());
+    ATTRIB(Pickup, m_respawntime, float);
+    ATTRIB(Pickup, m_respawntimejitter, float);
     ATTRIB(Pickup, m_pickupanyway, bool);
     ATTRIB(Pickup, m_iteminit, void(Pickup this, entity item));
     float Item_GiveTo(entity item, entity player);
index ed990999848c79b6bd4427537c9dc3cf3fa0fbc8..5df20509a34b98e0603efc618b0f9bf15487ca01 100644 (file)
@@ -4,11 +4,6 @@
 #include <common/items/item/ammo.qh>
 #include <common/mutators/mutator/powerups/_mod.qh>
 
-float instagib_respawntime_ammo = 45;
-float instagib_respawntimejitter_ammo = 0;
-GETTER(float, instagib_respawntime_ammo)
-GETTER(float, instagib_respawntimejitter_ammo)
-
 #ifdef GAMEQC
 MODEL(VaporizerCells_ITEM, Item_Model("a_cells.md3"));
 SOUND(VaporizerCells, Item_Sound("itempickup"));
@@ -37,8 +32,8 @@ CLASS(VaporizerCells, Ammo)
 #ifdef SVQC
 /* botvalue    */ ATTRIB(VaporizerCells, m_botvalue, int, 2000);
 /* itemid      */ ATTRIB(VaporizerCells, m_itemid, int, IT_RESOURCE);
-/* respawntime */ ATTRIB(VaporizerCells, m_respawntime, float(), GET(instagib_respawntime_ammo));
-/*             */ ATTRIB(VaporizerCells, m_respawntimejitter, float(), GET(instagib_respawntimejitter_ammo));
+/* respawntime */ ATTRIB(VaporizerCells, m_respawntime, float, 45);
+/*             */ ATTRIB(VaporizerCells, m_respawntimejitter, float, 0);
 /* iteminit    */ ATTRIB(VaporizerCells, m_iteminit, void(Pickup this, entity item), ammo_vaporizercells_init);
 #endif
 ENDCLASS(VaporizerCells)
index 619c393e4cdb0d8b935e8acfa421fd7bb2774482..00bdd1c0e222948aefa62afd97c05035e058f3d5 100644 (file)
@@ -231,7 +231,7 @@ MUTATOR_HOOKFUNCTION(ok, FilterItem)
                entity wep = spawn();
                Item_CopyFields(item, wep);
                wep.ok_item = true;
-               wep.respawntime = g_pickup_respawntime_superweapon;
+               wep.respawntime = autocvar_g_pickup_respawntime_superweapon;
                wep.pickup_anyway = true;
                wep.itemdef = WEP_OVERKILL_HMG;
                wep.lifetime = -1;
@@ -243,7 +243,7 @@ MUTATOR_HOOKFUNCTION(ok, FilterItem)
                entity wep = spawn();
                Item_CopyFields(item, wep);
                wep.ok_item = true;
-               wep.respawntime = g_pickup_respawntime_superweapon;
+               wep.respawntime = autocvar_g_pickup_respawntime_superweapon;
                wep.pickup_anyway = true;
                wep.itemdef = WEP_OVERKILL_RPC;
                wep.lifetime = -1;
index 07bc1c37ebca5e76da9eb13b390cb034d0d2365f..b8f5b731ab319b7a81950cfe70e3b76528102c78 100644 (file)
@@ -1,13 +1,19 @@
 #pragma once
 
 #include <common/items/item/pickup.qh>
+
+#ifdef SVQC
+float autocvar_g_pickup_respawntime_powerup;
+float autocvar_g_pickup_respawntimejitter_powerup;
+#endif
+
 CLASS(Powerup, Pickup)
 #ifdef SVQC
     ATTRIB(Powerup, m_maxs, vector, ITEM_L_MAXS);
     ATTRIB(Powerup, m_botvalue, int, 11000);
     ATTRIB(Powerup, m_itemflags, int, FL_POWERUP);
-    ATTRIB(Powerup, m_respawntime, float(), GET(g_pickup_respawntime_powerup));
-    ATTRIB(Powerup, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_powerup));
+    ATTRIB(Powerup, m_respawntime, float, autocvar_g_pickup_respawntime_powerup);
+    ATTRIB(Powerup, m_respawntimejitter, float, autocvar_g_pickup_respawntimejitter_powerup);
 #endif
 ENDCLASS(Powerup)
 
index 474484c64e5f85aa279835a1826983c1eb0b080f..9cbee5201d0ab1f6e182bc6abe3102f6f22408ee 100644 (file)
@@ -31,9 +31,6 @@
        // already defined
 #endif
 
-#define GET(name) name##get
-#define GETTER(type, name) type GET(name)() { return name; }
-#define PROPERTY(type, name) type name; GETTER(type, name)
 #define LAMBDA(...) { __VA_ARGS__; }
 
 // With block may not contain continue or break
index e6e7b3f08e5e3c6b626d5deda395a85cad1dc3dc..a090808c8f8aca2d5b65c27e071f8f615a525be3 100644 (file)
@@ -1107,12 +1107,12 @@ void StartItem(entity this, entity def)
                if(!this.respawntime) // both need to be set
                {
                        if (def.m_respawntime)
-                               this.respawntime = def.m_respawntime();
+                               this.respawntime = def.m_respawntime;
                        else
                                LOG_WARNF("Default respawntime for a %s is unavailable from its itemdef", this.classname);
 
                        if (def.m_respawntimejitter)
-                               this.respawntimejitter = def.m_respawntimejitter();
+                               this.respawntimejitter = def.m_respawntimejitter;
                        else
                                LOG_WARNF("Default respawntimejitter for a %s is unavailable from its itemdef", this.classname);
                }
index aafdac6c622cb452be61661b80c1821b6cb4e7ff..57e363b4b747ffe7a748f452b884914cf5491fce 100644 (file)
@@ -93,13 +93,13 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn)
        {
                if (wpn.spawnflags & WEP_FLAG_SUPERWEAPON)
                {
-                       this.respawntime = g_pickup_respawntime_superweapon;
-                       this.respawntimejitter = g_pickup_respawntimejitter_superweapon;
+                       this.respawntime = autocvar_g_pickup_respawntime_superweapon;
+                       this.respawntimejitter = autocvar_g_pickup_respawntimejitter_superweapon;
                }
                else
                {
-                       this.respawntime = g_pickup_respawntime_weapon;
-                       this.respawntimejitter = g_pickup_respawntimejitter_weapon;
+                       this.respawntime = autocvar_g_pickup_respawntime_weapon;
+                       this.respawntimejitter = autocvar_g_pickup_respawntimejitter_weapon;
                }
        }
 
index 47ee0848663eb38fba39dbdae0a2f1ac569b38c4..d7f70ae7e75dde2c6265c7bed8714b46f796b9f6 100644 (file)
@@ -4,6 +4,10 @@
 #include <common/stats.qh>
 
 bool autocvar_g_pickup_weapons_anyway;
+float autocvar_g_pickup_respawntime_superweapon;
+float autocvar_g_pickup_respawntimejitter_superweapon;
+float autocvar_g_pickup_respawntime_weapon;
+float autocvar_g_pickup_respawntimejitter_weapon;
 
 string W_Apply_Weaponreplace(string in);
 
index 218f0664b11b4b40f697866f82e5f54992a90e5d..609df4248550f2ea5d85dfd9955dbc15dfea0a22 100644 (file)
@@ -2177,31 +2177,6 @@ void readlevelcvars()
                }
        }
 
-       g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
-       g_pickup_respawntime_superweapon = cvar("g_pickup_respawntime_superweapon");
-       g_pickup_respawntime_ammo = cvar("g_pickup_respawntime_ammo");
-       g_pickup_respawntime_armor_small = cvar("g_pickup_respawntime_armor_small");
-       g_pickup_respawntime_armor_medium = cvar("g_pickup_respawntime_armor_medium");
-       g_pickup_respawntime_armor_big = cvar("g_pickup_respawntime_armor_big");
-       g_pickup_respawntime_armor_mega = cvar("g_pickup_respawntime_armor_mega");
-       g_pickup_respawntime_health_small = cvar("g_pickup_respawntime_health_small");
-       g_pickup_respawntime_health_medium = cvar("g_pickup_respawntime_health_medium");
-       g_pickup_respawntime_health_big = cvar("g_pickup_respawntime_health_big");
-       g_pickup_respawntime_health_mega = cvar("g_pickup_respawntime_health_mega");
-       g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup");
-       g_pickup_respawntimejitter_weapon = cvar("g_pickup_respawntimejitter_weapon");
-       g_pickup_respawntimejitter_superweapon = cvar("g_pickup_respawntimejitter_superweapon");
-       g_pickup_respawntimejitter_ammo = cvar("g_pickup_respawntimejitter_ammo");
-       g_pickup_respawntimejitter_armor_small = cvar("g_pickup_respawntimejitter_armor_small");
-       g_pickup_respawntimejitter_armor_medium = cvar("g_pickup_respawntimejitter_armor_medium");
-       g_pickup_respawntimejitter_armor_big = cvar("g_pickup_respawntimejitter_armor_big");
-       g_pickup_respawntimejitter_armor_mega = cvar("g_pickup_respawntimejitter_armor_mega");
-       g_pickup_respawntimejitter_health_small = cvar("g_pickup_respawntimejitter_health_small");
-       g_pickup_respawntimejitter_health_medium = cvar("g_pickup_respawntimejitter_health_medium");
-       g_pickup_respawntimejitter_health_big = cvar("g_pickup_respawntimejitter_health_big");
-       g_pickup_respawntimejitter_health_mega = cvar("g_pickup_respawntimejitter_health_mega");
-       g_pickup_respawntimejitter_powerup = cvar("g_pickup_respawntimejitter_powerup");
-
        g_weapon_stay = cvar(strcat("g_", GetGametype(), "_weapon_stay"));
        if(!g_weapon_stay)
                g_weapon_stay = cvar("g_weapon_stay");