Commits

wifiman committed dd56a49

Fixed missing player sound fallback in OpenAL mode.

Comments (0)

Files changed (1)

     char		name[MAX_QPATH];
 	byte		*data;
 	wavInfo_t	info;
+	const char *sfxName;
 
 	if (sfx->name[0] == '*')
 		return qfalse;
 	if (sfx->loaded)
 		return qtrue;
 
+	if (sfx->truename)
+		sfxName = sfx->truename;
+	else
+		sfxName = sfx->name;
+
 	// Load it from disk
-	if (sfx->name[0] == '#')
-		Com_sprintf(name, sizeof(name), "%s", &sfx->name[1]);
+	if (sfxName[0] == '#')
+		Com_sprintf(name, sizeof(name), "%s", &sfxName[1]);
 	else
-		Com_sprintf(name, sizeof(name), "sound/%s", sfx->name);
+		Com_sprintf(name, sizeof(name), "sound/%s", sfxName);
 
 	if (!S_OpenAL_LoadWAV(name, &data, &info))
 	{