Open cj1094 opened 2 years ago
Why do you need to create materials from .png on dedicated servers?
I'm using a PNG image on the server as a texture map. I'm not using a PNG anymore; Instead, I converted the PNG grayscale image to a JSON string and saved it in the data folder, then load and use it as a text file. It's 4 times the size, but it doesn't matter that much because the server only uses the JSON string as a map, and a lot of players do not need to download it.
I decided to add this as an issue only because these functions are all listed as shared on the wiki:
Material ITexture:GetColor IMaterial:GetColor
For your reference, maybe someone can edit the wiki and put that srcds.exe on Windows doesn't support the previous functions server-side for PNG files.
Thanks.
I have a file: garrysmod/materials/a.png
I run this code server-side on Windows srcds.exe:
This is the output in the server's console:
Material [___error]
- (X)That code returns the correct material when ran server-side from steamapps\common\GarrysMod\hl2.exe.
This is the issue. (X)