about summary refs log tree commit diff
path: root/src/game/client/components/sounds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/sounds.cpp')
-rw-r--r--src/game/client/components/sounds.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/client/components/sounds.cpp b/src/game/client/components/sounds.cpp
index 024d07d4..dfa7e31b 100644
--- a/src/game/client/components/sounds.cpp
+++ b/src/game/client/components/sounds.cpp
@@ -21,6 +21,16 @@ void SOUNDS::on_render()
 	snd_set_listener_pos(gameclient.camera->center.x, gameclient.camera->center.y);
 }
 
+void SOUNDS::play_and_record(int chn, int setid, float vol, vec2 pos)
+{
+	NETMSG_SV_SOUNDGLOBAL msg;
+	msg.soundid = setid;
+	msg.pack(MSGFLAG_NOSEND|MSGFLAG_RECORD);
+	client_send_msg();
+	
+	play(chn, setid, vol, pos);
+}
+
 void SOUNDS::play(int chn, int setid, float vol, vec2 pos)
 {
 	SOUNDSET *set = &data->sounds[setid];