diff options
author | Stijn Buys <ingar@osirion.org> | 2008-11-08 16:51:28 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-11-08 16:51:28 +0000 |
commit | 6cd1a38f1d3a0a45846d63a75475400372af1277 (patch) | |
tree | 35bc79e34fe727fc387103a183f80b203c6dfa12 /src/core/player.cc | |
parent | 731dfb8f3ca9c34e4160021cb221c3056c00dbf9 (diff) |
moved message functions into Player class
Diffstat (limited to 'src/core/player.cc')
-rw-r--r-- | src/core/player.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/player.cc b/src/core/player.cc index 865c859..ca985ab 100644 --- a/src/core/player.cc +++ b/src/core/player.cc @@ -10,6 +10,7 @@ #include "sys/sys.h" #include "core/player.h" #include "core/cvar.h" +#include "core/application.h" namespace core { @@ -40,6 +41,22 @@ void Player::clear() player_control = 0; } + +void Player::send(const std::string text) +{ + message(core::Message::Info, text); +} + +void Player::sound(const std::string name) +{ + application()->notify_sound(name.c_str()); +} + +void Player::message(Message::Channel channel, const std::string text) +{ + application()->notify_message(channel, text); +} + void Player::set_control(EntityControlable *entitycontrolable) { player_control = entitycontrolable; |