set g_instagib_blaster_keepforce 0 "allow secondary fire to push players"
set g_instagib_mirrordamage 0 "allow damage mirror instagib"
set g_instagib_friendlypush 1 "allow pushing teammates with the vaporizer primary attack"
+set g_instagib_allow_jetpacks 0 "allow jetpacks and fuel regenerators to appear in maps"
// ==========
#endif
#ifdef SVQC
+bool autocvar_g_powerups_jetpack = true;
PROPERTY(int, g_pickup_fuel_jetpack);
-void powerup_jetpack_init(Pickup this, entity item)
+void powerup_jetpack_init(Pickup def, entity item)
{
+ if(!autocvar_g_powerups || !autocvar_g_powerups_jetpack)
+ def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+
if(!GetResource(item, RES_FUEL))
SetResourceExplicit(item, RES_FUEL, g_pickup_fuel_jetpack);
}
MODEL(JetpackRegen_ITEM, Item_Model("g_fuelregen.md3"));
#endif
+#ifdef SVQC
+bool autocvar_g_powerups_fuelregen = true;
+void powerup_fuelregen_init(Pickup def, entity item)
+{
+ if(!autocvar_g_powerups || !autocvar_g_powerups_fuelregen)
+ def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
+}
+#endif
+
CLASS(JetpackRegen, Powerup)
ENDCLASS(JetpackRegen)
REGISTER_ITEM(JetpackRegen, JetpackRegen) {
this.m_canonical_spawnfunc = "item_fuel_regen";
#ifdef GAMEQC
- this.spawnflags = ITEM_FLAG_NORMAL;
+ this.spawnflags = ITEM_FLAG_NORMAL;
this.m_model = MDL_JetpackRegen_ITEM;
#endif
this.netname = "fuel_regen";
this.m_botvalue = 3000;
this.m_itemid = IT_FUEL_REGEN;
this.m_pickupevalfunc = ammo_pickupevalfunc;
+ this.m_iteminit = powerup_fuelregen_init;
#endif
}
bool autocvar_g_instagib_ammo_convert_rockets;
bool autocvar_g_instagib_ammo_convert_shells;
bool autocvar_g_instagib_ammo_convert_bullets;
+bool autocvar_g_instagib_allow_jetpacks;
/// \brief Returns a random classname of the instagib item.
/// \param[in] prefix Prefix of the cvars that hold probabilities.
if(autocvar_g_instagib_ammo_convert_bullets)
instagib_replace_item_with(item, ITEM_VaporizerCells);
return true;
+ case ITEM_Jetpack:
+ case ITEM_JetpackRegen:
+ return !autocvar_g_instagib_allow_jetpacks;
}
switch (item.weapon)
set g_powerups_shield 1 "allow shield powerups to spawn"
set g_powerups_speed 1 "allow speed powerups to spawn"
set g_powerups_invisibility 1 "allow invisibility powerups to spawn"
+set g_powerups_jetpack 1 "allow jetpacks to spawn"
+set g_powerups_fuelregen 1 "allow fuel regenerators to spawn"
set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammo"
set g_pickup_items -1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map, if 1 they are forced to spawn"
set g_pickup_respawntime_scaling_reciprocal 0 "Multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to 0) can be used to achieve a constant number of items spawned *per player*"