3 #include <common/gamemodes/gamemode/deathmatch/deathmatch.qh>
4 #include <common/mapinfo.qh>
9 this.gametype_init(this, _("Duel"),"duel","g_duel",GAMETYPE_FLAG_USEPOINTS,"","timelimit=10 pointlimit=0 leadlimit=0",_("Fight in a one versus one arena battle to decide the winner"));
11 METHOD(Duel, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
13 return (diameter < 16384);
15 METHOD(Duel, m_isForcedSupported, bool(Gametype this))
17 if(!cvar("g_duel_not_dm_maps"))
19 // if this is set, all DM maps support duel too
20 // TODO: we should really check the size of maps, some DM maps do not work for duel!
21 if(!(MapInfo_Map_supportedGametypes & this.m_flags) && (MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH.m_flags))
22 return true; // TODO: references another gametype (alternatively, we could check which gamemodes are always enabled and append this if any are supported)
27 REGISTER_GAMETYPE(DUEL, NEW(Duel));
28 #define g_duel IS_GAMETYPE(DUEL)