Group zoned maps in LoadMapZones

If a map had multiple end zones it would be in the map list multiple times. This fixes that issue
This commit is contained in:
Awesomerly 2025-07-31 20:53:26 -07:00 committed by GitHub
parent 0ebfa900b9
commit e8a96e68ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1160,7 +1160,7 @@ void LoadMapList()
char buffer[512];
FormatEx(buffer, sizeof(buffer), "SELECT `map` FROM `%smapzones` WHERE `type` = 1 AND `track` = 0 ORDER BY `map`", g_cSQLPrefix);
FormatEx(buffer, sizeof(buffer), "SELECT `map` FROM `%smapzones` WHERE `type` = 1 AND `track` = 0 GROUP BY `map` ORDER BY `map`", g_cSQLPrefix);
QueryLog(g_hDatabase, LoadZonedMapsCallback, buffer, _, DBPrio_High);
}
case MapListFolder:
@ -1196,7 +1196,7 @@ void LoadMapList()
}
char buffer[512];
FormatEx(buffer, sizeof(buffer), "SELECT `map` FROM `%smapzones` WHERE `type` = 1 AND `track` = 0 ORDER BY `map`", g_cSQLPrefix);
FormatEx(buffer, sizeof(buffer), "SELECT `map` FROM `%smapzones` WHERE `type` = 1 AND `track` = 0 GROUP BY `map` ORDER BY `map`", g_cSQLPrefix);
QueryLog(g_hDatabase, LoadZonedMapsCallbackMixed, buffer, _, DBPrio_High);
}
}