-
Notifications
You must be signed in to change notification settings - Fork 0
Fix silenced guns not shooting silently #16
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
base: 1.12.2
Are you sure you want to change the base?
Conversation
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.
FlansMod/src/main/java/com/flansmod/common/network/PacketPlaySound.java
Lines 103 to 108 in d273da7
| FMLClientHandler.instance().getClient().getSoundHandler().playSound( | |
| new PositionedSoundRecord(event, | |
| SoundCategory.PLAYERS, | |
| silenced ? 2F : 4F, | |
| (distort ? 1.0F / (rand.nextFloat() * 0.4F + 0.8F) : 1.0F) * (silenced ? 2F : 1F), | |
| posX, posY, posZ)); |
I would decrease the volume a lot more here. I found that 0.5F sounds good. With the current 2F you hear almost no difference.
FMLClientHandler.instance().getClient().getSoundHandler().playSound(
new PositionedSoundRecord(event,
SoundCategory.PLAYERS,
- silenced ? 2F : 4F,
+ silenced ? 0.5F : 4F,
(distort ? 1.0F / (rand.nextFloat() * 0.4F + 0.8F) : 1.0F) * (silenced ? 2F : 1F),
posX, posY, posZ));
|
I changed as suggested. Sounds much better indeed. |
|
Sounds good 👍 |
|
I tested it in multiplayer. The volume is good, when you stand next to the person, but it's dropping really quickly with the distance and at about 15 blocks it's completely silent. Could you please look if it's possible to keep the volume, but increase the range |
Jomosoto
left a comment
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.
See comment above
Fixes #7
Silencers on guns didn't work because of the boolean "silenced" being used as wrong parameter in method.
Now they do.