From 1501c6399761f09b50f2a285d9c6a8848fa36aa3 Mon Sep 17 00:00:00 2001 From: James Brown Date: Sat, 10 Jun 2000 03:43:18 +0000 Subject: [PATCH] Um. Fixed the server so it won't bomb loading Half-Life maps. --- source/cl_main.c | 1 + source/model.c | 5 +++-- source/sv_main.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/cl_main.c b/source/cl_main.c index 2778be1..37c76b9 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -81,6 +81,7 @@ #include #endif +int isServer = 0; // we need to declare some mouse variables here, because the menu system // references them even when on a unix system. diff --git a/source/model.c b/source/model.c index a9ed7f0..0132e50 100644 --- a/source/model.c +++ b/source/model.c @@ -60,7 +60,7 @@ byte mod_novis[MAX_MAP_LEAFS/8]; #define MAX_MOD_KNOWN 512 model_t mod_known[MAX_MOD_KNOWN]; int mod_numknown; - +extern int isServer; unsigned *model_checksum; texture_t *r_notexture_mip; cvar_t *gl_subdivide_size; @@ -356,7 +356,8 @@ void Mod_LoadTextures (lump_t *l) for (j=0 ; joffsets[j] = mt->offsets[j] + sizeof(texture_t) - sizeof(miptex_t); // the pixels immediately follow the structures - memcpy ( tx+1, mt+1, pixels); + if (!isServer) + memcpy ( tx+1, mt+1, pixels); if (!strncmp(mt->name,"sky",3)) R_InitSky (tx); diff --git a/source/sv_main.c b/source/sv_main.c index 16e44cc..21ea7c1 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -48,7 +48,7 @@ #ifdef HAVE_STRINGS_H #include #endif - +int isServer = 1; quakeparms_t host_parms; qboolean host_initialized; // true if into command execution (compatability)