Compare commits

...

2 Commits

Author SHA1 Message Date
Awesomerly
aa196b2680
Merge e8a96e68ee into 7d3913bc3e 2025-09-30 23:33:39 +00:00
Awesomerly
e8a96e68ee
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
2025-07-31 20:53:26 -07:00

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);
}
}