From b4cef60d62e24d3c0c0451e94adf99254a259a3d Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 30 Aug 2008 08:01:29 +0000 Subject: fixed the remote console --- src/game/client/components/console.cpp | 14 ++++++++++++-- src/game/client/components/console.hpp | 3 +++ src/game/client/components/sounds.cpp | 2 ++ 3 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src/game/client/components') diff --git a/src/game/client/components/console.cpp b/src/game/client/components/console.cpp index f9ec4ae3..66a2249a 100644 --- a/src/game/client/components/console.cpp +++ b/src/game/client/components/console.cpp @@ -349,6 +349,14 @@ void CONSOLE::client_console_print_callback(const char *str, void *user_data) ((CONSOLE *)user_data)->local_console.print_line(str); } +void CONSOLE::print_line(int type, const char *line) +{ + if(type == 0) + local_console.print_line(line); + else if(type == 1) + remote_console.print_line(line); +} + void CONSOLE::on_init() { // @@ -372,13 +380,15 @@ static void con_team(void *result, void *user_data) send_switch_team(console_arg_int(result, 0)); } -void send_kill(int client_id); - static void con_kill(void *result, void *user_data) { send_kill(-1); } +void send_kill(int client_id); + + + static void con_key_input_state(void *result, void *user_data) { ((int *)user_data)[0] = console_arg_int(result, 0); diff --git a/src/game/client/components/console.hpp b/src/game/client/components/console.hpp index 9b60185c..a13a1d65 100644 --- a/src/game/client/components/console.hpp +++ b/src/game/client/components/console.hpp @@ -1,5 +1,6 @@ #include #include +#include class CONSOLE : public COMPONENT { @@ -47,6 +48,8 @@ class CONSOLE : public COMPONENT public: CONSOLE(); + void print_line(int type, const char *line); + virtual void on_init(); virtual void on_reset(); virtual void on_render(); diff --git a/src/game/client/components/sounds.cpp b/src/game/client/components/sounds.cpp index 569bbf01..024d07d4 100644 --- a/src/game/client/components/sounds.cpp +++ b/src/game/client/components/sounds.cpp @@ -11,6 +11,8 @@ void SOUNDS::on_init() snd_set_channel(SOUNDS::CHN_MUSIC, 1.0f, 0.0f); snd_set_channel(SOUNDS::CHN_WORLD, 0.9f, 1.0f); snd_set_channel(SOUNDS::CHN_GLOBAL, 1.0f, 0.0f); + + snd_set_listener_pos(0.0f, 0.0f); } void SOUNDS::on_render() -- cgit 1.4.1