source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

Incorrect sprays & jingle path (missing download path in gameinfo)

Open jimbomcb opened this issue 13 years ago • 3 comments

Any sprays downloaded from the server appear to be placed in "gameinfo_path/user_custom" by default, however the client (here) assumes that the download location is in fact "gameinfo_path/download/user_custom".

Anyone with a non-standard (or non-existent in the case of the MP base) download path isn't going to successfully load any custom sprays (or jingles, if supported).

There's two ways I can see that you can fix this, either by simply adding the correct download path to the gameinfo (as I have done in 64f7ede00ec56583f35a933796423c69b82c50b8) or by making this and this correctly take into account different download paths rather than assuming it's always going to be "game/download/".

The former is what I've done in my fork of the SDK though the latter would fix issues that will occur if either yourselves or others change download to a non-standard path.

jimbomcb avatar Aug 01 '13 02:08 jimbomcb

The best way in my opinion would be to use IFileSystem::GetSearchPath to get the absolute path to the download search path, then copy using this path (instead of hard-coding it into the copy call)

saul avatar Aug 01 '13 09:08 saul

I think both of these changes are correct. We'll apply 64f7ede00ec56583f35a933796423c69b82c50b8. Also, to make the code robust, we should not have anything hardcoded in the code that (supposedly) can be customized in gameinfo.txt, as @saul described.

Could somebody please prepare a patch and test it?

zpostfacto avatar Sep 03 '13 18:09 zpostfacto

https://github.com/jimbomcb/source-sdk-2013/pull/4 While I haven't had a chance to test this as a whole, I have tested that the functions used generate the correct path, even if there is no download path specified. However, I listed several concerns in the comment in that pull request, and another concern occurs to me now, regarding the behavior of FullPathToRelativePathEx when the parent search path (in this case, "GAME"), is not specified or is not supposed to be considered the root game folder (e.g. if the root game folder isn't the first path added to the GAME search path list). As such, can somebody double-check this?

FlaminSarge avatar Sep 03 '13 19:09 FlaminSarge