about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-28 11:30:25 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-28 11:30:25 +0000
commita3ce2eb90cd26fe87042344175e5c9669adb7dcd (patch)
treed936a8ffafe366caea08c5bb384794034c590322 /src/engine/client
parenteba83b7e194cc6b4ba76fd5e048d81279becfc35 (diff)
downloadzcatch-a3ce2eb90cd26fe87042344175e5c9669adb7dcd.tar.gz
zcatch-a3ce2eb90cd26fe87042344175e5c9669adb7dcd.zip
major update. splitted the player information into two diffrent network items
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/client.c8
-rw-r--r--src/engine/client/gfx.c7
-rw-r--r--src/engine/client/snd.c13
3 files changed, 25 insertions, 3 deletions
diff --git a/src/engine/client/client.c b/src/engine/client/client.c
index f8ccf6e5..c6a9252f 100644
--- a/src/engine/client/client.c
+++ b/src/engine/client/client.c
@@ -1007,6 +1007,14 @@ static void client_run(const char *direct_connect_server)
 int editor_main(int argc, char **argv);
 
 /*client main_client; */
+/*
+const char *user_directory()
+{
+	static char path[512] = {0};
+	
+}*/
+
+
 
 int main(int argc, char **argv)
 {
diff --git a/src/engine/client/gfx.c b/src/engine/client/gfx.c
index 13c35a39..fe72f4c7 100644
--- a/src/engine/client/gfx.c
+++ b/src/engine/client/gfx.c
@@ -531,9 +531,14 @@ int gfx_load_texture_raw(int w, int h, int format, const void *data)
 	unsigned char *texdata = (unsigned char *)data;
 	unsigned char *tmpdata = 0;
 	int oglformat = 0;
+	int tex = 0;
+	
+	/* don't waste memory on texture if we are stress testing */
+	if(config.stress)
+		return -1;
 	
 	/* grab texture */
-	int tex = first_free_texture;
+	tex = first_free_texture;
 	first_free_texture = textures[tex].next;
 	textures[tex].next = -1;
 	
diff --git a/src/engine/client/snd.c b/src/engine/client/snd.c
index 79121584..725bc569 100644
--- a/src/engine/client/snd.c
+++ b/src/engine/client/snd.c
@@ -334,14 +334,23 @@ int snd_load_wv(const char *filename)
 	int sid = -1;
 	char error[100];
 	WavpackContext *context;
+	
+	/* don't waste memory on sound when we are stress testing */
+	if(config.stress)
+		return -1;
+
+	file = fopen(filename, "rb"); /* TODO: use system.h stuff for this */
+	if(!file)
+	{
+		dbg_msg("sound/wv", "failed to open %s", filename);
+		return -1;
+	}
 
 	sid = snd_alloc_id();
 	if(sid < 0)
 		return -1;
 	snd = &samples[sid];
 
-	file = fopen(filename, "rb"); /* TODO: use system.h stuff for this */
-
 	context = WavpackOpenFileInput(read_data, error);
 	if (context)
 	{