You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Linux, this path sometimes does not resolve. A message is printed to the console containing the directory escape as though it was a direct part of the path:
material "vgui/../swarm/ach_weapon_expert_locked" not found
Example of this occurring:
However, in some cases, this does not happen and the path successfully navigates to the material outside of the vgui folder.
Steps to reproduce
The circumstances in which this produces an error are not currently known. You can run this simple clientside vscript to create a VGUI image, although it may not produce the error by default.
I found out what is happening here. Apparently the game looks for the existence of the "vgui" directory before loading any material. Why does it do that, I don't know.
As you can see from the screenshots below, creating an empty "vgui" directory fixes it.
Well, that's not the worst cause this could've had 🥴
Is there anything you think could be done to mitigate this? Automatically creating a materials/vgui folder in every search directory and/or trying to narrow down the specific search directory the code is trying to use might be possible, but I'm not sure what that would look like or how difficult it would be to implement. Perhaps just warning users to include the folder themselves would suffice. I'm curious if you have any input.
Creating the directory wouldn't work with VPKs, so that could ultimately lead to more confusion. Also this check seems to be done (presumably) on game mount, creating the path after mods are mounted doesn't work. I can't think of a solution or a hack right now.
It is worth noting that this only happens with IImage object returned from scheme manager scheme()->GetImage(), and not with surface()->DrawSetTextureFile() which is usually used for loading images in vgui and can be used to implement IImage. Only existing vgui controls (ImagePanel, AvatarImage) are affected.
Describe the bug
When an image is set in VScript VGUI, this line of code navigates outside of the
vgui
directory, which is used by default for VGUI images.source-sdk-2013/sp/src/game/client/mapbase/vscript_vgui.cpp
Line 430 in af6f9fe
On Linux, this path sometimes does not resolve. A message is printed to the console containing the directory escape as though it was a direct part of the path:
Example of this occurring:
However, in some cases, this does not happen and the path successfully navigates to the material outside of the
vgui
folder.Steps to reproduce
The circumstances in which this produces an error are not currently known. You can run this simple clientside vscript to create a VGUI image, although it may not produce the error by default.
Expected behavior
The path should resolve to a material outside of the
vgui
directory.The text was updated successfully, but these errors were encountered: