From 6cd1a38f1d3a0a45846d63a75475400372af1277 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 8 Nov 2008 16:51:28 +0000 Subject: moved message functions into Player class --- src/core/player.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/core/player.cc') 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; -- cgit v1.2.3