[HL] Typos in `materials.txt` cause some textures to play incorrect sounds
The file valve/sound/materials.txt contains several typos that prevent proper sound from working for a few textures in Half-life. If a texture name is not matched correctly in this file, the game will use the default "concrete" sound effects instead when being walked on or shot at.
The following textures are mentioned in materials.txt, do not appear in any Half-life .wad file, but DO have a closely named texture that would make sense instead.
M GENERIC0150
This name should be "GENERIC015O" (ends with letter o, not number zero)
T LAB1_FLOOR10
This name should be "LAB1_FLR10" (no "OO"), or possibly "LAB1_FLOOR1" (no trailing zero), or both... there's also LAB1_FLOOR2 with no entry in materials.txt (but 2A and 2B are both there 🤷)
Y GLASSGREEEN
Y GLASSGREEEN
(appears twice at end of file) - This name should be "GLASSGREEN" (two E, not three).
For backwards compatibility with custom maps that use the (incorrect) texture names for their own materials, it should be possible to leave the wrong names while adding corrected ones.
Sorry for all the edits... I discovered two more entries in the file with incorrect texture names, so there are three to fix now.
Well, to increase my chances of actually seeing this fixed, I may as well contribute... Here is an edited materials.txt with the following changes:
- Shorten texture names to maximum of 12 characters
- Remove any duplicate lines
- Add the (corrected) missing textures mentioned above
- Add a few new 12-character names for classes that did not have them, for mapping with new custom textures:
F FLESHTEXTURE
S SLOSHTEXTURE
D DIRT_TEXTURE
V VENT_TEXTURE
The resulting file now provides some more flexibility to mappers, corrects the sound problems (above) AND is shorter than the previous one due to duplicate removal. Would love to see this merged into the next build, if ever :)
New file here: materials.txt
Replying to https://github.com/ValveSoftware/halflife/issues/2875#issuecomment-1436446064
flesh doesn't work for map objects AFAIK