ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.67k stars 619 forks source link

[goldsrc] "maps *" command listing maps multiple times. #464

Open zp opened 11 years ago

zp commented 11 years ago

Appears in both Half-Life and CS.

] version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 17:09:07 Feb 18 2013 (5961)

Screenshot: http://vp-zp.com/zp/goldsrc/con_maps.jpg

ghost commented 11 years ago

Confirm. It repeats only default maps, query doesn't matter:

] maps de_dust
-------------
de_dust.bsp
de_dust2.bsp
de_dust.bsp
de_dust2.bsp
de_dust2_2x2.bsp
GiovaniFerraroTrivelli commented 5 years ago

This also happens on last HLDS build:

Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 15:52:40 Apr  3 2019 (8196)

And if you have many maps loaded, server will lag for a few seconds when you execute maps *

metita commented 5 years ago

Can confirm this is indeed happening in latest beta branch.

image

SamVanheer commented 5 years ago

This happens because it searches through all search paths and the same directories are added as different search paths. Either store the results in a set first to eliminate duplicates or make it possible to search through all directories once.