]> de.git.xonotic.org Git - voretournament/voretournament.git/blob - data/qcsrc/common/mapinfo.qh
Fix settemp_for_type all. I have NO idea why that number needs to be 16383 and can...
[voretournament/voretournament.git] / data / qcsrc / common / mapinfo.qh
1 float MAPINFO_TYPE_CTF                          = 1;\r
2 float MAPINFO_TYPE_ASSAULT                      = 2;\r
3 float MAPINFO_TYPE_ONSLAUGHT            = 4;\r
4 float MAPINFO_TYPE_RACE                         = 8;\r
5 float MAPINFO_TYPE_DEATHMATCH           = 16;\r
6 float MAPINFO_TYPE_TEAM_DEATHMATCH      = 32;\r
7 float MAPINFO_TYPE_DOMINATION           = 64;\r
8 float MAPINFO_TYPE_LMS                          = 128;\r
9 float MAPINFO_TYPE_ARENA                        = 256;\r
10 float MAPINFO_TYPE_KEYHUNT                      = 512;\r
11 float MAPINFO_TYPE_CTS              = 1024;\r
12 float MAPINFO_TYPE_CA                           = 2048;\r
13 float MAPINFO_TYPE_RPG              = 4096;\r
14 float MAPINFO_TYPE_ALL              = 16383; // this has to include all above bits\r
15 \r
16 float MAPINFO_FEATURE_WEAPONS       = 1; // not defined for minstagib-only maps\r
17 \r
18 float MAPINFO_FLAG_HIDDEN           = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually\r
19 float MAPINFO_FLAG_FORBIDDEN        = 2; // don't even allow the map by a cvar setting that allows hidden maps\r
20 float MAPINFO_FLAG_FRUSTRATING      = 4; // this map is near impossible to play, enable at your own risk\r
21 \r
22 float MapInfo_count;\r
23 \r
24 // info about a map that MapInfo loads\r
25 string MapInfo_Map_bspname;\r
26 string MapInfo_Map_title;\r
27 string MapInfo_Map_description;\r
28 string MapInfo_Map_author;\r
29 string MapInfo_Map_clientstuff; // not in cache, only for map load\r
30 string MapInfo_Map_fog; // not in cache, only for map load\r
31 float MapInfo_Map_supportedGametypes;\r
32 float MapInfo_Map_supportedFeatures;\r
33 float MapInfo_Map_flags;\r
34 vector MapInfo_Map_mins; // these are '0 0 0' if not supported!\r
35 vector MapInfo_Map_maxs; // these are '0 0 0' if not specified!\r
36 \r
37 // load MapInfo_count; generate mapinfo for maps that miss them, and clear the\r
38 // cache; you need to call MapInfo_FilterGametype afterwards!\r
39 void MapInfo_Enumerate();\r
40 \r
41 // filter the info by game type mask (updates MapInfo_count)\r
42 float MapInfo_progress;\r
43 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)\r
44 float MapInfo_CurrentFeatures(); // retrieves currently required features from cvars\r
45 float MapInfo_CurrentGametype(); // retrieves current gametype from cvars\r
46 float MapInfo_ForbiddenFlags(); // retrieves current flags from cvars\r
47 float MapInfo_RequiredFlags(); // retrieves current flags from cvars\r
48 \r
49 // load info about the i-th map into the MapInfo_Map_* globals\r
50 float MapInfo_Get_ByID(float i); // 1 on success, 0 on failure\r
51 string MapInfo_BSPName_ByID(float i);\r
52 \r
53 // load info about a map by name into the MapInfo_Map_* globals\r
54 float MapInfo_Get_ByName(string s, float allowGenerate, float gametypeToSet); // 1 on success, 0 on failure, 2 if it autogenerated a mapinfo file\r
55 \r
56 // look for a map by a prefix, returns the actual map name on success, string_null on failure or ambigous match\r
57 string MapInfo_FindName_match; // the name of the map that was found\r
58 float MapInfo_FindName_firstResult; // -1 if none were found, index of first one if not unique but found (FindName then returns -1)\r
59 float MapInfo_FindName(string s);\r
60 string MapInfo_FixName(string s);\r
61 \r
62 // play a map\r
63 float MapInfo_CheckMap(string s); // returns 0 if the map can't be played with the current settings\r
64 void MapInfo_LoadMap(string s);\r
65 \r
66 // list all maps for the current game type\r
67 string MapInfo_ListAllowedMaps(float pFlagsRequired, float pFlagsForbidden);\r
68 \r
69 // gets a gametype from a string\r
70 float MapInfo_Type_FromString(string t);\r
71 string MapInfo_GetGameTypeCvar(float t);\r
72 void MapInfo_SwitchGameType(float t);\r
73 \r
74 // to be called from worldspawn to set up cvars\r
75 void MapInfo_LoadMapSettings(string s);\r
76 \r
77 void MapInfo_Cache_Destroy(); // disable caching\r
78 void MapInfo_Cache_Create(); // enable caching\r
79 void MapInfo_Cache_Invalidate(); // delete cache if any, but keep enabled\r
80 \r
81 void MapInfo_ClearTemps(); // call this when done with mapinfo for this frame\r
82 \r
83 void MapInfo_Shutdown(); // call this in the shutdown handler\r
84 \r
85 #define MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl")\r
86 #define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -settemp_* -_* -g_ban* +*"\r