-
-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a few issues with sound #5561
Conversation
The null issue I think is to do with it not checking if it actually got a player reference when it receives the packet with the uuid, it just adds it to the map regardless. If we put a |
I will look at it again tomorrow, for now I am just having it not do anything if the player is null, but I may actually be able to catch it earlier to save a bit more on memory. |
Actually upon further investigation, I think this needs a bigger overhaul as our SoundHandler (and PlayerSound) are keeping track of a reference to EntityPlayer which from my understanding is not a good thing to do for GC interacting with things. The only reason it even works currently I believe is given it keeps track of it in an |
… thrower sounds not actually playing
Went ahead and rebased this onto the latest 1.12, because even if it didn't have any merge conflicts with it, for testing it still is probably better to have it against the latest version. (Especially given how many changed happened due to the merging of the Rendering PR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good code wise, but I can't seem to get the active sound to work in my dev environment. Does it work for you?
Ya tested again and it still works fine so going to go ahead and merge this. |
Changes proposed in this pull request:
I did do some testing, though it would probably not hurt to double check some of the logic/test more thoroughly on multiplayer.
One other thing to note I believe that at least one case where the player looked up is null may have to do with the fact I believe it syncs data for clients in all dimensions not just the one that is the same as our player. Not sure if/where we should catch that if we decide to but for the most part I believe these changes improve the handling of the various player sounds.