fix(audio): skip update when player is invalid
@@ -112,6 +112,10 @@ public void onPlaySound(PlaySoundForOwnerEvent playSoundEvent, EntityRef entity)
@Override
public void update(float delta) {
+ if (!localPlayer.isValid()) {
+ // localplayer is invalid so no audio
+ return;
+ }
audioManager.updateListener(
localPlayer.getPosition(playerPosition),
localPlayer.getViewRotation(playerViewRotation),
