float MAPINFO_TYPE_CTF = 1; float MAPINFO_TYPE_ASSAULT = 2; float MAPINFO_TYPE_ONSLAUGHT = 4; float MAPINFO_TYPE_RACE = 8; float MAPINFO_TYPE_DEATHMATCH = 16; float MAPINFO_TYPE_TEAM_DEATHMATCH = 32; float MAPINFO_TYPE_DOMINATION = 64; float MAPINFO_TYPE_RUNEMATCH = 128; float MAPINFO_TYPE_LMS = 256; float MAPINFO_TYPE_ARENA = 512; float MAPINFO_TYPE_KEYHUNT = 1024; float MAPINFO_TYPE_NEXBALL = 2048; float MAPINFO_TYPE_CTS = 4096; float MAPINFO_TYPE_ALL = 65535; // this has to include all above bits float MAPINFO_FEATURE_WEAPONS = 1; // not defined for minstagib-only maps float MAPINFO_FLAG_HIDDEN = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually float MAPINFO_FLAG_FORBIDDEN = 2; // don't even allow the map by a cvar setting that allows hidden maps float MAPINFO_FLAG_FRUSTRATING = 4; // this map is near impossible to play, enable at your own risk float MapInfo_count; // info about a map that MapInfo loads string MapInfo_Map_bspname; string MapInfo_Map_title; string MapInfo_Map_description; string MapInfo_Map_author; string MapInfo_Map_clientstuff; // not in cache, only for map load string MapInfo_Map_fog; // not in cache, only for map load float MapInfo_Map_supportedGametypes; float MapInfo_Map_supportedFeatures; float MapInfo_Map_flags; vector MapInfo_Map_mins; // these are '0 0 0' if not supported! vector MapInfo_Map_maxs; // these are '0 0 0' if not specified! // load MapInfo_count; generate mapinfo for maps that miss them, and clear the // cache; you need to call MapInfo_FilterGametype afterwards! void MapInfo_Enumerate(); // filter the info by game type mask (updates MapInfo_count) float MapInfo_progress; float MapInfo_FilterGametype(float gametype, float features, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate); // 1 on success, 0 on temporary failure (call it again next frame then; use MapInfo_progress as progress indicator) float MapInfo_CurrentFeatures(); // retrieves currently required features from cvars float MapInfo_CurrentGametype(); // retrieves current gametype from cvars float MapInfo_ForbiddenFlags(); // retrieves current flags from cvars float MapInfo_RequiredFlags(); // retrieves current flags from cvars // load info about the i-th map into the MapInfo_Map_* globals float MapInfo_Get_ByID(float i); // 1 on success, 0 on failure string MapInfo_BSPName_ByID(float i); // load info about a map by name into the MapInfo_Map_* globals float MapInfo_Get_ByName(string s, float allowGenerate, float gametypeToSet); // 1 on success, 0 on failure, 2 if it autogenerated a mapinfo file // look for a map by a prefix, returns the actual map name on success, string_null on failure or ambigous match string MapInfo_FindName_match; // the name of the map that was found float MapInfo_FindName_firstResult; // -1 if none were found, index of first one if not unique but found (FindName then returns -1) float MapInfo_FindName(string s); string MapInfo_FixName(string s); // play a map float MapInfo_CheckMap(string s); // returns 0 if the map can't be played with the current settings void MapInfo_LoadMap(string s); // list all maps for the current game type string MapInfo_ListAllowedMaps(float pFlagsRequired, float pFlagsForbidden); // gets a gametype from a string float MapInfo_Type_FromString(string t); string MapInfo_GetGameTypeCvar(float t); void MapInfo_SwitchGameType(float t); // to be called from worldspawn to set up cvars void MapInfo_LoadMapSettings(string s); void MapInfo_Cache_Destroy(); // disable caching void MapInfo_Cache_Create(); // enable caching void MapInfo_Cache_Invalidate(); // delete cache if any, but keep enabled void MapInfo_ClearTemps(); // call this when done with mapinfo for this frame void MapInfo_Shutdown(); // call this in the shutdown handler