3 #include <common/gamemodes/gamemode/deathmatch/deathmatch.qh>
4 #include <common/gamemodes/gamemode/tdm/tdm.qh>
5 #include <common/mapinfo.qh>
7 CLASS(tmayhem, Gametype)
10 this.gametype_init(this, _("Team Mayhem"),"tmayhem","g_tmayhem",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=1500 teams=2 leadlimit=0",_("Compete with your team for the most damage dealt and frags in this chaotic mayhem!"));
12 METHOD(tmayhem, m_parse_mapinfo, bool(string k, string v))
15 cvar_set("g_tmayhem_teams", cvar_defstring("g_tmayhem_teams"));
20 cvar_set("g_tmayhem_teams", v);
25 METHOD(tmayhem, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
29 METHOD(tmayhem, m_isForcedSupported, bool(Gametype this))
31 if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.m_flags)){
34 if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH.m_flags)){
39 METHOD(tmayhem, m_setTeams, void(string sa))
41 cvar_set("g_tmayhem_teams", sa);
43 METHOD(tmayhem, m_configuremenu, void(Gametype this, entity menu, void(entity me, string pLabel, float pMin, float pMax, float pStep, string pCvar, string tCvar, string pTooltip) returns))
46 returns(menu, _("Point limit:"), 200, 3000, 100, "g_tmayhem_point_limit", "g_tmayhem_teams_override", _("How much score is needed before the match will end"));
48 ATTRIB(tmayhem, m_legacydefaults, string, "1500 20 2 0");
50 REGISTER_GAMETYPE(TEAM_MAYHEM, NEW(tmayhem));
51 #define g_tmayhem IS_GAMETYPE(TEAM_MAYHEM)