To check what sort of footstep sound belongs to a texture, call the PM_FindTextureType() function in the Game DLL interface. Any MOD code should feature this function. You feed it with the texture name char pointer, and it will return the character describing what type of material it is, according to what's specified in your materials.txt file.
Here's what I am doing:
Code:
// ask the engine for the texture name on pGroundEntity under the player's feet
texture_name = TRACE_TEXTURE (pGroundEntity, pPlayer->v_origin, Vector (0, 0, -9999));
// if the engine found the texture, ask the game DLL for the texture type
if (texture_name != NULL)
texture_type = MDLL_PM_FindTextureType ((char *) texture_name); // ask for texture type
The MDLL_ prefix before PM_FindTextureType is metamod's syntax. If you don't use metamod, don't use the MDLL_ macros and directly call PM_FindTextureType.