Simple Voice Chat

Simple Voice Chat

36M Downloads

EntityAudioChannel seems to be destroyed if it is attached to a player and the player dies outside of the voice chat range of any players with the mod

amsam0 opened this issue · 1 comments

commented

Bug description
When you attach an EntityAudioChannel to a player not using the mod and the player dies and respawns outside of the range of any players using the mod, the EntityAudioChannel will be destroyed and it will appear that the player is disconnected. This does not happen if the player respawns inside of the voice chat range of any players using the mod.

Steps to reproduce the issue

  1. Start a Fabric server with simple voice chat and another mod using the API.
  2. Use the API mod to create an EntityAudioChannel and attach it to a player without the mod. Start playing empty audio through an AudioPlayer.
  3. Notice that they appear that they are connected and speaking to players with the mod.
  4. Set their respawn point to next to a player with the mod.
  5. Kill the player and notice that they still appear as speaking and connected.
  6. Set the player’s respawn point to outside of the voice chat range of any players with the mod.
  7. Kill the player and notice that they appear as disconnected after respawning.

Expected behavior
The behavior should be the same if the player respawns inside of the voice chat range of any players with the mod or outside of the range. (Preferably, the EntityAudioChannel should not be destroyed.)

Versions

  • Minecraft version: 1.19.2
  • Forge/Fabric/Bukkit/Spigot/Paper version: Fabric 0.14.10, API 0.67.1
  • Mod/Plugin version: 2.3.16

Other mods
Simple Voice Chat Discord Bridge

commented

Fixed by calling EntityAudioChannel.updateEntity after the player respawns.