]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapinfo.qh
Port some minor cleanups from the guide branch
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapinfo.qh
index 68b5d0b3b888addd754d9e074b21b04dbef4d9c9..2d350b2fed3c1b26c46cab2e3c58bcb598ce1436 100644 (file)
@@ -119,6 +119,7 @@ REGISTRY_SORT(Gametypes);
 REGISTRY_CHECK(Gametypes)
 
 REGISTRY_DEFINE_GET(Gametypes, NULL)
+STATIC_INIT(Gametypes_renumber) { FOREACH(Gametypes, true, it.m_id = i); }
 #define REGISTER_GAMETYPE(NAME, inst) REGISTER(Gametypes, MAPINFO_TYPE, NAME, m_id, inst)
 
 #define IS_GAMETYPE(NAME) (MapInfo_LoadedGametype == MAPINFO_TYPE_##NAME)
@@ -150,7 +151,7 @@ int MapInfo_ForbiddenFlags(); // retrieves current flags from cvars
 int 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
+bool MapInfo_Get_ByID(int 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