From: Mario Date: Tue, 14 Feb 2017 23:28:06 +0000 (+1000) Subject: Add an item init attribute function, so the item's default values aren't applied... X-Git-Tag: xonotic-v0.8.2~209 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ff44406e4676be9d902d9dbb18b9dfc72c77748d;p=xonotic%2Fxonotic-data.pk3dir.git Add an item init attribute function, so the item's default values aren't applied in the spawnfunction directly (temporary hack until we have something cleaner) --- diff --git a/qcsrc/common/items/item.qh b/qcsrc/common/items/item.qh index f3aa0cec2..52fa9b85c 100644 --- a/qcsrc/common/items/item.qh +++ b/qcsrc/common/items/item.qh @@ -37,6 +37,11 @@ const int IT_STRENGTH = BIT(22); const int IT_UNLIMITED_AMMO = IT_UNLIMITED_WEAPON_AMMO | IT_UNLIMITED_SUPERWEAPONS; const int IT_PICKUPMASK = IT_UNLIMITED_AMMO | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately +#ifdef SVQC +.float strength_finished = _STAT(STRENGTH_FINISHED); +.float invincible_finished = _STAT(INVINCIBLE_FINISHED); +#endif + #define ITEM_HANDLE(signal, ...) __Item_Send_##signal(__VA_ARGS__) CLASS(GameItem, Object) ATTRIB(GameItem, m_id, int, 0); diff --git a/qcsrc/common/items/item/ammo.qh b/qcsrc/common/items/item/ammo.qh index d7c3e9408..15d8e391d 100644 --- a/qcsrc/common/items/item/ammo.qh +++ b/qcsrc/common/items/item/ammo.qh @@ -22,6 +22,14 @@ ENDCLASS(Ammo) MODEL(Bullets_ITEM, Item_Model("a_bullets.mdl")); #endif +#ifdef SVQC +PROPERTY(int, g_pickup_nails); +void ammo_bullets_init(entity item) +{ + if(!item.ammo_nails) + item.ammo_nails = g_pickup_nails; +} +#endif REGISTER_ITEM(Bullets, Ammo) { #ifdef GAMEQC this.m_model = MDL_Bullets_ITEM; @@ -31,6 +39,7 @@ REGISTER_ITEM(Bullets, Ammo) { #ifdef SVQC this.m_botvalue = 1500; this.m_itemid = IT_NAILS; + this.m_iteminit = ammo_bullets_init; #endif } @@ -38,6 +47,14 @@ REGISTER_ITEM(Bullets, Ammo) { MODEL(Cells_ITEM, Item_Model("a_cells.md3")); #endif +#ifdef SVQC +PROPERTY(int, g_pickup_cells); +void ammo_cells_init(entity item) +{ + if(!item.ammo_cells) + item.ammo_cells = g_pickup_cells; +} +#endif REGISTER_ITEM(Cells, Ammo) { #ifdef GAMEQC this.m_model = MDL_Cells_ITEM; @@ -47,6 +64,7 @@ REGISTER_ITEM(Cells, Ammo) { #ifdef SVQC this.m_botvalue = 1500; this.m_itemid = IT_CELLS; + this.m_iteminit = ammo_cells_init; #endif } @@ -54,6 +72,14 @@ REGISTER_ITEM(Cells, Ammo) { MODEL(Plasma_ITEM, Item_Model("a_cells.md3")); #endif +#ifdef SVQC +PROPERTY(int, g_pickup_plasma); +void ammo_plasma_init(entity item) +{ + if(!item.ammo_plasma) + item.ammo_plasma = g_pickup_plasma; +} +#endif REGISTER_ITEM(Plasma, Ammo) { #ifdef GAMEQC this.m_model = MDL_Plasma_ITEM; @@ -63,6 +89,7 @@ REGISTER_ITEM(Plasma, Ammo) { #ifdef SVQC this.m_botvalue = 1500; this.m_itemid = IT_PLASMA; + this.m_iteminit = ammo_plasma_init; #endif } @@ -70,6 +97,14 @@ REGISTER_ITEM(Plasma, Ammo) { MODEL(Rockets_ITEM, Item_Model("a_rockets.md3")); #endif +#ifdef SVQC +PROPERTY(int, g_pickup_rockets); +void ammo_rockets_init(entity item) +{ + if(!item.ammo_rockets) + item.ammo_rockets = g_pickup_rockets; +} +#endif REGISTER_ITEM(Rockets, Ammo) { #ifdef GAMEQC this.m_model = MDL_Rockets_ITEM; @@ -79,6 +114,7 @@ REGISTER_ITEM(Rockets, Ammo) { #ifdef SVQC this.m_botvalue = 1500; this.m_itemid = IT_ROCKETS; + this.m_iteminit = ammo_rockets_init; #endif } @@ -86,6 +122,14 @@ REGISTER_ITEM(Rockets, Ammo) { MODEL(Shells_ITEM, Item_Model("a_shells.md3")); #endif +#ifdef SVQC +PROPERTY(int, g_pickup_shells); +void ammo_shells_init(entity item) +{ + if(!item.ammo_shells) + item.ammo_shells = g_pickup_shells; +} +#endif REGISTER_ITEM(Shells, Ammo) { #ifdef GAMEQC this.m_model = MDL_Shells_ITEM; @@ -95,5 +139,6 @@ REGISTER_ITEM(Shells, Ammo) { #ifdef SVQC this.m_botvalue = 1000; this.m_itemid = IT_SHELLS; + this.m_iteminit = ammo_shells_init; #endif } diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index f153bf06e..6f9c5388e 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -20,6 +20,15 @@ SOUND(ArmorSmall, Item_Sound("armor1")); #endif #ifdef SVQC PROPERTY(float, g_pickup_armorsmall_anyway); +PROPERTY(int, g_pickup_armorsmall); +PROPERTY(int, g_pickup_armorsmall_max); +void item_armorsmall_init(entity item) +{ + if(!item.max_armorvalue) + item.max_armorvalue = g_pickup_armorsmall_max; + if(!item.armorvalue) + item.armorvalue = g_pickup_armorsmall; +} #endif REGISTER_ITEM(ArmorSmall, Armor) { @@ -34,6 +43,7 @@ REGISTER_ITEM(ArmorSmall, Armor) { this.m_respawntime = GET(g_pickup_respawntime_short); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); this.m_pickupanyway = GET(g_pickup_armorsmall_anyway); + this.m_iteminit = item_armorsmall_init; #endif } @@ -43,6 +53,15 @@ SOUND(ArmorMedium, Item_Sound("armor10")); #endif #ifdef SVQC PROPERTY(float, g_pickup_armormedium_anyway); +PROPERTY(int, g_pickup_armormedium); +PROPERTY(int, g_pickup_armormedium_max); +void item_armormedium_init(entity item) +{ + if(!item.max_armorvalue) + item.max_armorvalue = g_pickup_armormedium_max; + if(!item.armorvalue) + item.armorvalue = g_pickup_armormedium; +} #endif REGISTER_ITEM(ArmorMedium, Armor) { @@ -57,6 +76,7 @@ REGISTER_ITEM(ArmorMedium, Armor) { this.m_respawntime = GET(g_pickup_respawntime_medium); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium); this.m_pickupanyway = GET(g_pickup_armormedium_anyway); + this.m_iteminit = item_armormedium_init; #endif } @@ -66,6 +86,15 @@ SOUND(ArmorBig, Item_Sound("armor17_5")); #endif #ifdef SVQC PROPERTY(float, g_pickup_armorbig_anyway); +PROPERTY(int, g_pickup_armorbig); +PROPERTY(int, g_pickup_armorbig_max); +void item_armorbig_init(entity item) +{ + if(!item.max_armorvalue) + item.max_armorvalue = g_pickup_armorbig_max; + if(!item.armorvalue) + item.armorvalue = g_pickup_armorbig; +} #endif REGISTER_ITEM(ArmorBig, Armor) { @@ -82,6 +111,7 @@ REGISTER_ITEM(ArmorBig, Armor) { this.m_respawntime = GET(g_pickup_respawntime_long); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); this.m_pickupanyway = GET(g_pickup_armorbig_anyway); + this.m_iteminit = item_armorbig_init; #endif } @@ -91,6 +121,15 @@ SOUND(ArmorMega, Item_Sound("armor25")); #endif #ifdef SVQC PROPERTY(float, g_pickup_armormega_anyway); +PROPERTY(int, g_pickup_armormega); +PROPERTY(int, g_pickup_armormega_max); +void item_armormega_init(entity item) +{ + if(!item.max_armorvalue) + item.max_armorvalue = g_pickup_armormega_max; + if(!item.armorvalue) + item.armorvalue = g_pickup_armormega; +} #endif REGISTER_ITEM(ArmorMega, Armor) { @@ -109,5 +148,6 @@ REGISTER_ITEM(ArmorMega, Armor) { this.m_respawntime = GET(g_pickup_respawntime_long); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); this.m_pickupanyway = GET(g_pickup_armormega_anyway); + this.m_iteminit = item_armormega_init; #endif } diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index 1fc544a40..01a292418 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -20,6 +20,15 @@ SOUND(HealthSmall, Item_Sound("minihealth")); #endif #ifdef SVQC PROPERTY(float, g_pickup_healthsmall_anyway); +PROPERTY(int, g_pickup_healthsmall); +PROPERTY(int, g_pickup_healthsmall_max); +void item_healthsmall_init(entity item) +{ + if(!item.max_health) + item.max_health = g_pickup_healthsmall_max; + if(!item.health) + item.health = g_pickup_healthsmall; +} #endif REGISTER_ITEM(HealthSmall, Health) { @@ -34,6 +43,7 @@ REGISTER_ITEM(HealthSmall, Health) { this.m_respawntime = GET(g_pickup_respawntime_short); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); this.m_pickupanyway = GET(g_pickup_healthsmall_anyway); + this.m_iteminit = item_healthsmall_init; #endif } @@ -43,6 +53,15 @@ SOUND(HealthMedium, Item_Sound("mediumhealth")); #endif #ifdef SVQC PROPERTY(float, g_pickup_healthmedium_anyway); +PROPERTY(int, g_pickup_healthmedium); +PROPERTY(int, g_pickup_healthmedium_max); +void item_healthmedium_init(entity item) +{ + if(!item.max_health) + item.max_health = g_pickup_healthmedium_max; + if(!item.health) + item.health = g_pickup_healthmedium; +} #endif REGISTER_ITEM(HealthMedium, Health) { @@ -57,6 +76,7 @@ REGISTER_ITEM(HealthMedium, Health) { this.m_respawntime = GET(g_pickup_respawntime_short); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short); this.m_pickupanyway = GET(g_pickup_healthmedium_anyway); + this.m_iteminit = item_healthmedium_init; #endif } @@ -66,6 +86,15 @@ SOUND(HealthBig, Item_Sound("mediumhealth")); #endif #ifdef SVQC PROPERTY(float, g_pickup_healthbig_anyway); +PROPERTY(int, g_pickup_healthbig); +PROPERTY(int, g_pickup_healthbig_max); +void item_healthbig_init(entity item) +{ + if(!item.max_health) + item.max_health = g_pickup_healthbig_max; + if(!item.health) + item.health = g_pickup_healthbig; +} #endif REGISTER_ITEM(HealthBig, Health) { @@ -82,6 +111,7 @@ REGISTER_ITEM(HealthBig, Health) { this.m_respawntime = GET(g_pickup_respawntime_medium); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium); this.m_pickupanyway = GET(g_pickup_healthbig_anyway); + this.m_iteminit = item_healthbig_init; #endif } @@ -91,6 +121,15 @@ SOUND(HealthMega, Item_Sound("megahealth")); #endif #ifdef SVQC PROPERTY(float, g_pickup_healthmega_anyway); +PROPERTY(int, g_pickup_healthmega); +PROPERTY(int, g_pickup_healthmega_max); +void item_healthmega_init(entity item) +{ + if(!item.max_health) + item.max_health = g_pickup_healthmega_max; + if(!item.health) + item.health = g_pickup_healthmega; +} #endif REGISTER_ITEM(HealthMega, Health) { @@ -109,5 +148,6 @@ REGISTER_ITEM(HealthMega, Health) { this.m_respawntime = GET(g_pickup_respawntime_long); this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long); this.m_pickupanyway = GET(g_pickup_healthmega_anyway); + this.m_iteminit = item_healthmega_init; #endif } diff --git a/qcsrc/common/items/item/jetpack.qh b/qcsrc/common/items/item/jetpack.qh index 5093234fb..430161d6a 100644 --- a/qcsrc/common/items/item/jetpack.qh +++ b/qcsrc/common/items/item/jetpack.qh @@ -15,6 +15,14 @@ MODEL(Jetpack_ITEM, Item_Model("g_jetpack.md3")); #endif +#ifdef SVQC +PROPERTY(int, g_pickup_fuel_jetpack); +void powerup_jetpack_init(entity item) +{ + if(!item.ammo_fuel) + item.ammo_fuel = g_pickup_fuel_jetpack; +} +#endif REGISTER_ITEM(Jetpack, Powerup) { #ifdef GAMEQC this.m_model = MDL_Jetpack_ITEM; @@ -28,6 +36,7 @@ REGISTER_ITEM(Jetpack, Powerup) { #ifdef SVQC this.m_botvalue = 3000; this.m_pickupevalfunc = ammo_pickupevalfunc; + this.m_iteminit = powerup_jetpack_init; #endif } @@ -35,6 +44,14 @@ REGISTER_ITEM(Jetpack, Powerup) { MODEL(JetpackFuel_ITEM, Item_Model("g_fuel.md3")); #endif +#ifdef SVQC +PROPERTY(int, g_pickup_fuel); +void ammo_fuel_init(entity item) +{ + if(!item.ammo_fuel) + item.ammo_fuel = g_pickup_fuel; +} +#endif REGISTER_ITEM(JetpackFuel, Ammo) { #ifdef GAMEQC this.m_model = MDL_JetpackFuel_ITEM; @@ -44,6 +61,7 @@ REGISTER_ITEM(JetpackFuel, Ammo) { #ifdef SVQC this.m_botvalue = 2000; this.m_itemid = IT_FUEL; + this.m_iteminit = ammo_fuel_init; #endif } diff --git a/qcsrc/common/items/item/pickup.qh b/qcsrc/common/items/item/pickup.qh index 26771e68d..d029ca597 100644 --- a/qcsrc/common/items/item/pickup.qh +++ b/qcsrc/common/items/item/pickup.qh @@ -43,6 +43,7 @@ CLASS(Pickup, GameItem) ATTRIB(Pickup, m_respawntime, float()); ATTRIB(Pickup, m_respawntimejitter, float()); ATTRIB(Pickup, m_pickupanyway, float()); + ATTRIB(Pickup, m_iteminit, void(entity item)); float Item_GiveTo(entity item, entity player); METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player)) { diff --git a/qcsrc/common/items/item/powerup.qh b/qcsrc/common/items/item/powerup.qh index aaec88eee..ef0d223b6 100644 --- a/qcsrc/common/items/item/powerup.qh +++ b/qcsrc/common/items/item/powerup.qh @@ -22,6 +22,14 @@ MODEL(Strength_ITEM, Item_Model("g_strength.md3")); SOUND(Strength, Item_Sound("powerup")); #endif +#ifdef SVQC +float autocvar_g_balance_powerup_strength_time; +void powerup_strength_init(entity item) +{ + if(!item.strength_finished) + item.strength_finished = autocvar_g_balance_powerup_strength_time; +} +#endif REGISTER_ITEM(Strength, Powerup) { #ifdef GAMEQC this.m_model = MDL_Strength_ITEM; @@ -35,6 +43,9 @@ REGISTER_ITEM(Strength, Powerup) { this.m_waypoint = _("Strength"); this.m_waypointblink = 2; this.m_itemid = IT_STRENGTH; +#ifdef SVQC + this.m_iteminit = powerup_strength_init; +#endif } #ifdef GAMEQC @@ -42,6 +53,14 @@ MODEL(Shield_ITEM, Item_Model("g_invincible.md3")); SOUND(Shield, Item_Sound("powerup_shield")); #endif +#ifdef SVQC +float autocvar_g_balance_powerup_invincible_time; +void powerup_shield_init(entity item) +{ + if(!item.invincible_finished) + item.invincible_finished = autocvar_g_balance_powerup_invincible_time; +} +#endif REGISTER_ITEM(Shield, Powerup) { #ifdef GAMEQC this.m_model = MDL_Shield_ITEM; @@ -55,4 +74,7 @@ REGISTER_ITEM(Shield, Powerup) { this.m_waypoint = _("Shield"); this.m_waypointblink = 2; this.m_itemid = IT_INVINCIBLE; +#ifdef SVQC + this.m_iteminit = powerup_shield_init; +#endif } diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index d9f641d82..1851f1b67 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -14,6 +14,14 @@ MODEL(VaporizerCells_ITEM, Item_Model("a_cells.md3")); SOUND(VaporizerCells, Item_Sound("itempickup")); #endif +#ifdef SVQC +int autocvar_g_instagib_ammo_drop; +void ammo_vaporizercells_init(entity item) +{ + if(!item.ammo_cells) + item.ammo_cells = autocvar_g_instagib_ammo_drop; +} +#endif REGISTER_ITEM(VaporizerCells, Ammo) { #ifdef GAMEQC this.m_model = MDL_VaporizerCells_ITEM; @@ -26,6 +34,7 @@ REGISTER_ITEM(VaporizerCells, Ammo) { this.m_itemid = IT_CELLS; this.m_respawntime = GET(instagib_respawntime_ammo); this.m_respawntimejitter = GET(instagib_respawntimejitter_ammo); + this.m_iteminit = ammo_vaporizercells_init; #endif } diff --git a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc index af8788571..65b7b5256 100644 --- a/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/sv_instagib.qc @@ -1,6 +1,6 @@ #include "sv_instagib.qh" -int autocvar_g_instagib_ammo_drop; +//int autocvar_g_instagib_ammo_drop; bool autocvar_g_instagib_ammo_convert_cells; bool autocvar_g_instagib_ammo_convert_rockets; bool autocvar_g_instagib_ammo_convert_shells; @@ -17,7 +17,6 @@ REGISTER_MUTATOR(mutator_instagib, cvar("g_instagib") && !g_nexball); spawnfunc(item_minst_cells) { if (!g_instagib) { delete(this); return; } - if (!this.ammo_cells) this.ammo_cells = autocvar_g_instagib_ammo_drop; StartItem(this, ITEM_VaporizerCells); } diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 79fa97801..3e3f32a9d 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -1079,6 +1079,9 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default this.item_model_ent = itemmodel; this.item_pickupsound_ent = pickupsound; + if(def.m_iteminit) + def.m_iteminit(this); + if(!this.respawntime) // both need to be set { this.respawntime = defaultrespawntime; @@ -1285,8 +1288,6 @@ void StartItem(entity this, GameItem def) spawnfunc(item_rockets) { - if(!this.ammo_rockets) - this.ammo_rockets = g_pickup_rockets; StartItem(this, ITEM_Rockets); } @@ -1302,22 +1303,16 @@ spawnfunc(item_bullets) return; } - if(!this.ammo_nails) - this.ammo_nails = g_pickup_nails; StartItem(this, ITEM_Bullets); } spawnfunc(item_cells) { - if(!this.ammo_cells) - this.ammo_cells = g_pickup_cells; StartItem(this, ITEM_Cells); } spawnfunc(item_plasma) { - if(!this.ammo_plasma) - this.ammo_plasma = g_pickup_plasma; StartItem(this, ITEM_Plasma); } @@ -1333,80 +1328,46 @@ spawnfunc(item_shells) return; } - if(!this.ammo_shells) - this.ammo_shells = g_pickup_shells; StartItem(this, ITEM_Shells); } spawnfunc(item_armor_small) { - if(!this.armorvalue) - this.armorvalue = g_pickup_armorsmall; - if(!this.max_armorvalue) - this.max_armorvalue = g_pickup_armorsmall_max; StartItem(this, ITEM_ArmorSmall); } spawnfunc(item_armor_medium) { - if(!this.armorvalue) - this.armorvalue = g_pickup_armormedium; - if(!this.max_armorvalue) - this.max_armorvalue = g_pickup_armormedium_max; StartItem(this, ITEM_ArmorMedium); } spawnfunc(item_armor_big) { - if(!this.armorvalue) - this.armorvalue = g_pickup_armorbig; - if(!this.max_armorvalue) - this.max_armorvalue = g_pickup_armorbig_max; StartItem(this, ITEM_ArmorBig); } spawnfunc(item_armor_mega) { - if(!this.armorvalue) - this.armorvalue = g_pickup_armormega; - if(!this.max_armorvalue) - this.max_armorvalue = g_pickup_armormega_max; StartItem(this, ITEM_ArmorMega); } spawnfunc(item_health_small) { - if(!this.max_health) - this.max_health = g_pickup_healthsmall_max; - if(!this.health) - this.health = g_pickup_healthsmall; StartItem(this, ITEM_HealthSmall); } spawnfunc(item_health_medium) { - if(!this.max_health) - this.max_health = g_pickup_healthmedium_max; - if(!this.health) - this.health = g_pickup_healthmedium; StartItem(this, ITEM_HealthMedium); } spawnfunc(item_health_big) { - if(!this.max_health) - this.max_health = g_pickup_healthbig_max; - if(!this.health) - this.health = g_pickup_healthbig; StartItem(this, ITEM_HealthBig); } spawnfunc(item_health_mega) { - if(!this.max_health) - this.max_health = g_pickup_healthmega_max; - if(!this.health) - this.health = g_pickup_healthmega; StartItem(this, ITEM_HealthMega); } @@ -1421,16 +1382,12 @@ spawnfunc(item_health100) { spawnfunc_item_health_mega(this); } spawnfunc(item_strength) { - if(!this.strength_finished) - this.strength_finished = autocvar_g_balance_powerup_strength_time; - StartItem(this, ITEM_Strength); + StartItem(this, ITEM_Strength); } spawnfunc(item_invincible) { - if(!this.invincible_finished) - this.invincible_finished = autocvar_g_balance_powerup_invincible_time; - StartItem(this, ITEM_Shield); + StartItem(this, ITEM_Shield); } // compatibility: @@ -1578,8 +1535,6 @@ spawnfunc(target_items) spawnfunc(item_fuel) { - if(!this.ammo_fuel) - this.ammo_fuel = g_pickup_fuel; StartItem(this, ITEM_JetpackFuel); } @@ -1595,8 +1550,6 @@ spawnfunc(item_fuel_regen) spawnfunc(item_jetpack) { - if(!this.ammo_fuel) - this.ammo_fuel = g_pickup_fuel_jetpack; if(start_items & ITEM_Jetpack.m_itemid) { spawnfunc_item_fuel(this); diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index bc1ac534b..c5c844e91 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -78,12 +78,12 @@ float autocvar_g_balance_pause_health_rot_spawn; float autocvar_g_balance_portal_health; float autocvar_g_balance_portal_lifetime; float autocvar_g_balance_powerup_invincible_takedamage; -float autocvar_g_balance_powerup_invincible_time; +//float autocvar_g_balance_powerup_invincible_time; float autocvar_g_balance_powerup_strength_damage; float autocvar_g_balance_powerup_strength_force; float autocvar_g_balance_powerup_strength_selfdamage; float autocvar_g_balance_powerup_strength_selfforce; -float autocvar_g_balance_powerup_strength_time; +//float autocvar_g_balance_powerup_strength_time; float autocvar_g_balance_superweapons_time; float autocvar_g_balance_selfdamagepercent; bool autocvar_g_balance_teams; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index adfb0dbee..3f1867758 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -47,8 +47,6 @@ float server_is_dedicated; .float pain_frame; //" .float crouch; // Crouching or not? -.float strength_finished = _STAT(STRENGTH_FINISHED); -.float invincible_finished = _STAT(INVINCIBLE_FINISHED); .float superweapons_finished = _STAT(SUPERWEAPONS_FINISHED); .float cnt; // used in too many places diff --git a/qcsrc/server/miscfunctions.qh b/qcsrc/server/miscfunctions.qh index 9016a22c7..730a528b9 100644 --- a/qcsrc/server/miscfunctions.qh +++ b/qcsrc/server/miscfunctions.qh @@ -160,35 +160,12 @@ float nearest_length[NUM_NEAREST_ENTITIES]; //#NO AUTOCVARS START -float g_pickup_shells; float g_pickup_shells_max; -float g_pickup_nails; float g_pickup_nails_max; -float g_pickup_rockets; float g_pickup_rockets_max; -float g_pickup_cells; float g_pickup_cells_max; -float g_pickup_plasma; float g_pickup_plasma_max; -float g_pickup_fuel; -float g_pickup_fuel_jetpack; float g_pickup_fuel_max; -float g_pickup_armorsmall; -float g_pickup_armorsmall_max; -float g_pickup_armormedium; -float g_pickup_armormedium_max; -float g_pickup_armorbig; -float g_pickup_armorbig_max; -float g_pickup_armormega; -float g_pickup_armormega_max; -float g_pickup_healthsmall; -float g_pickup_healthsmall_max; -float g_pickup_healthmedium; -float g_pickup_healthmedium_max; -float g_pickup_healthbig; -float g_pickup_healthbig_max; -float g_pickup_healthmega; -float g_pickup_healthmega_max; float g_pickup_weapons_anyway; float g_weaponarena; WepSet g_weaponarena_weapons;