diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-01-11 15:51:43 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-01-11 15:51:43 +0000 |
| commit | 46125d5ed7126276098875efcc61cd4b11bbd6d2 (patch) | |
| tree | dee0ce2c56473066e2660cfca8eaeee972ce5ae3 /src/game/client/components/sounds.cpp | |
| parent | fec578e084ade00d07b2e802fd86b88743d94bbf (diff) | |
| download | zcatch-46125d5ed7126276098875efcc61cd4b11bbd6d2.tar.gz zcatch-46125d5ed7126276098875efcc61cd4b11bbd6d2.zip | |
fixed so predicted sounds and air jump effect works with demo playback
Diffstat (limited to 'src/game/client/components/sounds.cpp')
| -rw-r--r-- | src/game/client/components/sounds.cpp | 10 |
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]; |