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"
-set g_mayhem_regenerate 0 "allow players to regenerate hp. rates controlled by hp regeneration and rotting cvars"
-set g_tmayhem_regenerate 0 "allow players to regenerate hp. rates controlled by hp regeneration and rotting cvars"
+set g_mayhem_regenerate 0 "health and/or armor regeneration, according to g_balance_health_regen and g_balance_armor_regen"
+set g_tmayhem_regenerate 0 "health and/or armor regeneration, according to g_balance_health_regen and g_balance_armor_regen"
+set g_mayhem_rot 0 "health and/or armor rotting, according to g_balance_health_rot and g_balance_armor_rot"
+set g_tmayhem_rot 0 "health and/or armor rotting, according to g_balance_health_rot and g_balance_armor_rot"
set g_tmayhem_teams 2 "how many teams are in team mayhem (set by mapinfo)"
set g_tmayhem_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
float autocvar_g_mayhem_visual_score_limit;
bool autocvar_g_mayhem_regenerate;
+bool autocvar_g_mayhem_rot;
string autocvar_g_mayhem_weaponarena;
bool autocvar_g_mayhem_powerups;
bool autocvar_g_mayhem_selfdamage;
start_ammo_fuel = warmup_start_ammo_fuel = autocvar_g_mayhem_start_ammo_fuel;
}
-//this hook also enables rotting, as players spawn with more hp and armor than what default rot limits are set to this is a bad idea as of now
MUTATOR_HOOKFUNCTION(mayhem, PlayerRegen)
{
- if (autocvar_g_mayhem_regenerate)
- return false;
- return true;
+ if(!autocvar_g_mayhem_regenerate)
+ M_ARGV(2, float) = 0;
+ if(!autocvar_g_mayhem_rot)
+ M_ARGV(3, float) = 0;
+ return (!autocvar_g_mayhem_regenerate && !autocvar_g_mayhem_rot);
}
MUTATOR_HOOKFUNCTION(mayhem, ForbidThrowCurrentWeapon)
int autocvar_g_tmayhem_teams_override;
bool autocvar_g_tmayhem_regenerate;
+bool autocvar_g_tmayhem_rot;
string autocvar_g_tmayhem_weaponarena;
bool autocvar_g_tmayhem_powerups;
bool autocvar_g_tmayhem_selfdamage;
start_ammo_fuel = warmup_start_ammo_fuel = autocvar_g_tmayhem_start_ammo_fuel;
}
-//this hook also enables rotting, as players spawn with more hp and armor than what default rot limits are set to this is a bad idea as of now until PlayerRegen is changed
MUTATOR_HOOKFUNCTION(tmayhem, PlayerRegen)
{
- if (autocvar_g_tmayhem_regenerate)
- return false;
- return true;
+ if(!autocvar_g_tmayhem_regenerate)
+ M_ARGV(2, float) = 0;
+ if(!autocvar_g_tmayhem_rot)
+ M_ARGV(3, float) = 0;
+ return (!autocvar_g_tmayhem_regenerate && !autocvar_g_tmayhem_rot);
}
MUTATOR_HOOKFUNCTION(tmayhem, ForbidThrowCurrentWeapon)