Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Core/GameEngine/Source/GameClient/MapUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,13 @@ Int populateMapListboxNoReset( GameWindow *listbox, Bool useSystemMaps, Bool isM
if (!listbox)
return -1;

// TheSuperHackers @feature pberthold 14/07/2026 Grow the map list to hold every cached map,
// so none are silently dropped. The capacity otherwise comes from the window's LISTBOXDATA
// LENGTH and caps large collections (Skirmish/LAN/Online, all titles and mods).
const Int neededListLength = (Int)TheMapCache->size();
if (neededListLength > GadgetListBoxGetListLength( listbox ))
GadgetListBoxSetListLength( listbox, neededListLength );

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had this change proposal before. This means it overwrites the map length value from the WND file, which is unexpected.

So if WND file sets length 1000 and 100000 maps do physically exist, then this code list will allocate for 100000 maps and not 1000.

We need a better solution than this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review and the context, @xezon — and sorry for the duplicate. #760 and #1758 are both about the Replay menu, so they didn't come up when I searched for the map list. Having read them now, I understand the issues this idea raises.

The reason I bothered at all: the stock lists ship at 100 (LAN/Online), 200 (MapSelect) and 300 (Skirmish), and even mods like ShockWave carry the exact same numbers untouched — although a higher number of maps works like a charm. So the 100 on the LAN/Online lists mostly just hides maps people already have. Feels less like a deliberate cap and more like a default nobody ever revisited.

One idea before I let it go, though: instead of overriding anything, an opt-in GameData.ini value — default keeps today's behaviour exactly, a positive number lets a user raise the limit at their own risk (clamped to the maps they actually have, so it can't over-allocate). Since the .wnd files aren't in this repo anyway, a code-side setting is really the only place the engine could offer that choice without shipping modified assets.

If that's not something you'd want either, no worries — I'll keep it local like you suggested and close this out. Thanks either way for taking the time.


MapListBoxData lbData;
lbData.listbox = listbox;
lbData.numLength = GadgetListBoxGetListLength( listbox );
Expand Down