From e942db1c8d87b7db286545d72c604e879f7aeab0 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 9 Jul 2011 14:11:44 +0000 Subject: Cleanup of the messaging interface. --- src/client/client.cc | 11 ++++++----- src/client/client.h | 3 --- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/client') diff --git a/src/client/client.cc b/src/client/client.cc index b514e57..7d4b7e6 100644 --- a/src/client/client.cc +++ b/src/client/client.cc @@ -341,11 +341,6 @@ void Client::notify_zonechange() render::unload(); } -void Client::notify_sound(const char *name) -{ - audio::play(name); -} - void Client::notify_message(const char *message) { std::string text(message); @@ -379,6 +374,12 @@ void Client::notify_message(const core::Message::Channel channel, const std::str audio::play("com/priv"); break; + case core::Message::Sound: // Sound event + + audio::play(message.c_str()); + // a sound event prints nothing to the console + return; + default: break; } diff --git a/src/client/client.h b/src/client/client.h index 19a760f..42b87e6 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -39,9 +39,6 @@ public: /// quit the client virtual void quit(int status); - /// sound notifications from the core - virtual void notify_sound(const char * name); - /// text notifications from the core virtual void notify_message(const core::Message::Channel channel, const std::string &message); -- cgit v1.2.3