3 #include <common/mapinfo.qh>
6 void HUD_Mod_Race(vector pos, vector mySize);
11 this.gametype_init(this, _("Race"),"rc","g_race",GAMETYPE_FLAG_USEPOINTS,"","timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0",_("Race against other players to the finish line"));
13 METHOD(Race, m_parse_mapinfo, bool(string k, string v))
16 cvar_set("g_race_qualifying_timelimit", cvar_defstring("g_race_qualifying_timelimit"));
20 case "qualifying_timelimit":
21 cvar_set("g_race_qualifying_timelimit", v);
26 METHOD(Race, m_generate_mapinfo, void(Gametype this, string v))
28 if(v == "trigger_race_checkpoint")
29 MapInfo_Map_supportedGametypes |= this.m_flags;
31 METHOD(Race, m_isTwoBaseMode, bool())
35 METHOD(Race, 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))
38 returns(menu, _("Laps:"), 1, 25, 1, "g_race_laps_limit", string_null, string_null);
41 ATTRIB(Race, m_modicons, void(vector pos, vector mySize), HUD_Mod_Race);
43 ATTRIB(Race, m_legacydefaults, string, "20 5 7 15 0");
45 REGISTER_GAMETYPE(RACE, NEW(Race));
46 #define g_race IS_GAMETYPE(RACE)