3 #include <common/mapinfo.qh>
6 void HUD_Mod_KH(vector pos, vector mySize);
8 CLASS(KeyHunt, Gametype)
11 this.gametype_init(this, _("Key Hunt"),"kh","g_keyhunt",GAMETYPE_FLAG_TEAMPLAY | GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 pointlimit=1000 teams=3 leadlimit=0",_("Gather all the keys to win the round"));
13 METHOD(KeyHunt, m_parse_mapinfo, bool(string k, string v))
16 cvar_set("g_keyhunt_teams", cvar_defstring("g_keyhunt_teams"));
21 cvar_set("g_keyhunt_teams", v);
26 METHOD(KeyHunt, m_isAlwaysSupported, bool(Gametype this, int spawnpoints, float diameter))
28 if(spawnpoints >= 12 && diameter > 5120)
32 METHOD(KeyHunt, m_setTeams, void(string sa))
34 cvar_set("g_keyhunt_teams", sa);
36 METHOD(KeyHunt, 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))
39 returns(menu, _("Point limit:"), 200, 1500, 50, "g_keyhunt_point_limit", "g_keyhunt_teams_override", _("The amount of points needed before the match will end"));
42 ATTRIB(KeyHunt, m_modicons, void(vector pos, vector mySize), HUD_Mod_KH);
44 ATTRIB(KeyHunt, m_legacydefaults, string, "1000 20 3 0");
46 REGISTER_GAMETYPE(KEYHUNT, NEW(KeyHunt));