mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-09-18 07:28:04 +02:00
Fixed bug with contentpack sfx names (ToLower)
This commit is contained in:
parent
d21f97c7b5
commit
82c18f473a
@ -115,7 +115,7 @@
|
|||||||
|
|
||||||
Public Shared Sub LoadSounds(ByVal forceReplace As Boolean)
|
Public Shared Sub LoadSounds(ByVal forceReplace As Boolean)
|
||||||
For Each soundfile As String In System.IO.Directory.GetFiles(GameController.GamePath & "\Content\Sounds\")
|
For Each soundfile As String In System.IO.Directory.GetFiles(GameController.GamePath & "\Content\Sounds\")
|
||||||
If soundfile.EndsWith(".wav") = True Then
|
If soundfile.EndsWith(".wav") = True Or soundfile.EndsWith(".xnb") = True Then
|
||||||
soundfile = System.IO.Path.GetFileNameWithoutExtension(soundfile)
|
soundfile = System.IO.Path.GetFileNameWithoutExtension(soundfile)
|
||||||
AddSound(soundfile, forceReplace)
|
AddSound(soundfile, forceReplace)
|
||||||
End If
|
End If
|
||||||
@ -126,7 +126,7 @@
|
|||||||
|
|
||||||
If System.IO.Directory.Exists(path) = True Then
|
If System.IO.Directory.Exists(path) = True Then
|
||||||
For Each soundfile As String In System.IO.Directory.GetFiles(path, "*.*", IO.SearchOption.AllDirectories)
|
For Each soundfile As String In System.IO.Directory.GetFiles(path, "*.*", IO.SearchOption.AllDirectories)
|
||||||
If soundfile.EndsWith(".wav") = True Then
|
If soundfile.EndsWith(".wav") = True Or soundfile.EndsWith(".xnb") = True Then
|
||||||
soundfile = System.IO.Path.GetFileNameWithoutExtension(soundfile)
|
soundfile = System.IO.Path.GetFileNameWithoutExtension(soundfile)
|
||||||
AddSound(soundfile, forceReplace)
|
AddSound(soundfile, forceReplace)
|
||||||
End If
|
End If
|
||||||
@ -141,7 +141,7 @@
|
|||||||
If _sounds.ContainsKey(Name.ToLower()) = True Then
|
If _sounds.ContainsKey(Name.ToLower()) = True Then
|
||||||
Return _sounds(Name.ToLower())
|
Return _sounds(Name.ToLower())
|
||||||
Else
|
Else
|
||||||
If TryAddGameModeSound(Name) = True Then
|
If TryAddGameModeSound(Name.ToLower()) = True Then
|
||||||
Return _sounds(Name.ToLower())
|
Return _sounds(Name.ToLower())
|
||||||
Else
|
Else
|
||||||
Logger.Log(Logger.LogTypes.Warning, "SoundManager.vb: Cannot find sound file """ & Name & """. Return nothing.")
|
Logger.Log(Logger.LogTypes.Warning, "SoundManager.vb: Cannot find sound file """ & Name & """. Return nothing.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user