Garry's Mod

Garry's Mod

评价数不足
Spawn Bubble Sound Deleter
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 角色扮演, 写实,
文件大小
发表于
更新日期
583.000 B
1 月 11 日 下午 9:26
1 月 12 日 上午 7:13
2 项改动说明 ( 查看 )

订阅以下载
Spawn Bubble Sound Deleter

描述
What you see before you is the ultimate RP tool - the Spawn Bubble Sound Deleter.

Many, if not all, RP servers have a very annoying issue - an RP-breaking intrusive sound cue that plays when a player loads into a server.

This, as far as I am aware, is not intended behavior, and could be considered a bug turned feature. However, for my RP server, this is unacceptable - players might load right into the middle of an RP process and disturb it with this silly bubble sound.

The reason why the sound occurs, as I found out, is due to client-server desync. Client, when joining, is, for some unspecified reason, considered to be underwater, so if he doesn't catch air soon enough, the drowning logic will kick in. And when it kicks in, it kicks in hard.

Now some technical stuff about the addon:
The now optimized script (thanks https://psteamcommunity.yuanyoumao.com/id/doopiewop) hooks up to the EntityEmitSound event and checks if a "player/pl_drown1.wav" has been played. If it has, we check if the entity that made the sound is a player, if it exists, and, of course, if the player has just spawned. If indeed the player has just joined, we set a boolean blockedInitialDrown to true in order to prevent deleting someone's drowning sounds when they really decide to drown for real.

Here are some tags in case someone searches for this solution:
Player.DrownStart player/pl_drown1.wav bubble sound spawn darkrp drowning loading connecting player

Thanks, and have fun.
12 条留言
a straight white male  [作者] 1 月 18 日 上午 9:55 
rp servers
M4K0 1 月 18 日 上午 7:25 
its a nice way to tell if a friend has loaded in or not, i dont understand the purpose of removing it
a straight white male  [作者] 1 月 18 日 上午 4:05 
i cant say for sure, but from what i learned looking through the code of source 2013 multiplayer sdk on which modern gmod is built, i didn't find anything concrete.

the only thing that could trigger the sound effect is the underwater check.

there might be a slight chance that this feature was programmed into gmod by garry himself, but there are reports of the same bubble spawn sound happening in csgo and l4d, both of which have nothing to do with gmod and garry himself.

so with all that, i have no idea - from personal testing the sound plays sometimes and not always, which makes me think that this is a bug turned feature, it's just that it wasn't annoying enough for most people to care and/or investigate further.

so idk i wish someone on gmod dev team could tell us more, but i don't think pestering rubat is worth it atm, he is already as busy as he is.
Serika 1 月 17 日 下午 12:42 
wait, after all this time it wasn't an intentional feature??
a straight white male  [作者] 1 月 17 日 上午 6:53 
you are welcome my bald friend
4000 pounds of cocaine 1 月 16 日 下午 10:20 
thank you straight white male
a straight white male  [作者] 1 月 15 日 上午 11:25 
yes.
MesmeryX 1 月 15 日 上午 7:58 
This is the most awful, dirty and abominable workaround I've ever seen in my life.
This is beautiful.
You made me proud.
a straight white male  [作者] 1 月 14 日 上午 5:34 
you are not wrong, however please understand that there is no way to disable the sound in case someone (like myself) doesn't want to have it for certain reasons

it is your choice whether you want to install my addon or not, since it exists just to provide you the means in case you don't need the spawn sound

i am open to criticism, but your comment is unprofessional and offensive on purpose
[302ndPAC] - ThePeanutMan 1 月 13 日 下午 2:03 
This is a good feature1!! This is an outrage, it's the only way to figure out if somebody is fully in!!!