set g_mayhem_regenerate 0 "allow players to regenerate hp. rates controlled by hp regeneration and rotting cvars"
set g_mayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
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_mayhem_selfdamage 0 "0 = disable selfdamage in mayhem, 1 = enable selfdamage in mayhem"
set g_tmayhem 0 "Team Mayhem: the team with the most frags in total mayhem wins"
set g_tmayhem_teams 2 "how many teams are in team mayhem (set by mapinfo)"
set g_tmayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
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_tmayhem_regenerate 0 "allow players to regenerate hp. rates controlled by hp regeneration and rotting cvars"
+set g_tmayhem_selfdamage 0 "0 = disable selfdamage in tmayhem, 1 = enable selfdamage in tmayhem"
bool autocvar_g_mayhem_regenerate;
string autocvar_g_mayhem_weaponarena;
bool autocvar_g_mayhem_powerups;
+bool autocvar_g_mayhem_selfdamage;
MUTATOR_HOOKFUNCTION(mayhem, Scores_CountFragsRemaining)
{
float frag_deathtype = M_ARGV(3, float);
float frag_damage = M_ARGV(4, float);
- if (frag_target == frag_attacker || frag_deathtype == DEATH_FALL.m_id)
+ if ((autocvar_g_mayhem_selfdamage == 0 && frag_target == frag_attacker) || frag_deathtype == DEATH_FALL.m_id)
frag_damage = 0;
M_ARGV(4, float) = frag_damage;
bool autocvar_g_tmayhem_regenerate;
string autocvar_g_tmayhem_weaponarena;
bool autocvar_g_tmayhem_powerups;
+bool autocvar_g_tmayhem_selfdamage;
// code from here on is just to support maps that don't have team entities
void tmayhem_SpawnTeam (string teamname, int teamcolor)
if (IS_PLAYER(frag_target))
if (!IS_DEAD(frag_target))
- if (frag_target == frag_attacker || SAME_TEAM(frag_target, frag_attacker) || frag_deathtype == DEATH_FALL.m_id)
+ if ((autocvar_g_tmayhem_selfdamage == 0 && frag_target == frag_attacker) || frag_deathtype == DEATH_FALL.m_id)
frag_damage = 0;
frag_mirrordamage = 0;