set g_mayhem 0 "Mayhem: the player with the most frags in total mayhem wins"
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_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_point_limit -1 "Team Mayhem point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
set g_tmayhem_point_leadlimit -1 "Team Mayhem point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
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"
CLASS(mayhem, Gametype)
INIT(mayhem)
{
- this.gametype_init(this, _("Mayhem"),"mayhem","g_mayhem",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PREFERRED,"","timelimit=15 pointlimit=30 leadlimit=0",_("Score as many frags as you can"));
+ this.gametype_init(this, _("Mayhem"),"mayhem","g_mayhem",GAMETYPE_FLAG_USEPOINTS | GAMETYPE_FLAG_PREFERRED,"","timelimit=15 pointlimit=30 leadlimit=0",_("The player with the most frags in total mayhem wins!"));
}
METHOD(mayhem, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
{
return true;
}
+ METHOD(mayhem, m_isForcedSupported, bool(Gametype this))
+ {
+ if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.m_flags)){
+ return true;
+ }
+ return false;
+ }
ATTRIB(mayhem, m_legacydefaults, string, "30 20 0");
ENDCLASS(mayhem)
REGISTER_GAMETYPE(MAYHEM, NEW(mayhem));
bool autocvar_g_mayhem_regenerate;
string autocvar_g_mayhem_weaponarena;
+bool autocvar_g_mayhem_powerups;
MUTATOR_HOOKFUNCTION(mayhem, Scores_CountFragsRemaining)
{
MUTATOR_HOOKFUNCTION(mayhem, FilterItem)
{
entity item = M_ARGV(0, entity);
-
- if (autocvar_g_powerups <= 0)
- if (item.flags & FL_POWERUP)
- return true;
-
+ if (autocvar_g_powerups == 1){
+ if (item.flags & FL_POWERUP){
+ return false;
+ }
+ }
+ else if (autocvar_g_powerups == -1){
+ if (item.flags & FL_POWERUP){
+ if (autocvar_g_mayhem_powerups){
+ return false;
+ }
+ }
+ }
if (autocvar_g_pickup_items <= 0)
return true;
- else
- return false;
}
MUTATOR_HOOKFUNCTION(mayhem, Damage_Calculate)