diff options
author | Stijn Buys <ingar@osirion.org> | 2011-07-09 14:11:44 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-07-09 14:11:44 +0000 |
commit | e942db1c8d87b7db286545d72c604e879f7aeab0 (patch) | |
tree | 4b07ef3422ee265156e020707c3bc96ecd9ed1e0 /src/core/player.cc | |
parent | f39aec30f0e5c6f466681ed34bffd41150976ab9 (diff) |
Cleanup of the messaging interface.
Diffstat (limited to 'src/core/player.cc')
-rw-r--r-- | src/core/player.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/core/player.cc b/src/core/player.cc index f183a4c..d07b258 100644 --- a/src/core/player.cc +++ b/src/core/player.cc @@ -11,12 +11,15 @@ #include "core/player.h" #include "core/cvar.h" #include "core/application.h" +#include "core/gameserver.h" namespace core { -Player::Player() +Player::Player(NetClient *client) { + player_client = client; + clear(); } @@ -61,26 +64,21 @@ void Player::print() const } -void Player::send(const std::string text) +void Player::message(Message::Channel channel, const std::string text) { - message(core::Message::Info, text); + server()->message(this, channel, text); } -void Player::send_warning(const std::string text) +void Player::send(const std::string text) { - message(core::Message::Info, text); - player_warningtime = application()->time(); + server()->message(this, core::Message::Info, text); } void Player::sound(const std::string name) { - application()->notify_sound(name.c_str()); + server()->message(this, core::Message::Sound, name); } -void Player::message(Message::Channel channel, const std::string text) -{ - application()->notify_message(channel, text); -} void Player::set_control(EntityControlable *entitycontrolable) { |