set g_mayhem_powerups 1 "Allow powerups in mayhem. Only checked if g_powerups is -1 therefore this will be overridden by g_powerups 1 or 0"
set g_tmayhem_powerups 1 "Allow powerups in team mayhem. Only checked if g_powerups is -1 therefore this will be overridden by g_powerups 1 or 0"
+set g_mayhem_pickup_items 0 "spawn pickup items in mayhem"
+set g_tmayhem_pickup_items 0 "spawn pickup items in team mayhem"
+set g_mayhem_pickup_items_remove_weapons_and_ammo 1 "when pickup items are enabled in mayhem still remove weapons and ammo pickups"
+set g_tmayhem_pickup_items_remove_weapons_and_ammo 1 "when pickup items are enabled in team mayhem still remove weapons and ammo pickups"
set g_mayhem_selfdamage 0 "0 = disable selfdamage in mayhem, 1 = enable selfdamage in mayhem"
set g_tmayhem_selfdamage 0 "0 = disable selfdamage in tmayhem, 1 = enable selfdamage in tmayhem"
bool autocvar_g_mayhem_powerups;
bool autocvar_g_mayhem_selfdamage;
int autocvar_g_mayhem_scoringmethod;
+bool autocvar_g_mayhem_pickup_items;
+bool autocvar_g_mayhem_pickup_items_remove_weapons_and_ammo;
+bool autocvar_g_mayhem_unlimited_ammo;
float autocvar_g_mayhem_start_health = 200;
float autocvar_g_mayhem_start_armor = 200;
MUTATOR_HOOKFUNCTION(mayhem, SetStartItems)
{
start_items &= ~(IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS);
+ if(!cvar("g_use_ammunition") || autocvar_g_mayhem_unlimited_ammo)
+ start_items |= IT_UNLIMITED_AMMO;
+
start_health = warmup_start_health = autocvar_g_mayhem_start_health;
start_armorvalue = warmup_start_armorvalue = autocvar_g_mayhem_start_armor;
start_ammo_shells = warmup_start_ammo_shells = autocvar_g_mayhem_start_ammo_shells;
return true;
}
}
- //handle other items, remove unless globally forced on
- if (autocvar_g_pickup_items <= 0)
+ //remove all items if items are forced off globally
+ if (autocvar_g_pickup_items == 0){
return true;
+ }
+ //if items are switched on in this gamemode allow the removal of weapons and ammo still
+ if ((autocvar_g_mayhem_pickup_items == 1 && autocvar_g_mayhem_pickup_items_remove_weapons_and_ammo == 1) && autocvar_g_pickup_items <= 0){
+ if (item.itemdef.instanceOfAmmo || item.itemdef.instanceOfWeaponPickup){
+ return true;
+ }
+ }
+ //remove items if not globally set to follow mode's settings and locally set off
+ if (autocvar_g_pickup_items == -1 && autocvar_g_mayhem_pickup_items == 0){
+ return true;
+ }
+ return false;
}
MUTATOR_HOOKFUNCTION(mayhem, Damage_Calculate)
bool autocvar_g_tmayhem_powerups;
bool autocvar_g_tmayhem_selfdamage;
int autocvar_g_tmayhem_scoringmethod;
+bool autocvar_g_tmayhem_pickup_items;
+bool autocvar_g_tmayhem_pickup_items_remove_weapons_and_ammo;
+bool autocvar_g_tmayhem_unlimited_ammo;
float autocvar_g_tmayhem_start_health = 200;
float autocvar_g_tmayhem_start_armor = 200;
MUTATOR_HOOKFUNCTION(tmayhem, SetStartItems)
{
start_items &= ~(IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS);
+ if(!cvar("g_use_ammunition") || autocvar_g_tmayhem_unlimited_ammo)
+ start_items |= IT_UNLIMITED_AMMO;
+
start_health = warmup_start_health = autocvar_g_tmayhem_start_health;
start_armorvalue = warmup_start_armorvalue = autocvar_g_tmayhem_start_armor;
start_ammo_shells = warmup_start_ammo_shells = autocvar_g_tmayhem_start_ammo_shells;
return true;
}
}
- //handle other items, remove unless globally forced on
- if (autocvar_g_pickup_items <= 0)
+ //remove all items if items are forced off globally
+ if (autocvar_g_pickup_items == 0){
return true;
+ }
+ //if items are switched on in this gamemode allow the removal of weapons and ammo still
+ if ((autocvar_g_tmayhem_pickup_items == 1 && autocvar_g_tmayhem_pickup_items_remove_weapons_and_ammo == 1) && autocvar_g_pickup_items <= 0){
+ if (item.itemdef.instanceOfAmmo || item.itemdef.instanceOfWeaponPickup){
+ return true;
+ }
+ }
+ //remove items if not globally set to follow mode's settings and locally set off
+ if (autocvar_g_pickup_items == -1 && autocvar_g_tmayhem_pickup_items == 0){
+ return true;
+ }
+ return false;
}
MUTATOR_HOOKFUNCTION(tmayhem, Damage_Calculate)