mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-23 10:33:13 +00:00
Acoustic notification when people join a hosted game
Patch by Polakrity. Sound by Samulis. Reviewed by: Imarok Fixes: #4101 Differential Revision: https://code.wildfiregames.com/D932 This was SVN commit r22088.
This commit is contained in:
@@ -473,6 +473,7 @@ uigain = 0.7
|
||||
|
||||
[sound.notify]
|
||||
nick = true ; Play a sound when someone mentions your name in the lobby or game
|
||||
gamesetup.join = false ; Play a sound when a new client joins the game setup
|
||||
|
||||
[tinygettext]
|
||||
debug = false ; Print error messages each time a translation for an English string is not found.
|
||||
|
||||
Binary file not shown.
@@ -4,7 +4,8 @@
|
||||
* And store the timestamp of last interaction for each notification.
|
||||
*/
|
||||
var g_SoundNotifications = {
|
||||
"nick": { "soundfile": "audio/interface/ui/chat_alert.ogg", "threshold": 3000 }
|
||||
"nick": { "soundfile": "audio/interface/ui/chat_alert.ogg", "threshold": 3000 },
|
||||
"gamesetup.join": { "soundfile": "audio/interface/ui/gamesetup_join.ogg", "threshold": 0 }
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1617,6 +1617,9 @@ function onClientJoin(newGUID, newAssignments)
|
||||
"username": playername
|
||||
});
|
||||
|
||||
if (newGUID != Engine.GetPlayerGUID() && Object.keys(g_PlayerAssignments).length)
|
||||
soundNotification("gamesetup.join");
|
||||
|
||||
let isRejoiningPlayer = newAssignments[newGUID].player != -1;
|
||||
|
||||
// Assign the client (or only buddies if prefered) to an unused playerslot and rejoining players to their old slot
|
||||
|
||||
@@ -308,6 +308,12 @@
|
||||
"label": "Nick Notification",
|
||||
"tooltip": "Receive audio notification when someone types your nick.",
|
||||
"config": "sound.notify.nick"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"label": "Game Setup - New Player Notification",
|
||||
"tooltip": "Receive audio notification when a new client joins the game setup.",
|
||||
"config": "sound.notify.gamesetup.join"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user