#pragma once #include #if defined(CSQC) #include #endif CLASS(RaceCTS, Gametype) INIT(RaceCTS) { this.gametype_init(this, _("Race CTS"),"cts","g_cts",0,"cloaked","timelimit=20",_("Race for fastest time.")); } METHOD(RaceCTS, m_generate_mapinfo, void(Gametype this, string v)) { if(v == "target_startTimer") MapInfo_Map_supportedGametypes |= this.m_flags; } METHOD(RaceCTS, m_setTeams, void(string sa)) { // this is the skill of the map // not parsed by anything yet // for map databases // cvar_set("fraglimit", sa); } METHOD(RaceCTS, 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)) { TC(Gametype, this); returns(menu, _("Point limit:"), 50, 500, 10, string_null, string_null, string_null); } #ifdef CSQC ATTRIB(RaceCTS, m_modicons, void(vector pos, vector mySize), HUD_Mod_Race); #endif ATTRIB(RaceCTS, m_legacydefaults, string, "20 0 0"); ENDCLASS(RaceCTS) REGISTER_GAMETYPE(CTS, NEW(RaceCTS)); #define g_cts IS_GAMETYPE(CTS)