From 9941c9ba8eaf0bb0ecc47a57e095ab5d38fa652b Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 18 Jul 2020 20:59:52 +1000 Subject: [PATCH] Renumber gametypes after sorting their IDs, fixes sending of gametypes defined outside the main codebase --- qcsrc/common/mapinfo.qh | 1 + 1 file changed, 1 insertion(+) diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 68b5d0b3b..c9d6c5e72 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -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) -- 2.39.2