Xonotic
|
#include "util.qh"
Go to the source code of this file.
Classes | |
class | Gametype |
Macros | |
#define | IS_GAMETYPE(NAME) (MapInfo_LoadedGametype == MAPINFO_TYPE_##NAME) |
#define | MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* +*" |
#define | MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl") |
#define | REGISTER_GAMETYPE(NAME, inst) REGISTER(Gametypes, MAPINFO_TYPE, NAME, m_id, inst) |
#define IS_GAMETYPE | ( | NAME | ) | (MapInfo_LoadedGametype == MAPINFO_TYPE_##NAME) |
Definition at line 131 of file mapinfo.qh.
#define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* +*" |
Definition at line 206 of file mapinfo.qh.
Referenced by _MapInfo_Parse_Settemp().
#define MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl") |
Definition at line 205 of file mapinfo.qh.
Referenced by CampaignPreInit(), and MapInfo_Get_ByName_NoFallbacks().
Definition at line 127 of file mapinfo.qh.
float _MapInfo_FilterGametype | ( | int | gametypeFlags, |
float | features, | ||
float | pFlagsRequired, | ||
float | pFlagsForbidden, | ||
float | pAbortOnGenerate | ||
) |
Definition at line 502 of file mapinfo.qc.
Referenced by _MapInfo_Map_ApplyGametypeEx().
Definition at line 507 of file mapinfo.qc.
References Gametype::team.
Referenced by NET_HANDLE(), and XonoticGametypeList_drawListBoxItem().
Definition at line 627 of file mapinfo.qc.
References _MapInfo_Parse_Settemp(), car(), cdr(), cvar(), cvar_set(), cvar_settemp(), cvar_value_issafe(), fclose(), fgets(), FILE_READ, fopen(), LOG_TRACE, LOG_WARN, MapInfo_Map_clientstuff, MAPINFO_SETTEMP_ACL_SYSTEM, matchacl(), strcat(), strstrofs, substring(), and WARN_COND.
Referenced by _MapInfo_Parse_Settemp(), CampaignPreInit(), and MapInfo_Get_ByName_NoFallbacks().
Definition at line 231 of file mapinfo.qc.
References _MapInfo_GlobItem(), and MapInfo_FilterList_Lookup().
Referenced by InstantAction_LoadMap(), MapInfo_Get_ByID(), MapList_Add_All(), MapList_LoadMap(), XonoticMapList_g_maplistCacheToggle(), and XonoticMapList_refilter().
void MapInfo_Cache_Create | ( | ) |
Definition at line 34 of file mapinfo.qc.
References _MapInfo_Cache_Active, _MapInfo_Cache_Buf_IndexToMapData, _MapInfo_Cache_DB_NameToIndex, buf_create, db_create(), and MapInfo_Cache_Destroy().
Referenced by MapInfo_Cache_Invalidate(), and preMenuInit().
void MapInfo_Cache_Destroy | ( | ) |
Definition at line 24 of file mapinfo.qc.
References _MapInfo_Cache_Active, _MapInfo_Cache_Buf_IndexToMapData, _MapInfo_Cache_DB_NameToIndex, and db_close().
Referenced by MapInfo_Cache_Create(), and MapInfo_Shutdown().
void MapInfo_Cache_Invalidate | ( | ) |
Definition at line 42 of file mapinfo.qc.
References _MapInfo_Cache_Active, and MapInfo_Cache_Create().
Referenced by MapInfo_Enumerate().
Definition at line 1170 of file mapinfo.qc.
References _MapInfo_CheckMap(), and MapInfo_ClearTemps().
Referenced by DoNextMapOverride(), GenericCommand_maplist(), getmaplist(), GotoMap(), Map_Check(), MapVote_AddVotable(), MapVote_Suggest(), and ValidateMap().
void MapInfo_ClearTemps | ( | ) |
Definition at line 1299 of file mapinfo.qc.
References MapInfo_Map_author, MapInfo_Map_bspname, MapInfo_Map_clientstuff, MapInfo_Map_description, MapInfo_Map_supportedFeatures, MapInfo_Map_supportedGametypes, MapInfo_Map_title, MapInfo_Map_titlestring, and string_null.
Referenced by _MapInfo_FilterGametype(), getladder(), getlsmaps(), getmaplist(), getrankings(), getrecords(), InitGameplayMode(), MapInfo_CheckMap(), MapInfo_FilterString(), MapInfo_Shutdown(), XonoticMapInfoDialog_loadMapInfo(), and XonoticMapList_drawListBoxItem().
int MapInfo_CurrentFeatures | ( | ) |
Definition at line 1140 of file mapinfo.qc.
References cvar(), and MAPINFO_FEATURE_WEAPONS.
Referenced by _MapInfo_CheckMap(), GameCommand_gametype(), GameTypeVote_SetGametype(), GenericCommand_maplist(), GotoFirstMap(), InstantAction_LoadMap(), make_mapinfo_Think(), MapInfo_ListAllAllowedMaps(), MapInfo_ListAllowedMaps(), MapVote_Start(), MapVote_Think(), RestoreGame(), spawnfunc(), and XonoticMapList_refilter().
Gametype MapInfo_CurrentGametype | ( | ) |
Definition at line 1150 of file mapinfo.qc.
References cvar(), cvar_string(), FOREACH, MapInfo_Type_FromString(), and prev.
Referenced by _MapInfo_CheckMap(), Campaign_Invalid(), GameCommand_gametype(), GameType_ConfigureSliders_for_CurrentGametype(), GameTypeVote_SetGametype(), GameTypeVote_Start(), GenericCommand_maplist(), GotoFirstMap(), InstantAction_LoadMap(), make_mapinfo_Think(), MapInfo_ListAllAllowedMaps(), MapInfo_LoadMapSettings(), MapVote_CheckRules_2(), MapVote_Init(), MapVote_SendEntity(), MapVote_Start(), MapVote_Think(), RestoreGame(), spawnfunc(), STATIC_INIT_LATE(), TeamBalance_FindBestTeam(), XonoticGametypeList_loadCvars(), XonoticGametypeList_saveCvars(), and XonoticMapList_refilter().
void MapInfo_Enumerate | ( | ) |
Definition at line 115 of file mapinfo.qc.
References _MapInfo_globcount, _MapInfo_globhandle, _MapInfo_globopen, MapInfo_Cache_Invalidate(), search_begin(), search_end(), and search_getsize().
Referenced by GameCommand_make_mapinfo(), GameTypeVote_MapInfo_FixName(), GameTypeVote_SetGametype(), GenericCommand_maplist(), GotoFirstMap(), MapInfo_ListAllAllowedMaps(), MapInfo_ListAllowedMaps(), MapVote_Start(), preMenuInit(), RestoreGame(), and spawnfunc().
float MapInfo_FilterGametype | ( | Gametype | gametypeFlags, |
float | features, | ||
float | pFlagsRequired, | ||
float | pFlagsForbidden, | ||
float | pAbortOnGenerate | ||
) |
Definition at line 194 of file mapinfo.qc.
References _MapInfo_filtered, _MapInfo_FilterList_cmp(), _MapInfo_FilterList_swap(), heapsort(), MapInfo_ClearTemps(), MapInfo_count, MapInfo_Get_ByID(), MapInfo_Map_bspname, MapInfo_Map_title, NULL, and strstrofs.
Referenced by XonoticMapList_refilter().
Definition at line 1086 of file mapinfo.qc.
References _MapInfo_GlobItem(), floor(), MapInfo_count, MapInfo_FilterList_Lookup(), MapInfo_FindName_firstResult, MapInfo_FindName_match, startsWithNocase(), strcasecmp, and string_null.
Referenced by MapInfo_FixName(), XonoticMapList_keyDown(), and XonoticMapList_refilter().
Definition at line 1134 of file mapinfo.qc.
References MapInfo_FindName(), and MapInfo_FindName_match.
Referenced by GameTypeVote_MapInfo_FixName(), and ValidateMap().
int MapInfo_ForbiddenFlags | ( | ) |
Definition at line 1324 of file mapinfo.qc.
References cvar(), MAPINFO_FLAG_FORBIDDEN, MAPINFO_FLAG_FRUSTRATING, and MAPINFO_FLAG_HIDDEN.
Referenced by GameCommand_gametype(), GameTypeVote_MapInfo_FixName(), GameTypeVote_SetGametype(), GenericCommand_maplist(), getlsmaps(), GotoFirstMap(), InstantAction_LoadMap(), make_mapinfo_Think(), MapList_Add_All(), Maplist_Init(), MapVote_Init(), MapVote_Start(), MapVote_Think(), RestoreGame(), spawnfunc(), and XonoticMapList_refilter().
Definition at line 256 of file mapinfo.qc.
References MapInfo_BSPName_ByID(), MapInfo_Get_ByName(), NULL, and true.
Referenced by getladder(), getlsmaps(), MapInfo_FilterString(), MUTATOR_HOOKFUNCTION(), XonoticMapInfoDialog_loadMapInfo(), and XonoticMapList_drawListBoxItem().
Definition at line 1067 of file mapinfo.qc.
References _MapInfo_Map_ApplyGametypeEx(), error(), FOREACH, MapInfo_Get_ByName_NoFallbacks(), and MapInfo_Map_supportedGametypes.
Referenced by _MapInfo_CheckMap(), _MapInfo_FilterGametype(), GameTypeVote_AvailabilityStatus(), MapInfo_Get_ByID(), MapInfo_LoadMapSettings(), and swapInPriorityList().
Definition at line 1216 of file mapinfo.qc.
References _MapInfo_FilterGametype(), _MapInfo_GlobItem(), MapInfo_count, MapInfo_CurrentFeatures(), MapInfo_CurrentGametype(), MapInfo_Enumerate(), MapInfo_FilterGametype(), MapInfo_FilterList_Lookup(), MAPINFO_TYPE_ALL, strcat(), strlen(), and substring().
Referenced by Maplist_Init().
Definition at line 1202 of file mapinfo.qc.
References _MapInfo_GlobItem(), MapInfo_count, MapInfo_CurrentFeatures(), MapInfo_Enumerate(), MapInfo_FilterGametype(), MapInfo_FilterList_Lookup(), strcat(), strlen(), and substring().
Referenced by GameTypeVote_SetGametype(), and MapVote_Init().
Definition at line 1183 of file mapinfo.qc.
References cvar_settemp_restore(), localcmd, LOG_INFO, MapInfo_Map_supportedGametypes, and strcat().
Referenced by CampaignSetup(), InstantAction_LoadMap(), and Map_Goto().
Definition at line 1240 of file mapinfo.qc.
References _MapInfo_CheckMap(), _MapInfo_Map_ApplyGametypeEx(), cvar(), floor(), FOREACH, LOG_SEVERE, LOG_SEVEREF, LOG_WARNF, MapInfo_CurrentGametype(), MapInfo_Get_ByName(), MapInfo_LoadMapSettings_SaveGameType(), MapInfo_Map_supportedGametypes, RandomSelection_chosen_ent, and RandomSelection_Init().
Referenced by InitGameplayMode().
int MapInfo_RequiredFlags | ( | ) |
Definition at line 1339 of file mapinfo.qc.
References cvar(), and MAPINFO_FLAG_FRUSTRATING.
Referenced by GameCommand_gametype(), GameTypeVote_MapInfo_FixName(), GameTypeVote_SetGametype(), GenericCommand_maplist(), GotoFirstMap(), InstantAction_LoadMap(), make_mapinfo_Think(), Maplist_Init(), MapVote_Init(), MapVote_Start(), MapVote_Think(), RestoreGame(), spawnfunc(), and XonoticMapList_refilter().
void MapInfo_Shutdown | ( | ) |
Definition at line 1311 of file mapinfo.qc.
References _MapInfo_globhandle, _MapInfo_globopen, MapInfo_Cache_Destroy(), MapInfo_ClearTemps(), MapInfo_Filter_Free(), and search_end().
Referenced by __init_dedicated_server_shutdown(), RestoreGame(), Shutdown(), and XonoticMapList_destroy().
Definition at line 1178 of file mapinfo.qc.
References cvar_set(), and FOREACH.
Referenced by CampaignPreInit(), GameCommand_gametype(), GameTypeVote_SetGametype(), InstantAction_LoadMap(), MapInfo_LoadMapSettings_SaveGameType(), and XonoticGametypeList_saveCvars().
Definition at line 611 of file mapinfo.qc.
Referenced by GameTypeVote_ReadOption(), and XonoticGametypeList_focusedItemChangeNotify().
Definition at line 589 of file mapinfo.qc.
References FOREACH, LOG_WARNF, MapInfo_Map_bspname, NULL, and WARN_COND.
Referenced by Campaign_Invalid(), CampaignPreInit(), GameCommand_gametype(), GameTypeVote_AvailabilityStatus(), GameTypeVote_ReadOption(), GameTypeVote_Type_FromString(), MapInfo_CurrentGametype(), and MapInfo_Get_ByName_NoFallbacks().
Definition at line 616 of file mapinfo.qc.
Referenced by _MapInfo_Map_ApplyGametypeEx(), Gamemode_Init(), GameType_GetIcon(), GameTypeVote_SetGametype(), GameTypeVote_Start(), GetGametype(), isGametypeInFilter(), MapVote_CheckRules_2(), ServerList_TypeSort_Click(), and TeamBalance_FindBestTeam().
Definition at line 621 of file mapinfo.qc.
Referenced by GameType_GetName(), GameTypeVote_ReadOption(), InitGameplayMode(), MapVote_SendEntity(), and Scoreboard_Draw().
REGISTRY_SORT | ( | Gametypes | ) |
STATIC_INIT | ( | Gametypes_renumber | ) |
Definition at line 23 of file mapinfo.qh.
Referenced by Gametype::Gametype ::gametype_init().
Definition at line 21 of file mapinfo.qh.
Referenced by Gametype::Gametype ::gametype_init().
Definition at line 22 of file mapinfo.qh.
Referenced by Gametype::Gametype ::gametype_init().
Definition at line 19 of file mapinfo.qh.
Referenced by Gametype::Gametype ::gametype_init().
Definition at line 20 of file mapinfo.qh.
Referenced by Gametype::Gametype ::gametype_init().
Definition at line 24 of file mapinfo.qh.
Referenced by Gametype::Gametype ::gametype_init().
int m_flags |
Definition at line 27 of file mapinfo.qh.
Referenced by _MapInfo_CheckMap(), Assault::Assault ::m_generate_mapinfo(), CaptureTheFlag::CaptureTheFlag ::m_generate_mapinfo(), Domination::Domination ::m_generate_mapinfo(), Duel::Duel ::m_isForcedSupported(), Gametype::Gametype ::gametype_init(), Invasion::Invasion ::m_generate_mapinfo(), NexBall::NexBall ::m_generate_mapinfo(), Onslaught::Onslaught ::m_generate_mapinfo(), Race::Race ::m_generate_mapinfo(), RaceCTS::RaceCTS ::m_generate_mapinfo(), and TeamDeathmatch::TeamDeathmatch ::m_isForcedSupported().
float MapInfo_count |
Definition at line 144 of file mapinfo.qh.
Referenced by _MapInfo_FilterGametype(), GameCommand_gametype(), GameTypeVote_SetGametype(), getladder(), getlsmaps(), InstantAction_LoadMap(), MapInfo_FilterString(), MapInfo_FindName(), MapInfo_ListAllAllowedMaps(), MapInfo_ListAllowedMaps(), MapList_Add_All(), MUTATOR_HOOKFUNCTION(), and XonoticMapList_refilter().
const int MAPINFO_FEATURE_MONSTERS = 8 |
Definition at line 137 of file mapinfo.qh.
Referenced by _MapInfo_Generate(), and MapInfo_Get_ByName_NoFallbacks().
const int MAPINFO_FEATURE_TURRETS = 4 |
Definition at line 136 of file mapinfo.qh.
Referenced by _MapInfo_Generate(), and MapInfo_Get_ByName_NoFallbacks().
const int MAPINFO_FEATURE_VEHICLES = 2 |
Definition at line 135 of file mapinfo.qh.
Referenced by _MapInfo_Generate(), and MapInfo_Get_ByName_NoFallbacks().
const int MAPINFO_FEATURE_WEAPONS = 1 |
Definition at line 134 of file mapinfo.qh.
Referenced by _MapInfo_Generate(), MapInfo_CurrentFeatures(), and MapInfo_Get_ByName_NoFallbacks().
float MapInfo_FindName_firstResult |
Definition at line 169 of file mapinfo.qh.
Referenced by MapInfo_FindName(), and XonoticMapList_keyDown().
string MapInfo_FindName_match |
Definition at line 168 of file mapinfo.qh.
Referenced by MapInfo_FindName(), and MapInfo_FixName().
const int MAPINFO_FLAG_FORBIDDEN = 2 |
Definition at line 140 of file mapinfo.qh.
Referenced by MapInfo_ForbiddenFlags(), and MapInfo_Get_ByName_NoFallbacks().
const int MAPINFO_FLAG_FRUSTRATING = 4 |
Definition at line 141 of file mapinfo.qh.
Referenced by MapInfo_ForbiddenFlags(), MapInfo_Get_ByName_NoFallbacks(), and MapInfo_RequiredFlags().
const int MAPINFO_FLAG_HIDDEN = 1 |
Definition at line 139 of file mapinfo.qh.
Referenced by MapInfo_ForbiddenFlags(), and MapInfo_Get_ByName_NoFallbacks().
const int MAPINFO_FLAG_NOAUTOMAPLIST = 8 |
Definition at line 142 of file mapinfo.qh.
Referenced by MapInfo_Get_ByName_NoFallbacks(), and Maplist_Init().
Gametype MapInfo_LoadedGametype |
Definition at line 193 of file mapinfo.qh.
Referenced by GetGametype(), InitGameplayMode(), MapInfo_LoadMapSettings_SaveGameType(), ScoreInfo_SendEntity(), and SV_OnEntityPreSpawnFunction().
string MapInfo_Map_author |
Definition at line 10 of file mapinfo.qh.
Referenced by _MapInfo_Generate(), _MapInfo_Map_Reset(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), MapInfo_ClearTemps(), MapInfo_Get_ByName_NoFallbacks(), XonoticMapInfoDialog_loadMapInfo(), and XonoticMapList_drawListBoxItem().
string MapInfo_Map_bspname |
Definition at line 6 of file mapinfo.qh.
Referenced by getladder(), getlsmaps(), LocalCommand_create_scrshot_ent(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), MapInfo_ClearTemps(), MapInfo_FilterString(), MapInfo_Get_ByName_NoFallbacks(), MapInfo_Type_FromString(), MUTATOR_HOOKFUNCTION(), XonoticMapInfoDialog_loadMapInfo(), and XonoticMapList_drawListBoxItem().
string MapInfo_Map_clientstuff |
Definition at line 11 of file mapinfo.qh.
Referenced by _MapInfo_Map_Reset(), _MapInfo_Parse_Settemp(), InitGameplayMode(), MapInfo_ClearTemps(), and MapInfo_Get_ByName_NoFallbacks().
string MapInfo_Map_description |
Definition at line 9 of file mapinfo.qh.
Referenced by _MapInfo_Generate(), _MapInfo_Map_Reset(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), MapInfo_ClearTemps(), MapInfo_Get_ByName_NoFallbacks(), and XonoticMapInfoDialog_loadMapInfo().
int MapInfo_Map_flags |
Definition at line 15 of file mapinfo.qh.
Referenced by _MapInfo_FilterGametype(), _MapInfo_Generate(), _MapInfo_Map_Reset(), getlsmaps(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), and MapInfo_Get_ByName_NoFallbacks().
string MapInfo_Map_fog |
Definition at line 12 of file mapinfo.qh.
Referenced by _MapInfo_Map_Reset(), InitGameplayMode(), and MapInfo_Get_ByName_NoFallbacks().
vector MapInfo_Map_maxs |
Definition at line 17 of file mapinfo.qh.
Referenced by _MapInfo_Map_Reset(), MapInfo_Get_ByName_NoFallbacks(), and swapInPriorityList().
vector MapInfo_Map_mins |
Definition at line 16 of file mapinfo.qh.
Referenced by _MapInfo_Map_Reset(), MapInfo_Get_ByName_NoFallbacks(), and swapInPriorityList().
int MapInfo_Map_supportedFeatures |
Definition at line 14 of file mapinfo.qh.
Referenced by _MapInfo_CheckMap(), _MapInfo_FilterGametype(), _MapInfo_Generate(), _MapInfo_Map_Reset(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), MapInfo_ClearTemps(), and MapInfo_Get_ByName_NoFallbacks().
int MapInfo_Map_supportedGametypes |
Definition at line 13 of file mapinfo.qh.
Referenced by _MapInfo_CheckMap(), _MapInfo_FilterGametype(), _MapInfo_Generate(), _MapInfo_Map_ApplyGametype(), _MapInfo_Map_ApplyGametypeEx(), _MapInfo_Map_Reset(), Assault::Assault ::m_generate_mapinfo(), CaptureTheFlag::CaptureTheFlag ::m_generate_mapinfo(), Domination::Domination ::m_generate_mapinfo(), Duel::Duel ::m_isForcedSupported(), GameTypeVote_AvailabilityStatus(), Invasion::Invasion ::m_generate_mapinfo(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), MapInfo_ClearTemps(), MapInfo_Get_ByName(), MapInfo_Get_ByName_NoFallbacks(), MapInfo_LoadMap(), MapInfo_LoadMapSettings(), NexBall::NexBall ::m_generate_mapinfo(), Onslaught::Onslaught ::m_generate_mapinfo(), Race::Race ::m_generate_mapinfo(), RaceCTS::RaceCTS ::m_generate_mapinfo(), TeamDeathmatch::TeamDeathmatch ::m_isForcedSupported(), and XonoticMapInfoDialog_loadMapInfo().
string MapInfo_Map_title |
Definition at line 7 of file mapinfo.qh.
Referenced by _MapInfo_Generate(), _MapInfo_Map_Reset(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), MapInfo_ClearTemps(), MapInfo_FilterString(), MapInfo_Get_ByName_NoFallbacks(), and XonoticMapInfoDialog_loadMapInfo().
string MapInfo_Map_titlestring |
Definition at line 8 of file mapinfo.qh.
Referenced by _MapInfo_Map_Reset(), MapInfo_Cache_Retrieve(), MapInfo_Cache_Store(), MapInfo_ClearTemps(), MapInfo_Get_ByName_NoFallbacks(), and XonoticMapList_drawListBoxItem().
float MapInfo_progress |
Definition at line 151 of file mapinfo.qh.
Referenced by _MapInfo_FilterGametype().
int MAPINFO_TYPE_ALL |
Definition at line 26 of file mapinfo.qh.
Referenced by Gametype::Gametype ::gametype_init(), make_mapinfo_Think(), MapInfo_Get_ByName_NoFallbacks(), MapInfo_ListAllAllowedMaps(), MapList_Add_All(), and preMenuInit().