fix movement audio service when no audio engine
This commit is contained in:
parent
ef724d3832
commit
496172680f
@ -879,6 +879,8 @@ Fix inventory null pointer check on virtualaudiomanager
|
||||
|
||||
(10/21/2024)
|
||||
Fix inventory message for undefined id on client
|
||||
Fix movement audio service when audio engine disabled
|
||||
|
||||
|
||||
|
||||
# TODO
|
||||
|
||||
@ -153,11 +153,13 @@ public class MovementAudioService {
|
||||
* @param type The interaction type
|
||||
*/
|
||||
public void playAudio(int voxelType, InteractionType type){
|
||||
if(Globals.RUN_AUDIO){
|
||||
String audioPath = this.getAudioPath(voxelType, type);
|
||||
if(audioPath != null){
|
||||
Globals.virtualAudioSourceManager.createVirtualAudioSource(audioPath, VirtualAudioSourceType.CREATURE, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays an interaction at a given position
|
||||
@ -166,11 +168,13 @@ public class MovementAudioService {
|
||||
* @param position The position of the audio
|
||||
*/
|
||||
public void playAudioPositional(int voxelType, InteractionType type, Vector3d position){
|
||||
if(Globals.RUN_AUDIO){
|
||||
String audioPath = this.getAudioPath(voxelType, type);
|
||||
if(audioPath != null){
|
||||
Globals.virtualAudioSourceManager.createVirtualAudioSource(audioPath, VirtualAudioSourceType.CREATURE, false, position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a given surface audio definition into memory
|
||||
|
||||
Loading…
Reference in New Issue
Block a user