about summary refs log tree commit diff
path: root/src/game/client/components
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-08-30 08:01:29 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-08-30 08:01:29 +0000
commitb4cef60d62e24d3c0c0451e94adf99254a259a3d (patch)
tree315d821277f7ea85d3f30d87818005aa77c67438 /src/game/client/components
parent0511e1152a13ad99b51a819a75ef457404e86d4c (diff)
downloadzcatch-b4cef60d62e24d3c0c0451e94adf99254a259a3d.tar.gz
zcatch-b4cef60d62e24d3c0c0451e94adf99254a259a3d.zip
fixed the remote console
Diffstat (limited to 'src/game/client/components')
-rw-r--r--src/game/client/components/console.cpp14
-rw-r--r--src/game/client/components/console.hpp3
-rw-r--r--src/game/client/components/sounds.cpp2
3 files changed, 17 insertions, 2 deletions
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 <engine/e_client_interface.h>
 #include <game/client/component.hpp>
+#include <game/client/lineinput.hpp>
 
 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()