diff options
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) { |